Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
auto eth0
iface eth0 inet static
	address 192.168.1.100
	netmask 255.255.255.0
	gateway 192.168.1.1
	udhcpc_opts -t 1 -S
	dns-nameserver 8.8.8.8
	dns-nameserver 8.8.4.4


无线和有线桥接

当使用WiFi无线网络时,需要与eth0桥接

Code Block
iface br0 inet dhcp
	bridge_ports eth0 wlan0
	pre-up ifconfig eth0 0.0.0.0 up
	pre-up ifconfig wlan0 0.0.0.0 up
	pre-up iwconfig wlan0 mode master
	pre-up brctl addbr br0
	pre-up brctl addif eth0
	pre-up brctl addif wlan0
	post-down ifconfig eth0 0.0.0.0 down
	post-down ifconfig wlan0 0.0.0.0 down
	post-down brctl delif br0 eth0
	post-down brctl delif br0 wlan0
	post-down brctl delbr br0