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

[VNET] VLAN sub interface RIFs are not assigned to VNET #4238

Closed
veber-alex opened this issue Mar 9, 2020 · 1 comment · Fixed by sonic-net/sonic-swss#1642
Closed

[VNET] VLAN sub interface RIFs are not assigned to VNET #4238

veber-alex opened this issue Mar 9, 2020 · 1 comment · Fixed by sonic-net/sonic-swss#1642
Labels
Help Wanted 🆘 Issue for 201911 P1 Priority of the issue, lower than P0

Comments

@veber-alex
Copy link

Description

VLAN sub interfaces are not attached to VNET and appear in the global routing table.

Steps to reproduce the issue:

  1. Load the following two configurations:
{
        "VXLAN_TUNNEL": {
                "tunnel_v4": {
                        "src_ip": "10.1.0.2" 
                }
        },
        "VNET": {
                "Vnet210": {
                        "vxlan_tunnel": "tunnel_v4",
                        "vni": "210",
                        "peer_list": "" 
                },
                "Vnet215": {
                        "vxlan_tunnel": "tunnel_v4",
                        "vni": "215",
                        "peer_list": "" 
                },
               "Vnet800": {
                        "vxlan_tunnel": "tunnel_v4",
                        "vni": "800",
                        "peer_list": "" 
                },
               "Vnet900": {
                        "vxlan_tunnel": "tunnel_v4",
                        "vni": "900",
                        "peer_list": "" 
                }
        },
        "VLAN_SUB_INTERFACE": {
                     "Ethernet124.210": {
                       "vnet_name": "Vnet210" 
                },
                     "Ethernet124.215": {
                       "vnet_name": "Vnet215" 
                }
        }
}
{
        "VLAN_SUB_INTERFACE": {
                "Ethernet124.210|172.2.10.254/24": {},
                "Ethernet124.215|172.2.15.254/24": {}
        }
}

Describe the results you received:

The RIFs are not attached to VNET and show in global routing table:

root@ptr-orion-t2:~/vnet/vnet_sub_eth# show ip int
Interface        Master    IPv4 address/mask    Admin/Oper    BGP Neighbor    Neighbor IP
---------------  --------  -------------------  ------------  --------------  -------------
Ethernet124.210            172.2.10.254/24      up/up         N/A             N/A
Ethernet124.215            172.2.15.254/24      up/up         N/A             N/A
root@ptr-orion-t2:~/vnet/vnet_sub_eth# show ip r
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

K>* 0.0.0.0/0 [0/202] via 10.130.0.1, eth0, 00:14:38
C>* 10.1.0.2/32 is directly connected, Loopback0, 00:14:38
B>* 10.1.0.3/32 [20/0] via 10.100.0.17, PortChannel1, 00:13:11
  *                    via 10.100.0.19, PortChannel2, 00:13:11
  *                    via 10.100.0.21, PortChannel3, 00:13:11
  *                    via 10.100.0.23, PortChannel4, 00:13:11
B>* 10.1.1.1/32 [20/0] via 10.100.0.17, PortChannel1, 00:13:11
  *                    via 10.100.0.19, PortChannel2, 00:13:11
  *                    via 10.100.0.21, PortChannel3, 00:13:11
  *                    via 10.100.0.23, PortChannel4, 00:13:11
C>* 10.100.0.16/31 is directly connected, PortChannel1, 00:13:28
C>* 10.100.0.18/31 is directly connected, PortChannel2, 00:13:27
C>* 10.100.0.20/31 is directly connected, PortChannel3, 00:13:27
C>* 10.100.0.22/31 is directly connected, PortChannel4, 00:13:27
C>* 10.130.0.0/16 is directly connected, eth0, 00:14:38
C>* 12.144.0.0/16 is directly connected, Vlan200, 00:13:28
B>* 14.144.0.0/16 [20/0] via 10.100.0.17, PortChannel1, 00:13:11
  *                      via 10.100.0.19, PortChannel2, 00:13:11
  *                      via 10.100.0.21, PortChannel3, 00:13:11
  *                      via 10.100.0.23, PortChannel4, 00:13:11
C>* 172.2.10.0/24 is directly connected, Ethernet124.210, 00:10:49
C>* 172.2.15.0/24 is directly connected, Ethernet124.215, 00:10:49

Describe the results you expected:
VLAN interface RIF should work with VNET the same way other RIF types.

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**
SONiC Software Version: SONiC.201911.0-c15674ee
Distribution: Debian 9.12
Kernel: 4.9.0-9-2-amd64
Build commit: c15674ee
Build date: Mon Feb 17 09:31:47 UTC 2020
Built by: stepanb@r-build-sonic03

Platform: x86_64-mlnx_msn2700-r0
HwSKU: Mellanox-SN2700-D48C8
ASIC: mellanox
Serial Number: MT1811X06319
Uptime: 09:12:37 up 6 days, 20:06,  2 users,  load average: 3.14, 3.26, 3.54
@liat-grozovik
Copy link
Collaborator

@rlhui and @lguohan any plan to handle this for 201911?

shi-su pushed a commit to sonic-net/sonic-swss that referenced this issue Nov 23, 2021
…net (#1642)

What I did
Extended the following vs tests to validate the use case of sub interface ingress linked to a vnet:

sub port interface creation
sub port interface add ipv4 addresses
sub port interface admin status change
sub port interface remove ipv4 addresses
sub port interface removal

Why I did it
Add vs test to validate that #1521 fixes sonic-net/sonic-buildimage#4238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted 🆘 Issue for 201911 P1 Priority of the issue, lower than P0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants