ubuntu 140.4 配置vlan接口

前端之家收集整理的这篇文章主要介绍了ubuntu 140.4 配置vlan接口前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、安装vlan软件包

sudo apt-get install vlan

2、加载8021q模块

sudo modprobe 8021q

sudo sh -c 'grep -q 8021q /etc/modules || echo 8021q >> /etc/modules'

3、配置vlan子接口

sudo cat /etc/network/interfaces

auto em1.12

iface em1.12 inet static

address 120.52.139.9

netmask 255.255.255.240

gateway 120.52.139.1


auto em1.13

iface em1.13 inet static

address 123.58.236.26

netmask 255.255.255.248


auto em1.16

iface em1.16 inet static

address 223.71.150.91

netmask 255.255.255.248


4、激活vlan子接口

sudo ifup em1 12

sudo ifup em1.13

sudo ifup em1.16

5、重启网络服务

/etc/init.d/networking restarat

原文链接:https://www.f2er.com/ubuntu/351993.html

猜你在找的Ubuntu相关文章