|
发表于 2009-7-29 13:22:01
|
显示全部楼层
debian 网络设置
三个配置文件 configure file:
/etc/hostname
/etc/network/interfaces //最好把DNS comment
/etc/resolv.conf //dns server
------------------------------------------------------------------
# /etc/network/interfaces //最好把DNS comment
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.158
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
------------------------------------------------------------------
# /etc/resolv.conf //dns server
#search ns.buaa.edu.cn
nameserver 202.106.0.20
------------------------------------------------------------------
ifconfig
ifconfig -a
ifconfig eth0 up
ifconfig eth0 down |
|