Ubuntu设定静态IP

一、相关配置文件:/etc/network/interfaces
修改前:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp

修改后:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.200.99
netmask 255.255.255.0
gateway 192.168.200.100
auto eth1
iface eth1 inet dhcp

二、启动项 /etc/init.d/networking
重启以使改动生效: sudo /etc/init.d/networking restart

猜你喜欢

转载自cuilji.iteye.com/blog/1432885