Project

General

Profile

L2 » History » Version 10

Skuld Skuld, 07/20/2017 08:08 PM

1 1 Laurent GUERBY
{{>toc}}
2 1 Laurent GUERBY
3 1 Laurent GUERBY
h1. L2
4 1 Laurent GUERBY
5 1 Laurent GUERBY
Decouvertes des MAC et de la topologie niveau 2
6 1 Laurent GUERBY
7 1 Laurent GUERBY
h2. Commandes
8 1 Laurent GUERBY
9 5 Mehdi Abaakouk
10 3 Laurent GUERBY
h3. ubnt antenna
11 1 Laurent GUERBY
12 1 Laurent GUERBY
<pre>
13 1 Laurent GUERBY
brctl show
14 1 Laurent GUERBY
# => ordre des ports dans showmacs
15 1 Laurent GUERBY
brctl showmacs br0
16 1 Laurent GUERBY
# premiere colonne = numero du port
17 3 Laurent GUERBY
/usr/www/sta.cgi
18 3 Laurent GUERBY
# sur sta donne la MAC de l'AP
19 3 Laurent GUERBY
# sur AP donne la MAC des STA
20 1 Laurent GUERBY
</pre>
21 1 Laurent GUERBY
22 2 Laurent GUERBY
h3. toughswitch
23 2 Laurent GUERBY
24 1 Laurent GUERBY
<pre>
25 1 Laurent GUERBY
/usr/www/mactable_data.cgi
26 1 Laurent GUERBY
...
27 1 Laurent GUERBY
"mac": "24:a4:3c:3d:ef:3b", "port": 6, "fid" : 1, "queue": 0, "is_static": 0,
28 1 Laurent GUERBY
</pre>
29 1 Laurent GUERBY
30 2 Laurent GUERBY
h3. ubnt misc
31 1 Laurent GUERBY
32 1 Laurent GUERBY
<pre>
33 1 Laurent GUERBY
date
34 1 Laurent GUERBY
/usr/www/ipscan.cgi
35 1 Laurent GUERBY
ping6 -q -c 1 ff02::1%br0 # remplir la table MAC
36 1 Laurent GUERBY
/usr/www/mactable_data.cgi
37 1 Laurent GUERBY
ip ne
38 1 Laurent GUERBY
ip -6 ne
39 1 Laurent GUERBY
iwlist ath0 peers
40 1 Laurent GUERBY
/usr/www/sta.cgi
41 1 Laurent GUERBY
/usr/www/status.cgi
42 1 Laurent GUERBY
ubntbox mca-status
43 1 Laurent GUERBY
athbox athstats
44 1 Laurent GUERBY
athbox 80211status
45 1 Laurent GUERBY
athbox radartool
46 1 Laurent GUERBY
cat /proc/net/arp
47 1 Laurent GUERBY
brctl show
48 1 Laurent GUERBY
brctl showmacs br0
49 1 Laurent GUERBY
cat /proc/net/dev
50 1 Laurent GUERBY
cat /tmp/running.cfg
51 1 Laurent GUERBY
</pre>
52 1 Laurent GUERBY
53 5 Mehdi Abaakouk
54 5 Mehdi Abaakouk
h3. airfiber
55 5 Mehdi Abaakouk
56 5 Mehdi Abaakouk
<pre>
57 5 Mehdi Abaakouk
aflist
58 5 Mehdi Abaakouk
af get rmac
59 5 Mehdi Abaakouk
</pre>
60 5 Mehdi Abaakouk
61 2 Laurent GUERBY
h3. mikrotik CRS226
62 1 Laurent GUERBY
63 1 Laurent GUERBY
<pre>
64 1 Laurent GUERBY
/interface ethernet switch unicast-fdb print
65 1 Laurent GUERBY
</pre>
66 1 Laurent GUERBY
67 2 Laurent GUERBY
h3. mikrotik RB750UP
68 2 Laurent GUERBY
69 1 Laurent GUERBY
<pre>
70 1 Laurent GUERBY
/interface ethernet switch host print
71 5 Mehdi Abaakouk
:put [/system routerboard get model]
72 5 Mehdi Abaakouk
:put [/interface bridge get 0 mac-address]
73 5 Mehdi Abaakouk
:put [/tool mac-scan all duration=1]
74 5 Mehdi Abaakouk
foreach i in=[/interface ethernet switch host find] do={:put ([/interface ethernet switch host get $i mac] . " " . [/interface ethernet switch host get $i port])
75 5 Mehdi Abaakouk
76 1 Laurent GUERBY
</pre>
77 1 Laurent GUERBY
78 4 Laurent GUERBY
h3. Netonix
79 4 Laurent GUERBY
80 5 Mehdi Abaakouk
Interactive shell
81 4 Laurent GUERBY
<pre>
82 5 Mehdi Abaakouk
show config
83 5 Mehdi Abaakouk
show status
84 4 Laurent GUERBY
show mac table
85 5 Mehdi Abaakouk
</pre>
86 5 Mehdi Abaakouk
87 9 Laurent GUERBY
<pre>
88 9 Laurent GUERBY
NXSavignac57H-140# show mac table
89 9 Laurent GUERBY
MAC                Port  VLAN  Manufacturer  Last IP
90 9 Laurent GUERBY
-----------------  ----  ----  ------------  ---------------
91 9 Laurent GUERBY
00-08-a2-09-99-53  5     1     ADI Engineering, Inc.  91.224.149.97
92 9 Laurent GUERBY
00-0a-5e-61-3a-cc  1     1     3COM Corporation  192.168.254.1
93 9 Laurent GUERBY
00-0d-b9-41-41-58  5     1     PC Engines GmbH  91.224.149.192
94 9 Laurent GUERBY
...
95 9 Laurent GUERBY
</pre>
96 9 Laurent GUERBY
97 5 Mehdi Abaakouk
Script shell
98 5 Mehdi Abaakouk
<pre>
99 6 Laurent GUERBY
cat /proc/switch/mactable # mac table (colonne a 1 = VLAN)
100 5 Mehdi Abaakouk
cat /tmp/boot-config.json # config
101 5 Mehdi Abaakouk
cat /tmp/5min.json # status
102 5 Mehdi Abaakouk
cat /tmp/mactable.json # mactable
103 4 Laurent GUERBY
</pre>
104 4 Laurent GUERBY
105 2 Laurent GUERBY
h3. TP-Link SG3424
106 1 Laurent GUERBY
107 2 Laurent GUERBY
<pre>
108 2 Laurent GUERBY
show mac add add all
109 2 Laurent GUERBY
show mac add int gigabitEthernet 1/0/2
110 2 Laurent GUERBY
show mac add vlan 3131
111 2 Laurent GUERBY
</pre>
112 2 Laurent GUERBY
113 2 Laurent GUERBY
h3. S4810
114 2 Laurent GUERBY
115 2 Laurent GUERBY
<pre>
116 2 Laurent GUERBY
sh  mac-address-table dynamic
117 2 Laurent GUERBY
</pre>
118 7 Laurent GUERBY
119 7 Laurent GUERBY
h3. ubnt ES-48-Lite
120 8 Laurent GUERBY
121 7 Laurent GUERBY
<pre>
122 7 Laurent GUERBY
(UBNT EdgeSwitch) #show mac-addr-table 
123 7 Laurent GUERBY
124 7 Laurent GUERBY
VLAN ID  MAC Address         Interface              IfIndex  Status
125 7 Laurent GUERBY
-------  ------------------  ---------------------  -------  ------------
126 7 Laurent GUERBY
1        00:01:E8:8B:4F:CF   0/49                   49       Learned
127 7 Laurent GUERBY
1        00:08:7C:3C:29:03   0/49                   49       Learned
128 7 Laurent GUERBY
376      00:24:D4:A0:CA:79   0/46                   46       Learned
129 7 Laurent GUERBY
...
130 7 Laurent GUERBY
</pre>