This KB describes how to check forwarding database (FDB) hash collision for the following switches:
If there is a FDB hash collision, an EX switch cannot learn the specific MAC address. Also, packet flooding occurs in the same VLAN when the EX switch receives a packet with that MAC address as the destination. For example, you cannot see a specific MAC address with 'show ethernet-switching table' . When checking with 'show ethernet-switching mac-learning-log' , the learning/deleting log is seen with that MAC address in a short while.If that MAC address belongs to VLAN which has routed VLAN interface, EX would send out GARP often.
'show ethernet-switching table'
'show ethernet-switching mac-learning-log'
EX switch installs MAC address in FDB by using the hash value created from MAC address and VLAN ID.In the case of EX4200, there are 8,192 hash indices and it can install four MAC addresses per hash index.
Use the command, 'show ethernet-switching mac-learning-log' to check if MAC learning and deleting are seen with specific MAC address in a short while.
In the following sample output, EX is learning 00:00:5a:e1:b3:17 but deleting it at the same time.
root@EX4200> show ethernet-switching mac-learning-log Wed Nov 22 08:14:35 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was deleted on ae0.0 Wed Nov 22 08:14:37 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was learned on ae0.0 Wed Nov 22 08:14:37 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was deleted on ae0.0 Wed Nov 22 08:14:39 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was learned on ae0.0 Wed Nov 22 08:14:39 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was deleted on ae0.0 Wed Nov 22 08:14:41 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was learned on ae0.0 Wed Nov 22 08:14:41 2017 vlan_name vlan1000 mac 00:00:5a:e1:b3:17 was deleted on ae0.0
Next, collect FDB table with the following command at shell mode:
date >> /var/tmp/fdb-fpc0.txt cprod -A fpc0 -c "show shim bridge fdb" >> /var/tmp/fdb-fpc0.txt
The following sample FDB output observes FDB hash collision with 00:00:5a:e1:b3:17. In this example, hash index is 0x02C0, and 0x0, 0x1, 0x2, and 0x3 are offset value for this hash index.EX tried to install 00:00:5a:e1:b3:17 in hash index 0x02C0, but failed since all four entries were allocated.
0 0 1000 00:00:63:4E:39:F2 Tr 16 F|1|0|0|0 0|0 0 0 0 0 0|0 0|0 0x02C0/0x3 1 0 1000 00:00:63:4E:39:F2 Tr 16 F|1|0|0|0 0|0 0 0 1 1 0|0 0|0 0x02C0/0x3 0 0 1000 00:00:6B:FA:86:65 Tr 16 F|1|0|0|0 0|0 0 0 0 0 0|0 0|0 0x02C0/0x2 1 0 1000 00:00:6B:FA:86:65 Tr 16 F|1|0|0|0 0|0 0 0 1 1 0|0 0|0 0x02C0/0x2 0 0 1000 00:00:8B:8A:66:6B Tr 16 F|1|0|0|0 0|0 0 0 0 0 0|0 0|0 0x02C0/0x1 1 0 1000 00:00:8B:8A:66:6B Tr 16 F|1|0|0|0 0|0 0 0 1 1 0|0 0|0 0x02C0/0x1 0 0 1000 00:00:AC:28:FD:17 Tr 16 F|1|0|0|0 0|0 0 0 0 0 0|0 0|0 0x02C0/0x0 1 0 1000 00:00:AC:28:FD:17 Tr 16 F|1|0|0|0 0|0 0 0 1 1 0|0 0|0 0x02C0/0x0 0 0 1000 00:00:5a:e1:b3:17 Tr 16 0x02C0/0x0 Hash-table collision failure1 0 1000 00:00:5a:e1:b3:17 Tr 16 0x02C0/0x0 Hash-table collision failure
Additional sample output. In this example, EX was unable to install 00:15:3d:15:4e:ed in FDB with index 0x1579/0xB.
In this example, FDB index 0x1579/0xB would be 0x1584(0x1579 + 0xB). Check FDB index 0x1584 and can see already four entries were installed in this index and that's why 00:15:3d:15:4e:ed couldn't be installed in FDB.
0 0 1000 00:15:3D:15:8A:84 Tr 16 F|1|0|0|0 0|0 0 0 6 6 0|0 0|0 0x1584/0x0 1 0 1000 00:15:3D:15:8A:84 Tr 16 F|1|0|0|0 0|0 0 0 7 7 0|0 0|0 0x1584/0x0 0 0 1278 00:15:3D:15:83:1B Tr 16 F|1|0|0|0 0|0 0 0 6 6 0|0 0|0 0x1584/0x1 1 0 1278 00:15:3D:15:83:1B Tr 16 F|1|0|0|0 0|0 0 0 7 7 0|0 0|0 0x1584/0x1 0 0 1534 00:15:3D:15:9E:A7 Tr 16 F|1|0|1|0 0|0 0 0 6 6 0|0 0|0 0x1584/0x2 1 0 1534 00:15:3D:15:9E:A7 Tr 16 F|1|0|0|0 0|0 0 0 7 7 0|0 0|0 0x1584/0x2 0 0 1975 00:15:3D:15:8C:9E Tr 16 F|1|0|0|0 0|0 0 0 6 6 0|0 0|0 0x1584/0x3 1 0 1975 00:15:3D:15:8C:9E Tr 16 F|1|0|0|0 0|0 0 0 7 7 0|0 0|0 0x1584/0x3
show shim bridge fdb'
'Hash-table collision failure
Although hash collision is observed, traffic failure would not be seen since EX will flood that packets as Unknown unicast in the same segment. To avoid such flooding, add mac-lookup-length option.
set ethernet-switching-options mac-lookup-length 8