Projet

Général

Profil

L2 » Historique » Version 7

Version 6 (Laurent GUERBY, 15/03/2016 19:37) → Version 7/10 (Laurent GUERBY, 06/03/2017 21:18)

{{>toc}}

h1. L2

Decouvertes des MAC et de la topologie niveau 2

h2. Commandes

h3. ubnt antenna

<pre>
brctl show
# => ordre des ports dans showmacs
brctl showmacs br0
# premiere colonne = numero du port
/usr/www/sta.cgi
# sur sta donne la MAC de l'AP
# sur AP donne la MAC des STA
</pre>

h3. toughswitch

<pre>
/usr/www/mactable_data.cgi
...
"mac": "24:a4:3c:3d:ef:3b", "port": 6, "fid" : 1, "queue": 0, "is_static": 0,
</pre>

h3. ubnt misc

<pre>
date
/usr/www/ipscan.cgi
ping6 -q -c 1 ff02::1%br0 # remplir la table MAC
/usr/www/mactable_data.cgi
ip ne
ip -6 ne
iwlist ath0 peers
/usr/www/sta.cgi
/usr/www/status.cgi
ubntbox mca-status
athbox athstats
athbox 80211status
athbox radartool
cat /proc/net/arp
brctl show
brctl showmacs br0
cat /proc/net/dev
cat /tmp/running.cfg
</pre>

h3. airfiber

<pre>
aflist
af get rmac
</pre>

h3. mikrotik CRS226

<pre>
/interface ethernet switch unicast-fdb print
</pre>

h3. mikrotik RB750UP

<pre>
/interface ethernet switch host print
:put [/system routerboard get model]
:put [/interface bridge get 0 mac-address]
:put [/tool mac-scan all duration=1]
foreach i in=[/interface ethernet switch host find] do={:put ([/interface ethernet switch host get $i mac] . " " . [/interface ethernet switch host get $i port])

</pre>



h3. Netonix

Interactive shell
<pre>
show config
show status
show mac table
</pre>

Script shell
<pre>
cat /proc/switch/mactable # mac table (colonne a 1 = VLAN)
cat /tmp/boot-config.json # config
cat /tmp/5min.json # status
cat /tmp/mactable.json # mactable
</pre>



h3. TP-Link SG3424

<pre>
show mac add add all
show mac add int gigabitEthernet 1/0/2
show mac add vlan 3131
</pre>

h3. S4810

<pre>
sh mac-address-table dynamic
</pre>

h3. ubnt ES-48-Lite
<pre>
(UBNT EdgeSwitch) #show mac-addr-table

VLAN ID MAC Address Interface IfIndex Status
------- ------------------ --------------------- ------- ------------
1 00:01:E8:8B:4F:CF 0/49 49 Learned
1 00:08:7C:3C:29:03 0/49 49 Learned
376 00:24:D4:A0:CA:79 0/46 46 Learned
...

</pre>