网桥的设置
可以设置为操作系统启动时自动生成网桥。每个发布版中的设置方法都有所不同,这里将介绍Debian系列和RedHat系列。
Debian系列的情况在/etc/network/interfaces中描述。设置static address 0.0.0.0,使得不会对连接到网桥的接口本身设置IP地址。
例4-2/etc/network/interfaces
uto eth0
iface eth0 inet static
address 0.0.0.0
auto eth1
iface eth1 inet static
address 0.0.0.0
auto eth2
iface eth2 inet static
address 0.0.0.0
auto eth3
iface eth3 inet static
address 0.0.0.0
auto br0
iface br0 inet dhcp
bridge_ports eth0 eth1 eth2 eth3
bridge_stp off