Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config interface Loopback0 ip add/del is not working #443

Merged
merged 8 commits into from
May 10, 2019

Conversation

kirankella
Copy link
Contributor

- What I did
In main.py, parse Loopback interface and send the config to Config DB

- How I did it
Update the add/remove routines to add/del addresses on Loopback0 interface.

- How to verify it
root@sonic:/home/admin# config interface Loopback0 ip add 28.28.28.28/32

root@sonic:/home/admin# ip route show table local | grep "dev 28.28.28.28"
local 28.28.28.28 dev lo proto kernel scope host src 28.28.28.28

root@sonic:/home/admin# config interface Loopback0 ip add 2037::1/128

root@sonic:/home/admin# ip -6 route show | grep 2037::1
unreachable 2037::1 dev lo proto kernel metric 256 error -101 pref medium

root@sonic:/home/admin# show runningconfiguration all | grep Loopback0
"Loopback0|28.28.28.28/32": {},
"Loopback0|2037::1/128": {},

root@sonic:/home/admin# bcmcmd 'l3 defip show'
l3 defip show
Unit 0, Total Number of DEFIP entries: 8192
VRF Net addr Next Hop Mac INTF MODID PORT PRIO CLASS HIT VLAN
.....
514 0 28.28.28.28/32 00:00:00:00:00:00 100003 0 0 0 1 n
.....

root@sonic:/home/admin# bcmcmd 'l3 ip6route show'
l3 ip6route show
Unit 0, Total Number of IPv6 entries: 6144 (IPv6/64 4096, IPv6/128 2048)
Max number of ECMP paths 64
Free IPv6 entries available: 6127 (IPv6/64 4087, IPv6/128 2040)
VRF Net addr Next Hop Mac INTF MODID PORT PRIO CLASS HIT VLAN
....
7 0 2037:0000:0000:0000:0000:0000:0000:0001/128 00:00:00:00:00:00 100003 0 0 0 1 n
....

root@sonic:/home/admin# config interface Loopback0 ip remove 28.28.28.28/32
root@sonic:/home/admin# ip route show table local | grep "28.28.28.28"

root@sonic:/home/admin# config interface Loopback0 ip remove 2037::1/128
root@sonic:/home/admin# ip -6 route show | grep 2037::1
root@sonic:/home/admin#

- Previous command output (if the output of a command-line utility has changed)

- New command output (if the output of a command-line utility has changed)

-->

Details if related
Along with change in main.py, this issue needed a change in cfgmgr/intfmgr.cpp in sonic-swss repo (tracked via PR sonic-net/sonic-swss#767).

kirankella and others added 8 commits January 4, 2019 16:01
…terface status

A bug in intfutil script that gets the keys object from the app-db for a specific interface

Signed-off-by: kiran.kella@broadcom.com
…stead of the optional alias attribute

* Addressed review comment for sonic-net#424
* Undone the change in intfutil file to push that fix in a seperate PR.

Signed-off-by: kiran.kella@broadcom.com
…ot working.

Fix:
  - Check if add/remove are called on Loopback0 interface and pass them to config DB.
@jleveque
Copy link
Contributor

Retest this please

@lguohan lguohan merged commit c66315a into sonic-net:master May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants