I have three questions about configuring a VLAN in VyOS (long time VyOS user, first time using VLANs):
First, if configuring four VLANs/sub-interfaces (vif IDs 100, 200, 300, and 900 with IPs 172.20.10.1/24, 20.1/24, 30.1/24, and 90.1/24) on a physical interface (eth2), is it necessary to have a non-VLAN interface IP address, too? Or can the interface itself be without an IP address, while the VLANs provide all the IP addresses necessary. For example, is the following valid?
eth2 {
vif 100 {
address 172.20.10.1/24
}
vif 200 {
address 172.20.20.1/24
}
vif 300 {
address 172.20.30.1/24
}
vif 900 {
address 172.20.90.1/24
}
}
Or does eth2 have to have its own IP address, too, like the following?
eth2 {
address 172.20.1.1/24
vif 100 {
...
}
What is the purpose of this IP address on the master interface if no other devices will have IP addresses on its subnet? What is the side effect of not having this IP address on the master interface? I see examples with this IP address but no explanation of its purpose, and I also see examples without it.
Second, is it appropriate for me to have all the DHCP subnets for these VLANs on the same shared network name, as below? VyOS warns me that this implies they’re on the same physical network when I commit, but if I understand correctly, they are on the same physical network. Am I doing something wrong here?
shared-network-name BONDED_PORTS {
...
subnet 172.20.10.0/24 { ... }
subnet 172.20.20.0/24 { ... }
subnet 172.20.30.0/24 { ... }
subnet 172.20.90.0/24 { ... }
}
Finally, given that I’ve enabled SSH but haven’t yet set up my firewall (I’m not yet connected to a public network, so there’s no danger), should I not be able to ping 172.20.10.1 or SSH into VyOS through 172.20.10.1 from a client that successfully got the IP address 172.20.10.22 from the DHCP server? Because I can’t ping or SSH.