Ubuntu下网桥设置方法

1、下载网桥设置工具

$sudo atp-get install bridge-utils

3、添加虚拟网卡

$sudo brctl addbr br0

3、修改网卡配置文件

$sudo vi /etc/network/interfaces

# example
# The primary network interface
auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto br0
iface br0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        gateway 192.168.1.254

bridge_ports eth0 eth1
bridge_stp off
bridge_fd 0
bridge_maxwait 0

4、重启网络

$sudo /etc/init.d/networking restart




你可能感兴趣的:(Linux,Tips)