RT
如何添加虚拟网卡,在重启之后不会消失的那种?
- Feeriswheel
- 帖子: 38
- 注册时间: 2008-06-21 18:30
- 来自: Beijing
-
- 帖子: 129
- 注册时间: 2007-05-28 5:27
Re: 如何添加虚拟网卡,在重启之后不会消失的那种?
在文件 /etc/network/interfaces 中加。
例如(只是例子,参数要改成你自己的):
===================================
#auto eth0
#iface eth0 inet dhcp
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
mtu 1492
auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user lenovo
auto br0
iface br0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0 tap0
例如(只是例子,参数要改成你自己的):
===================================
#auto eth0
#iface eth0 inet dhcp
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
mtu 1492
auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user lenovo
auto br0
iface br0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0 tap0