Configuration of xarxa cards
Creation
sudo ip link add link enp1s0 name enp1s0.10 type vlan id 10
sudo ip link add link enp1s0 name enp1s0.20 type vlan id 20
sudo ip link add link enp1s0 name enp1s0.30 type vlan id 30
Encendre les tarjetes
sudo ip link set enp1s0.10 up
sudo ip link set enp1s0.20 up
sudo ip link set enp1s0.30 up
Reiniciarem
sudo systemctl restart networking.service
Next we will look at whether they are connected or not.
ip a | grep enp1s0
On veiem that there are other creations, per see that hi has ping between them farem
ping -c 4 192.168.1.1 # VLAN 10 (users)
ping -c 4 192.168.1.65 # VLAN 20 (servers)
ping -c 4 192.168.1.97 # VLAN 30 (admin)
Next, configure the traffic between the vlans for the Internet connection between them, in this configuration
A copy of this configuration will tend to be sent to the internet