Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@OpenWrt:~# brctl_showmacs () { printf "port no\tmac addr\t\tis local?\tageing timer\n" ; hexdump -v -e '5/1 "%02x:" /1 "%02x" /1 " %x" /1 " %x" 1/4 " %i" 1/4 "\n"' /sys/class/net/$1/brforward | awk '{ islocal = $3 ? "yes" : "no" ; printf "%3i\t%s\t%s\t\t%8.2f\n",$2,$1,islocal,$4/100 } ' ; }
- root@OpenWrt:~# brctl_showmacs br-lan
- port no mac addr is local? ageing timer
- 3 a0:f3:c1:86:16:2b no 0.42
- 3 d0:e7:82:09:70:4f no 1.45
- 3 a0:f3:c1:86:04:5d no 1.96
- 3 b2:59:98:74:ed:77 yes 0.00
- 3 00:73:e0:75:4d:24 no 266.91
- 3 b0:48:7a:8f:9d:17 no 1.17
- 3 a0:e4:53:cd:50:0e no 2.37
- 3 a0:f3:c1:86:10:b7 no 0.36
- 3 64:b3:10:e1:f6:77 no 6.69
- 3 90:f6:52:04:f9:8e no 0.67
- 3 00:c1:05:02:21:19 no 3.31
- 3 c2:4a:00:fc:39:c1 no 2.26
- 3 a0:f3:c1:86:14:d3 no 1.23
- 3 a0:f3:c1:86:16:b9 no 2.24
- 3 e8:94:f6:47:c0:59 no 0.49
- 3 10:08:c1:60:5e:8e no 22.72
- 3 e8:94:f6:47:c2:d5 no 0.01
- 3 90:f6:52:19:37:3a no 0.17
- 3 a0:f3:c1:86:03:b3 no 0.90
- 2 c0:4a:00:fc:39:c0 yes 0.00
- 2 74:f0:6d:22:b7:54 no 0.01
- 3 54:9b:12:37:3a:ca no 132.96
- 3 08:fc:88:1f:5b:b5 no 14.83
- 3 e8:94:f6:47:c5:47 no 0.56
- 3 f4:ec:38:d2:76:6c no 0.26
- 3 a0:f3:c1:86:14:ed no 1.66
- 3 70:05:14:6b:35:12 no 258.82
- 3 e8:94:f6:47:ad:35 no 0.93
- 3 64:70:02:44:6d:31 no 0.77
- 3 a0:f3:c1:86:15:17 no 2.34
- 3 48:5d:60:17:ca:52 no 68.26
- 3 00:15:6d:a6:fc:49 no 10.47
- 2 f8:d0:bd:bd:c4:5e no 2.88
- 2 74:e5:0b:44:71:d6 no 0.01
- 3 94:35:0a:43:79:04 no 86.15
- 3 a0:f3:c1:86:03:f7 no 0.78
- 3 70:f1:a1:ae:24:ce no 51.79
- 3 a0:f3:c1:86:01:1b no 0.67
- 3 78:92:9c:b6:c2:24 no 7.24
- 3 80:9b:20:e7:b4:68 no 13.67
- 3 78:92:3e:93:e3:bf no 15.19
- 2 00:23:14:5c:f7:4c no 0.01
- 3 a0:f3:c1:86:14:c1 no 1.75
- 3 80:9b:20:e8:32:3c no 245.82
- 3 a0:f3:c1:86:14:87 no 2.94
- 2 00:23:14:5d:5a:48 no 0.18
- 3 a0:f3:c1:86:14:7f no 0.87
- 2 18:87:96:13:43:ba no 1.31
- 3 e8:94:f6:47:c4:d7 no 1.82
- 3 a0:f3:c1:86:14:47 no 1.02
- 1 c0:4a:00:fc:39:bf yes 0.00
- 3 a0:f3:c1:86:14:5d no 0.71
- 3 64:70:02:4e:c4:c5 no 0.61
- root@OpenWrt:~# brctl show
- bridge name bridge id STP enabled interfaces
- br-lan 7fff.c04a00fc39bf no eth0
- wlan0
- bat0
- root@OpenWrt:~# brctl_showmacs br-lan |egrep '^\W*2'
- 2 c0:4a:00:fc:39:c0 yes 0.00
- 2 74:f0:6d:22:b7:54 no 2.01
- 2 f8:d0:bd:bd:c4:5e no 8.73
- 2 74:e5:0b:44:71:d6 no 0.02
- 2 00:23:14:5c:f7:4c no 0.01
- 2 00:23:14:5d:5a:48 no 0.17
- 2 18:87:96:13:43:ba no 5.34
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement