Advertisement
Guest User

brctl_showmacs

a guest
Sep 27th, 2014
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. 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 } ' ; }
  2. root@OpenWrt:~# brctl_showmacs br-lan
  3. port no mac addr is local? ageing timer
  4. 3 a0:f3:c1:86:16:2b no 0.42
  5. 3 d0:e7:82:09:70:4f no 1.45
  6. 3 a0:f3:c1:86:04:5d no 1.96
  7. 3 b2:59:98:74:ed:77 yes 0.00
  8. 3 00:73:e0:75:4d:24 no 266.91
  9. 3 b0:48:7a:8f:9d:17 no 1.17
  10. 3 a0:e4:53:cd:50:0e no 2.37
  11. 3 a0:f3:c1:86:10:b7 no 0.36
  12. 3 64:b3:10:e1:f6:77 no 6.69
  13. 3 90:f6:52:04:f9:8e no 0.67
  14. 3 00:c1:05:02:21:19 no 3.31
  15. 3 c2:4a:00:fc:39:c1 no 2.26
  16. 3 a0:f3:c1:86:14:d3 no 1.23
  17. 3 a0:f3:c1:86:16:b9 no 2.24
  18. 3 e8:94:f6:47:c0:59 no 0.49
  19. 3 10:08:c1:60:5e:8e no 22.72
  20. 3 e8:94:f6:47:c2:d5 no 0.01
  21. 3 90:f6:52:19:37:3a no 0.17
  22. 3 a0:f3:c1:86:03:b3 no 0.90
  23. 2 c0:4a:00:fc:39:c0 yes 0.00
  24. 2 74:f0:6d:22:b7:54 no 0.01
  25. 3 54:9b:12:37:3a:ca no 132.96
  26. 3 08:fc:88:1f:5b:b5 no 14.83
  27. 3 e8:94:f6:47:c5:47 no 0.56
  28. 3 f4:ec:38:d2:76:6c no 0.26
  29. 3 a0:f3:c1:86:14:ed no 1.66
  30. 3 70:05:14:6b:35:12 no 258.82
  31. 3 e8:94:f6:47:ad:35 no 0.93
  32. 3 64:70:02:44:6d:31 no 0.77
  33. 3 a0:f3:c1:86:15:17 no 2.34
  34. 3 48:5d:60:17:ca:52 no 68.26
  35. 3 00:15:6d:a6:fc:49 no 10.47
  36. 2 f8:d0:bd:bd:c4:5e no 2.88
  37. 2 74:e5:0b:44:71:d6 no 0.01
  38. 3 94:35:0a:43:79:04 no 86.15
  39. 3 a0:f3:c1:86:03:f7 no 0.78
  40. 3 70:f1:a1:ae:24:ce no 51.79
  41. 3 a0:f3:c1:86:01:1b no 0.67
  42. 3 78:92:9c:b6:c2:24 no 7.24
  43. 3 80:9b:20:e7:b4:68 no 13.67
  44. 3 78:92:3e:93:e3:bf no 15.19
  45. 2 00:23:14:5c:f7:4c no 0.01
  46. 3 a0:f3:c1:86:14:c1 no 1.75
  47. 3 80:9b:20:e8:32:3c no 245.82
  48. 3 a0:f3:c1:86:14:87 no 2.94
  49. 2 00:23:14:5d:5a:48 no 0.18
  50. 3 a0:f3:c1:86:14:7f no 0.87
  51. 2 18:87:96:13:43:ba no 1.31
  52. 3 e8:94:f6:47:c4:d7 no 1.82
  53. 3 a0:f3:c1:86:14:47 no 1.02
  54. 1 c0:4a:00:fc:39:bf yes 0.00
  55. 3 a0:f3:c1:86:14:5d no 0.71
  56. 3 64:70:02:4e:c4:c5 no 0.61
  57. root@OpenWrt:~# brctl show
  58. bridge name bridge id STP enabled interfaces
  59. br-lan 7fff.c04a00fc39bf no eth0
  60. wlan0
  61. bat0
  62. root@OpenWrt:~# brctl_showmacs br-lan |egrep '^\W*2'
  63. 2 c0:4a:00:fc:39:c0 yes 0.00
  64. 2 74:f0:6d:22:b7:54 no 2.01
  65. 2 f8:d0:bd:bd:c4:5e no 8.73
  66. 2 74:e5:0b:44:71:d6 no 0.02
  67. 2 00:23:14:5c:f7:4c no 0.01
  68. 2 00:23:14:5d:5a:48 no 0.17
  69. 2 18:87:96:13:43:ba no 5.34
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement