Description
Description
VLAN sub interfaces are not attached to VNET and appear in the global routing table.
Steps to reproduce the issue:
- 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