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

Inability to remove IPv6 address. IPv6 address is assigned on interface with leading zeros although all leading zeros were omitted when IPv6 was being assigned using CLI command. #6776

Closed
Hedgehog-Guru opened this issue Feb 12, 2021 · 1 comment · Fixed by sonic-net/sonic-utilities#1414
Labels
Triaged this issue has been triaged

Comments

@Hedgehog-Guru
Copy link

Description
After assigning IPv6 address to the interface with leading zeros it is not possible to remove IPv6 address without leading zero in the remove IPv6 command.
Some times IPv6 address is assigned on interface with leading zeros ([[https://en.wikipedia.org/wiki/Leading_zero]]) although all leading zeros were omitted when IPv6 was being assigned using CLI command.
It can be confusing for users trying to remove IPv6 address from an interface.

Steps to reproduce the issue

  1. Create VLAN interfaces:
config vlan add 100
config vlan add 200
  1. Assign IPv6 address with leading zeros to created interface:
config interface ip add Vlan100 2000::1/64
config interface ip add Vlan100 2001::001/64 <-------THIS INTERFACE WITH LEADING ZEROS
config interface ip add Vlan200 3000::1/64
config interface ip add Vlan200 3001::001/64 <-------THIS INTERFACE WITH LEADING ZEROS
  1. Verify how IPv6 address assigned to interface:
show ipv6 interface
Interface    Master    IPv6 address/mask                         Admin/Oper    BGP Neighbor    Neighbor IP
-----------  --------  ----------------------------------------  ------------  --------------  -------------
Vlan100                2001::1/64                                up/down       N/A             N/A <------------------NO LEADING ZEROS HERE
                       2000::1/64                                up/down       N/A             N/A  
Vlan200                3001::1/64                                up/down       N/A             N/A <------------------NO LEADING ZEROS HERE
                       3000::1/64                                up/down       N/A             N/A
  1. Verify how IPv6 address writed to configuration:
show run all | grep -A 7 "VLAN"

    "VLAN": {
        "Vlan100": {
            "vlanid": "100"
        }
    },
    "VLAN_INTERFACE": {
        "Vlan100": {},
        "Vlan100|2000::1/64": {},
        "Vlan100|2001::001/64": {},  <------------------LEADING ZEROS PRESENT IN CONFIGURATION
        "Vlan200|3000::1/64": {},
        "Vlan200|3001::001/64": {} <------------------LEADING ZEROS PRESENT IN CONFIGURATION
    }
  1. Using information from "show ipv6 interface" output try to remove IPv6 address from interfaces:
config interface ip remove Vlan100 2001::1/64
config interface ip remove Vlan200 3001::1/64

Describe the results you received
It is not possible to remove interfaces that was configured with leading zeros. If you try to remove this IPv6 likewise it was added (without leading zeros) you will fail because IPv6 address specified in removing command literally doesn’t match with address saved in running config:

show ipv6 interface
Interface    Master    IPv6 address/mask                         Admin/Oper    BGP Neighbor    Neighbor IP
-----------  --------  ----------------------------------------  ------------  --------------  -------------
Vlan100                2001::1/64                                up/down       N/A             N/A
                       2000::1/64                                up/down       N/A             N/A
Vlan200                3001::1/64                                up/down       N/A             N/A
                       3000::1/64                                up/down       N/A             N/A

To remove IPv6 address it’s needed to specify it the same way as it kept in the configuration.

config interface ip add Vlan100 2000::01/64
config interface ip add Vlan200 3000::01/64

Describe the results you expected

Option#1

  1. Keep IPv6 addresses in configuration without leading zeros.
  2. Convert specified in " config interface ip remove" command IPv6 address to the one without leading zeros . And perform removing action.

Option#2

  1. Keep IPv6 addresses in configuration as it was specified during assigning.
  2. But while removing convert both specified in " config interface ip remove" command and assigned on the port IPv6 addresses to ones without leading zeros .

Output of show version

SONiC Software Version: SONiC.SONIC.202012.10-d26a4af_Internal
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: d26a4aff
Build date: Thu Feb  4 15:28:36 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02

Platform: x86_64-mlnx_msn3800-r0
HwSKU: ACS-MSN3800
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1937X00565
Uptime: 11:55:34 up 45 min,  2 users,  load average: 0.65, 1.16, 1.10

Docker images:
REPOSITORY                    TAG                                IMAGE ID            SIZE
docker-syncd-mlnx             SONIC.202012.10-d26a4af_Internal   b0775c41d0d0        542MB
docker-syncd-mlnx             latest                             b0775c41d0d0        542MB
docker-snmp                   SONIC.202012.10-d26a4af_Internal   bf1942e39970        438MB
docker-snmp                   latest                             bf1942e39970        438MB
docker-teamd                  SONIC.202012.10-d26a4af_Internal   4b51426a4f11        408MB
docker-teamd                  latest                             4b51426a4f11        408MB
docker-sonic-mgmt-framework   SONIC.202012.10-d26a4af_Internal   c4ed2967823f        616MB
docker-sonic-mgmt-framework   latest                             c4ed2967823f        616MB
docker-nat                    SONIC.202012.10-d26a4af_Internal   6f83852abace        411MB
docker-nat                    latest                             6f83852abace        411MB
docker-router-advertiser      SONIC.202012.10-d26a4af_Internal   d1c9b2a3ba6d        398MB
docker-router-advertiser      latest                             d1c9b2a3ba6d        398MB
docker-platform-monitor       SONIC.202012.10-d26a4af_Internal   2f9ba3b87a75        689MB
docker-platform-monitor       latest                             2f9ba3b87a75        689MB
docker-lldp                   SONIC.202012.10-d26a4af_Internal   57b6b48acc19        437MB
docker-lldp                   latest                             57b6b48acc19        437MB
docker-database               SONIC.202012.10-d26a4af_Internal   0c698fd3d04f        397MB
docker-database               latest                             0c698fd3d04f        397MB
docker-orchagent              SONIC.202012.10-d26a4af_Internal   86241aa41334        425MB
docker-orchagent              latest                             86241aa41334        425MB
docker-dhcp-relay             SONIC.202012.10-d26a4af_Internal   5fa3d131c72f        404MB
docker-dhcp-relay             latest                             5fa3d131c72f        404MB
docker-sonic-telemetry        SONIC.202012.10-d26a4af_Internal   36d5740d7971        471MB
docker-sonic-telemetry        latest                             36d5740d7971        471MB
docker-fpm-frr                SONIC.202012.10-d26a4af_Internal   a34711f7665f        425MB
docker-fpm-frr                latest                             a34711f7665f        425MB
docker-sflow                  SONIC.202012.10-d26a4af_Internal   166cfe57ddd3        408MB
docker-sflow                  latest                             166cfe57ddd3        408MB

sonic_dump_r-qa-sw-eth-2322_20210212_115549.tar.gz

@d-dashkov
Copy link
Contributor

d-dashkov commented Feb 16, 2021

Hi,
This PR: sonic-net/sonic-utilities#1414 should prevent assigning IP with leading zeros in configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants