Projet

Général

Profil

L2

Decouvertes des MAC et de la topologie niveau 2

Commandes

ubnt antenna

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

toughswitch

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

ubnt misc

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

airfiber

aflist
af get rmac

mikrotik CRS226

/interface ethernet switch unicast-fdb print

mikrotik RB750UP

/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])

Netonix

Interactive shell

show config
show status
show mac table

NXSavignac57H-140# show mac table
MAC                Port  VLAN  Manufacturer  Last IP
-----------------  ----  ----  ------------  ---------------
00-08-a2-09-99-53  5     1     ADI Engineering, Inc.  91.224.149.97
00-0a-5e-61-3a-cc  1     1     3COM Corporation  192.168.254.1
00-0d-b9-41-41-58  5     1     PC Engines GmbH  91.224.149.192
...

Script shell

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

TP-Link SG3424

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

S4810

sh  mac-address-table dynamic

ubnt ES-48-Lite

(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
...