ubuntu设置vlan

sudo apt-get install -y vconfig

sudo ip link add link p3p1 name p3p1.1312 type vlan id 1312

sudo ip link set p3p1 up
sudo ip link set p3p1.1312 up

sudo ip addr add 10.133.12.105/24 dev p3p1.1312

sudo ip route delete default via 10.254.3.1
sudo ip route add default via 10.133.12.254
sudo ip route list

你可能感兴趣的:(ubuntu,VLAN)