Ubuntu/Linux 配置 Vlan

很久以前配置过,后来都是基于管理交换机配置;今天被逼无奈,又一次必须使用,怎么也弄不好,原来配置方式变了,郁闷!!

#开启内核支持
modprobe 8021q
echo "8021q" >>/etc/modules

#安装配置工具
aptitude install vlan

#增加虚拟接口
vconfig add eth1 30

以下内容添加到 /etc/network/interfaces

auto eth1

auto eth1.30
iface eth1.30 inet static
    address 10.20.30.19
    netmask 255.255.255.0
    network 10.20.30.0
    broadcast 10.20.30.255
文章作者: 若海; 原文链接: https://www.rehiy.com/post/108/; 转载需声明来自技术写真 - 若海

添加新评论