sonic-net / SONiC

Landing page for Software for Open Networking in the Cloud (SONiC) - https://sonic-net.github.io/SONiC/
2.23k stars 1.12k forks source link

FDB Entries are not cleared even after shutting down the respective interface on which the entry learned. #253

Open chaitanc opened 6 years ago

chaitanc commented 6 years ago

Description: FDB Entries are not cleared even after shutting down the respective interface on this the entry learned.

Procedure: 1) Created a VLAN using below commands

config vlan add 200 config vlan member add 200 Ethernet12 config vlan member add 200 Ethernet28 _root@sonic-testing:/home/admin# show vlan config Name VID Member Mode

Vlan200 200 Ethernet12 tagged Vlan200 200 Ethernet28 tagged_

2) Now, sent matching traffic in bi-direction using external TG (IXIA). Observed that traffic is forwarding to the ports and respective FDB entries are created. _root@sonic-testing:/home/admin# show mac No. Vlan MacAddress Port Type

1     200  00:01:02:05:07:08  Ethernet28  Dynamic
2     200  00:01:02:05:06:08  Ethernet12  Dynamic_

3) Stop the traffic and shutdown the interface Ethernet12 and Ethernet28 respectively. Observed that interfaces are down but mac entries are not cleared. _root@sonic-testing:/home/admin# show mac No. Vlan MacAddress Port Type

1     200  00:01:02:05:07:08  Ethernet28  Dynamic
2     200  00:01:02:05:06:08  Ethernet12  Dynamic_

I have raised this issue by considering general networking concept. Let me know whether this behavior is expected at this point of sonic implementation.

prsunny commented 6 years ago

Currently Sonic doesn't clear the FDB when you shutdown the ports. Since we enforce hardware FDB learning, in this case, we would expect the FDB to age-out after the aging time since there won't be any traffic for the down port.

chaitanc commented 6 years ago

As per your previous response, it was understood that FDB entries will not get cleared with interface shutdown.

Where can we see the default aging time out for FDB entries, I tried below scenario to find out the age out time.

1) Learned one Source MAC address from interface (Ethernet4) 2) When I check in SDK for MAC entries using bcmcmd "l2 show", observed that Source MAC address is learned with Hit Bit set. 3) After that stopped sending traffic, waited for more than 2 hours to get the learned entry cleared, but it is still there.

As per your response, does the interface on which the MAC address is learned should be in down state to get the FDB entry clear ?

Regards, Chaitanya Vella

Hedgehog-Guru commented 3 years ago

Bug was moved to https://github.com/Azure/sonic-buildimage/issues/6425