I have been trying to create a vlan interface on my ubuntu VM which has one network adapter.
I could see that the vlan link has been successfully created, but I don't see any traffic passing through. Could it be due the similar mac address on both the links. Here is my netplan config along with ifconfig and ip link output.
netplan yaml
network:
ethernets:
ens160:
addresses:
- 172.16.1.227/24
gateway4: 172.16.1.1
nameservers:
addresses:
- 8.8.8.8
vlans:
v.206:
id: 206
link: ens160
addresses:
- 172.16.206.211/24
gateway4: 172.16.206.1
macaddress: 00:00:00:00:02:06
ifconfig
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.1.227 netmask 255.255.255.0 broadcast 172.16.1.255
inet6 fe80::20c:29ff:fe1d:a540 prefixlen 64 scopeid 0x20
ether 00:0c:29:1d:a5:40 txqueuelen 1000 (Ethernet)
RX packets 15251 bytes 1755640 (1.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3954 bytes 2834818 (2.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 118 bytes 9478 (9.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 118 bytes 9478 (9.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
v.206: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.206.211 netmask 255.255.255.0 broadcast 172.16.206.255
inet6 fe80::20c:29ff:fe1d:a540 prefixlen 64 scopeid 0x20
ether 00:0c:29:1d:a5:40 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 60 bytes 4112 (4.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Ip link output
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:0c:29:1d:a5:40 brd ff:ff:ff:ff:ff:ff
3: v.206@ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 00:0c:29:1d:a5:40 brd ff:ff:ff:ff:ff:ff