Config static ip in debian OS

2010-04-21, Posted in Configure | 9 回复


Config static ip in debian,There are two files need to be modified,the one is “/etc/network/interfaces”,the other is “/etc/resolv.conf”./etc/network/interfaces used to config IP,netmask,gateway and so on,/etc/resolv.conf used to config DNS server address。
these are two examples:

#/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
#iface eth0 inet dhcp
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.180
network 192.168.1.0
netmask 255.255.255.0
gateway 192.168.1.1
#/etc/resolv.conf
nameserver 202.106.0.20
nameserver 202.106.195.68
nameserver 202.106.46.151
search localhost

Note,after modification,please type following command to restart your network.
#/etc/init.d/networking restart

标签: , ,

9 Comments for this entry

你也讲两句吧~