Disclaimer: To this day I've been a lurker, still learning and for the the first time in 2 years, I didn't find any answer to my question, thank you very much for your read and I hope you'll take some time to help
I'm trying to setup two VLANS on my already existing LAN card, the purpose of this setup is to first make a first VLAN work before having everything going through different VLANS for different purposes
Here is my configuration:
Lan card:
cat /etc/netplan/10-enp1s0.yaml network: version: 2 renderer: networkd ethernets:
#LAN CARD config
enp1s0:
optional: true
dhcp4: false
dhcp6: false
addresses: [192.168.1.91/24, ]
gateway4: 192.168.1.254
nameservers:
addresses: [192.168.1.91, ] //I have a DNS on the server
search: [domain.net]
Vlan:
cat /etc/netplan/11-vlan.11.yaml
vlans:
vlan.11:
id: 11
link: enp1s0
optional: true
dhcp4: false
dhcp6: false
addresses: [192.168.1.92/24, ]
nameservers:
addresses: [192.168.1.91, ]
With this configuration, here are the results:
- When I try to ping vlan.11 from enp1s0, or the other way around I have no reply.
- When I try to ping any internet from enp1s0, it works, but when I try with vlan.11, it doesn't work.
8.8.8.8 with enp1s0:
ping -I enp1s0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.1.91 enp1s0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=9.24 ms
8.8.8.8 with vlan.11:
ping -I vlan.11 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.1.92 vlan.11: 56(84) bytes of data.
3 packets transmitted, 0 received, 100% packet loss, time 2039ms
- The last part and the weirdest one is that I'm able to ping both adresses with my a different PC on the same network
Pinging 192.168.1.91 with 32 bytes of data: Reply from 192.168.1.91:
bytes=32 time<1ms TTL=64
Pinging 192.168.1.92 with 32 bytes of data: Reply from 192.168.1.92:
bytes=32 time<1ms TTL=64 Reply from 192.168.1.92: bytes=32 time<1ms
TTL=64
So, can you please explain me why my vlan is not working properly ? What am I missing to have vlan.11 to behave like a network card.
Thank you very much for your read and any help is greatly appreciated.
When I type sudo netplan --debug generate, I see this (don't worry about enp2s0, not configured neither connected for now):
sudo netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:9423): DEBUG: 11:30:08.752: Processing input file /etc/netplan/10-enp1s0.yaml..
** (generate:9423): DEBUG: 11:30:08.752: starting new processing pass
** (generate:9423): DEBUG: 11:30:08.752: Processing input file /etc/netplan/11-vlan.11.yaml..
** (generate:9423): DEBUG: 11:30:08.752: starting new processing pass
** (generate:9423): DEBUG: 11:30:08.752: Processing input file /etc/netplan/20-enp2s0.yaml..
** (generate:9423): DEBUG: 11:30:08.752: starting new processing pass
** (generate:9423): DEBUG: 11:30:08.752: vlan.11: setting default backend to 1
** (generate:9423): DEBUG: 11:30:08.752: Configuration is valid
** (generate:9423): DEBUG: 11:30:08.752: enp2s0: setting default backend to 1
** (generate:9423): DEBUG: 11:30:08.752: Configuration is valid
** (generate:9423): DEBUG: 11:30:08.752: enp1s0: setting default backend to 1
** (generate:9423): DEBUG: 11:30:08.752: Configuration is valid
** (generate:9423): DEBUG: 11:30:08.752: Generating output files..
** (generate:9423): DEBUG: 11:30:08.752: NetworkManager: definition enp1s0 is not for us (backend 1)
** (generate:9423): DEBUG: 11:30:08.752: NetworkManager: definition vlan.11 is not for us (backend 1)
** (generate:9423): DEBUG: 11:30:08.752: NetworkManager: definition enp2s0 is not for us (backend 1)
netplan --debug generate
into a terminal window? – Stephen Boston Jan 10 '20 at 00:49/etc/netplan/20-enp2s0.yaml
in your question -- it is being parsed. – Stephen Boston Jan 10 '20 at 16:32