debian网络配置文件的写法

参考文档:http://www.linuxdiyf.com/viewarticle.php?id=85304

初始文件:

# 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
iface lo inet loopback


使用静态IP,加入以下内容(将地址,子网掩码,网关换成你要设定的值)

# Static IP
auto eth0
iface eth0 inet static
address 10.0.1.250
netmask 255.255.0.0
gateway 10.0.0.1


使用DHCP

# DHCP
auto eth0
iface eth0 inet dhcp

posted on 2009-08-23 16:56  ddper  阅读(208)  评论(0编辑  收藏  举报

导航