静态ip

linux固定静态ip设置

1 修改网卡设置

bear@njava:~$ sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
 
auto etho
iface etho inet static
address 192.168.0.101
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

bear@njava:~$ sudo /etc/init.d/networking start

2 增加DNS

bear@njava:~$ sudo vi /etc/resolv.conf 
nameserver 8.8.8.8
nameserver 192.168.0.1

Tags: ,

星期一, 三月 29th, 2010 服务器 没有评论
1LMooBmUE153Wnd3zDryWvDyXxQudbFxDr