When Port channel configured, MAC address table is not showing up the macs though hardware has MACs. #539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
When PortChannel is configured, the port_id is not mapped to if_name in the radis DB.
In this case 'show mac' or 'show arp' commands are failing to display the MAC entries.
In this case display the port_id in place of if_name.
- How I did it
When interface to OID map failed for port channel mac entries, keyerror exception occurred.
Here considering the OID as interface name and updating bridge mac list.
- How to verify it
Configure port channel and verify mac entries are learned.
When display mac entries via 'show mac' or 'show arp' the mac entried should be displayed.
admin@sonic:~$ show mac
No. Vlan MacAddress Port Type
10 3000 00:00:0A:00:04:03 Ethernet0 Dynamic
11 3000 00:00:0A:00:04:0B Ethernet0 Dynamic
12 3000 00:00:0A:00:04:0D Ethernet0 Dynamic
13 3000 00:00:0A:00:04:07 Ethernet0 Dynamic
14 3000 00:00:0A:00:04:02 Ethernet0 Dynamic
15 3000 00:00:0A:00:04:00 Ethernet0 Dynamic
16 3000 00:00:0A:00:04:0A Ethernet0 Dynamic
17 3000 00:00:0A:00:04:08 Ethernet0 Dynamic
Total number of entries 17
Without fix:
The output doesn't contain any MAC entries, but MAC entries present in hardware.
admin@sonic:~$ show mac
200000000060e