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

Missing validation of not assigning several vlans as untagged on the same interface. #6421

Closed
Hedgehog-Guru opened this issue Jan 12, 2021 · 3 comments

Comments

@Hedgehog-Guru
Copy link

Hedgehog-Guru commented Jan 12, 2021

Description
SONiC does not prevent from assigning several VLANs as untagged on the same interface.
This bug is reproduced on the stable image as well.

Steps to reproduce the issue

  1. Config two arbitrary VLANs
    config vlan add 17
    config vlan add 1002
  1. Assign vlan 17 on the interface as untagged one
    config vlan member add --untagged 17 Ethernet32
  1. Assign VLAN 1002 on the interface as an untagged one
    config VLAN member add --untagged 1002 Ethernet32

Describe the results you received
Two untagged VLANs on the same port.

# show vlan brief 
+-----------+--------------+------------+----------------+-----------------------+
|   VLAN ID | IP Address   | Ports      | Port Tagging   | DHCP Helper Address   |
+===========+==============+============+================+=======================+
|        17 |              | Ethernet32 | untagged       |                       |
+-----------+--------------+------------+----------------+-----------------------+
|      1002 |              | Ethernet32 | untagged       |                       |
+-----------+--------------+------------+----------------+-----------------------

Describe the results you expected
Config utility should prevent from assigning several VLANs as untagged on the same interface.

The output of show version

SONiC Software Version: SONiC.201911.51-dea38d15
Distribution: Debian 9.13
Kernel: 4.9.0-11-2-amd64
Build commit: dea38d15
Build date: Mon Jan  4 13:38:57 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02

Platform: x86_64-mlnx_msn3700c-r0
HwSKU: ACS-MSN3700C
ASIC: mellanox
Serial Number: MT1935X01905
Uptime: 08:58:59 up 1 day, 38 min,  2 users,  load average: 3.69, 1.88, 1.48

Docker images:
REPOSITORY                    TAG                  IMAGE ID            SIZE
docker-syncd-mlnx             201911.51-dea38d15   aaaa6191ae77        399MB
docker-syncd-mlnx             latest               aaaa6191ae77        399MB
docker-sonic-telemetry        201911.51-dea38d15   677d64c827c7        353MB
docker-sonic-telemetry        latest               677d64c827c7        353MB
docker-router-advertiser      201911.51-dea38d15   569ab41a4654        290MB
docker-router-advertiser      latest               569ab41a4654        290MB
docker-platform-monitor       201911.51-dea38d15   a5bc7ebc9b2c        666MB
docker-platform-monitor       latest               a5bc7ebc9b2c        666MB
docker-fpm-frr                201911.51-dea38d15   1ad8a005128e        335MB
docker-fpm-frr                latest               1ad8a005128e        335MB
docker-teamd                  201911.51-dea38d15   3779578c25cd        315MB
docker-teamd                  latest               3779578c25cd        315MB
docker-lldp-sv2               201911.51-dea38d15   52a8ee60c1c5        312MB
docker-lldp-sv2               latest               52a8ee60c1c5        312MB
docker-dhcp-relay             201911.51-dea38d15   b752e2e86795        300MB
docker-dhcp-relay             latest               b752e2e86795        300MB
docker-database               201911.51-dea38d15   873fd83afd69        290MB
docker-database               latest               873fd83afd69        290MB
docker-snmp-sv2               201911.51-dea38d15   5379eb90ea3e        348MB
docker-snmp-sv2               latest               5379eb90ea3e        348MB
docker-orchagent              201911.51-dea38d15   1437f5b610dd        333MB
docker-orchagent              latest               1437f5b610dd        333MB
docker-sflow                  201911.51-dea38d15   8abc08609485        315MB
docker-sflow                  latest               8abc08609485        315MB
docker-nat                    201911.51-dea38d15   f0ac3672d083        316MB
docker-nat                    latest               f0ac3672d083        316MB
docker-sonic-mgmt-framework   201911.51-dea38d15   be78292b43d4        429MB
docker-sonic-mgmt-framework   latest               be78292b43d4        429MB
@Hedgehog-Guru
Copy link
Author

Bug still exists on SONiC.201911.51-dea38d15 and moved from:
sonic-net/sonic-utilities#803

@anshuv-mfst
Copy link

Not supported today, enhancement for input validation for interface config.

liat-grozovik pushed a commit to sonic-net/sonic-utilities that referenced this issue Jan 27, 2021
…face (#1382)

Fix for sonic-net/sonic-buildimage#6421

**- What I did**
User was able to add an interface to multiple VLANs as untagged. Added a validation to a single untagged member.

**- How I did it**
Added a validation when adding a port as untagged to check in DB if is already member as untagged in a different vlan.

**- How to verify it**
Add vlan, add interface as untagged member in this vlan, add another vlan, try to add the same interface as untagged member in the new vlan.

**- Previous command output (if the output of a command-line utility has changed)**
Command was successful.

**- New command output (if the output of a command-line utility has changed)**
Fail in VLAN membership.
Error: Ethernet8 is already untagged member!
@Hedgehog-Guru
Copy link
Author

Bug has been fixed.
Verified on:

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

anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this issue Mar 2, 2021
…face (sonic-net#1382)

Fix for sonic-net/sonic-buildimage#6421

**- What I did**
User was able to add an interface to multiple VLANs as untagged. Added a validation to a single untagged member.

**- How I did it**
Added a validation when adding a port as untagged to check in DB if is already member as untagged in a different vlan.

**- How to verify it**
Add vlan, add interface as untagged member in this vlan, add another vlan, try to add the same interface as untagged member in the new vlan.

**- Previous command output (if the output of a command-line utility has changed)**
Command was successful.

**- New command output (if the output of a command-line utility has changed)**
Fail in VLAN membership.
Error: Ethernet8 is already untagged member!
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
…face (#1382)

Fix for sonic-net/sonic-buildimage#6421

**- What I did**
User was able to add an interface to multiple VLANs as untagged. Added a validation to a single untagged member.

**- How I did it**
Added a validation when adding a port as untagged to check in DB if is already member as untagged in a different vlan.

**- How to verify it**
Add vlan, add interface as untagged member in this vlan, add another vlan, try to add the same interface as untagged member in the new vlan.

**- Previous command output (if the output of a command-line utility has changed)**
Command was successful.

**- New command output (if the output of a command-line utility has changed)**
Fail in VLAN membership.
Error: Ethernet8 is already untagged member!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants