sonic-net / sonic-utilities

Command line utilities for the SONiC project
Other
157 stars 664 forks source link

Missing validation for "config interface ip add" command in case of assigning an ip-address on a trunk port. #807

Open MaxYaremchuk opened 4 years ago

MaxYaremchuk commented 4 years ago

Description There should be a verification for config interface ip add command in case of assigning an ip-address on a trunk port.

Steps to reproduce the issue

  1. Add a vlan # config vlan add 2
  2. Add interfaces to vlan # config vlan member add 2 -u Ethernet44 # config vlan member add 2 -u Ethernet48
  3. Assign IP addresses on trunks ports # config interface ip add Ethernet44 192.168.1.1/24 # config interface ip add Ethernet48 192.168.2.1/24

Describe the results you received Having assigned an ip-address on a trunk port neither L2 not L3 traffic (with and without 802.1Q header) can't flow via such port. L2 traffic is not being processed because it's a L3 port (dst mac differs from this port's mac) But this L3 port treats all untagged traffic as tagged (see this bug [https://github.com/Azure/sonic-buildimage/issues/3943])

Describe the results you expected There are two options:

  1. system should prevent from assigning an ip-address on vlan member port.
  2. having assigned ip address on trunk port, such port should stop being a trunk port (vlan member) and start to process traffic as router port.

Output of show version

SONiC Software Version: SONiC.master.0-dirty-20200114.131506
Distribution: Debian 9.11
Kernel: 4.9.0-9-2-amd64
Build commit: 952dfb15
Build date: Tue Jan 14 13:28:50 UTC 2020
Built by: volodymyrs@r-build-sonic03

Platform: x86_64-mlnx_msn2100-r0
HwSKU: ACS-MSN2100
ASIC: mellanox
Serial Number: MT1646X05314
Uptime: 09:43:29 up 55 min,  1 user,  load average: 3.34, 3.54, 3.55

Docker images:
REPOSITORY                    TAG                              IMAGE ID            SIZE
docker-platform-monitor       latest                           aabdbf5b55b9        569MB
docker-platform-monitor       master.0-dirty-20200114.131506   aabdbf5b55b9        569MB
docker-sflow                  latest                           acc6d9a905f3        306MB
docker-sflow                  master.0-dirty-20200114.131506   acc6d9a905f3        306MB
docker-fpm-frr                latest                           2e17fdf8f565        325MB
docker-fpm-frr                master.0-dirty-20200114.131506   2e17fdf8f565        325MB
docker-syncd-mlnx             latest                           09df8b1f23d7        377MB
docker-syncd-mlnx             master.0-dirty-20200114.131506   09df8b1f23d7        377MB
docker-orchagent              latest                           6729c2e779af        323MB
docker-orchagent              master.0-dirty-20200114.131506   6729c2e779af        323MB
docker-teamd                  latest                           a710f94fa26c        305MB
docker-teamd                  master.0-dirty-20200114.131506   a710f94fa26c        305MB
docker-snmp-sv2               latest                           e4c726145422        339MB
docker-snmp-sv2               master.0-dirty-20200114.131506   e4c726145422        339MB
docker-lldp-sv2               latest                           d67cfab77277        303MB
docker-lldp-sv2               master.0-dirty-20200114.131506   d67cfab77277        303MB
docker-sonic-mgmt-framework   latest                           544660d56163        330MB
docker-sonic-mgmt-framework   master.0-dirty-20200114.131506   544660d56163        330MB
docker-sonic-telemetry        latest                           7df4698f004b        343MB
docker-sonic-telemetry        master.0-dirty-20200114.131506   7df4698f004b        343MB
docker-sonic-restapi          latest                           6834d43af7fb        293MB
docker-sonic-restapi          master.0-dirty-20200114.131506   6834d43af7fb        293MB
docker-router-advertiser      latest                           2fa815e41d75        282MB
docker-router-advertiser      master.0-dirty-20200114.131506   2fa815e41d75        282MB
docker-database               latest                           681324505d5c        282MB
docker-database               master.0-dirty-20200114.131506   681324505d5c        282MB
docker-dhcp-relay             latest                           a3dfa0aa88e9        292MB
docker-dhcp-relay             master.0-dirty-20200114.131506   a3dfa0aa88e9        292MB
Hedgehog-Guru commented 3 years ago

Issue moved to https://github.com/Azure/sonic-buildimage/issues/6426