On Cisco switches, the GetBRIDGE program when run normally won’t show the complete bridge table. Cisco stores the bridge table using a different method, so our program has to use a different method to fetch it.
This different method is called “Community String Indexing”. It involves fetching the bridge table with different community strings.
GetBRIDGE 192.168.1.12 public@5 Fetches VLAN 5 bridge table
GetBRIDGE 192.168.1.12 public@1000 Fetches VLAN 1000 bridge table
Our program will scan all of the VLANs on the switch and then do individual fetches using the modified community strings.
Note: If there is a community string that has an “@” sign in it. If the user sets the switch to use a community string like “h@ck3r”, then this goofs up the ability to do a fetch against each bridge table because we would have to do:
GetBRIDGE 192.168.1.12 h@ck3r@5
Would fetch VLAN 5 bridge table but would fail because of the first “@” sign
This is a known issue only with all Cisco switches, but in general it’s best to always stay away from symbols in community strings. It is recommended to use uppercase, lowercase, and numbers.