all ports with more than 10 macs are probably trunks
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 11 Sep 2019 05:32:36 +0000 (07:32 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 11 Sep 2019 05:32:36 +0000 (07:32 +0200)
shm-trunk.regex

index b2e9466..fca47cf 100644 (file)
@@ -1,2 +1,2 @@
 # hide physical and trunk ports (> 10 mac, port nr <= 49)
-cat /dev/shm/snmp-mac-port/* | cut -d' ' -f1,4 | sort | uniq -c | awk '{ if ( $1 > 10 && $3 <= 49 ) print "/"$2":"$2 " .* " $3 }' > /dev/shm/trunk.regex
+cat /dev/shm/snmp-mac-port/* | cut -d' ' -f1,4 | sort | uniq -c | awk '{ if ( $1 > 10 ) print "/"$2":"$2 " .* " $3 }' > /dev/shm/trunk.regex