有没有办法如何在不使用vconfig的情况下创建vlan接口?我只有KVM控制台和中继端口连接到机器,所以我不能使用apt,因为我没有互联网访问.我在/ etc / network / interfaces中定义了vlan,但它不起作用,因为没有创建vlan接口.谢谢.
解决方法
ip link add link eth0 name eth0.5 type vlan id 5
不要忘记链接UP:
ip link set eth0 up ip link set eth0.5 up
ip link add link eth0 name eth0.5 type vlan id 5
不要忘记链接UP:
ip link set eth0 up ip link set eth0.5 up