Chinaunix

标题: Debian的IP设置 [打印本页]

作者: sdccf    时间: 2008-04-26 14:19
标题: Debian的IP设置

作者: dzajk  出自: http://www.linuxdiyf.com
1. IP地址设置
debian:~#vi /etc/network/interfaces
// 动态DHCP获得
# 启动系统激活设备.
# Loop回环地址.
auto lo
iface lo inet loopback
# 启动系统激活设备.
# 网卡eth0设置为DHCP类型.
auto eth0
iface eth0 inet dhcp
// 静态Static获得
# 启动系统激活设备.
# Loop回环地址.
auto lo
iface lo inet loopback
# 启动系统激活设备.
# 网卡eth0设置为Static类型.
auto eth0
iface eth0 inet static
# 指定IP地址.子网掩码.广播.网关.
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x
2. DNS地址设置
debian:~#vi /etc/resolv.conf
// 必须设置.否则无法访问任何URL
nameserver x.x.x.x
nameserver x.x.x.x
3. 配置完了之后重新启动网络
debian:~#/etc/init.d/networking restart

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31/showart_586946.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2