-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
config interface shutdown/startup command could get ip address lost #299
Comments
@stcheng , shuotian is working on a new config db -based ip address setup. /etc/network/interfaces is going to be deprecated, please sync up with him to avoid duplicated work. |
@zhenggen-xu this is due to the attribute introduced in the new kernel: keep_addr_on_down. The default value is 0, which causes the lost of the IPv6 addresses. I'll submit a pull request to change this value to 1 to retain the global IPv6 addresses. Thanks for reporting this! |
Please check below output as reference:
|
sonic-net/sonic-buildimage#1992 Please do review! |
Thanks, I was swamped and didn't read this on time. It should be fine to fix that on master, but for the old branches (e,g, 201807 ), we may still need fix with a different approach. |
I can send a PR if you think "ifdown/ifup" approach is fine for old branches. |
@zhenggen-xu please do send a PR to fix the old branches! Thanks! |
* catch Exception to avoid CMIS code crash Signed-off-by: Kebo Liu <kebol@nvidia.com> * fix review comments, add more UT test Signed-off-by: Kebo Liu <kebol@nvidia.com> Signed-off-by: Kebo Liu <kebol@nvidia.com>
Description
Steps to reproduce the issue
admin@sonic:~$ sudo ifconfig Ethernet116
Ethernet116 Link encap:Ethernet HWaddr 00:e0:ec:3c:0a:3e
inet addr:10.0.1.20 Bcast:255.255.255.255 Mask:255.255.255.254
inet6 addr: 2002::1/64 Scope:Global
UP BROADCAST MULTICAST MTU:9100 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
admin@sonic:
$ sudo config interface shutdown Ethernet116$ sudo ifconfig Ethernet116admin@sonic:
Ethernet116 Link encap:Ethernet HWaddr 00:e0:ec:3c:0a:3e
inet addr:10.0.1.20 Bcast:255.255.255.255 Mask:255.255.255.254
BROADCAST MULTICAST MTU:9100 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
admin@sonic:
$ sudo config interface startup Ethernet116$ sudo ifconfig Ethernet116admin@sonic:
Ethernet116 Link encap:Ethernet HWaddr 00:e0:ec:3c:0a:3e
inet addr:10.0.1.20 Bcast:255.255.255.255 Mask:255.255.255.254
UP BROADCAST MULTICAST MTU:9100 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Describe the results you received
ipv6 address is lost
Describe the results you expected
ipv6 address should be reserved.
Additional information you deem important (e.g. issue happens only occasionally)
cat /etc/network/interfaces | grep -A 5 Ethernet116
allow-hotplug Ethernet116
iface Ethernet116 inet static
mtu 9100
address 10.0.1.20
netmask 255.255.255.254
allow-hotplug Ethernet116
iface Ethernet116 inet6 static
mtu 9100
address 2002::1
netmask 64
ifdown/ifup work fine, if it is agreed to use those commands, I will send a PR for this.
Output of
show version
The text was updated successfully, but these errors were encountered: