首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

Linux操作系统环境停配置IP、DNS、Gateway

2013-10-18 
Linux操作系统环境下配置IP、DNS、Gateway一、配置IP、Gateway?vi /etc/sysconfig/network-scripts/ifcfg-eth0

Linux操作系统环境下配置IP、DNS、Gateway

一、配置IP、Gateway

?

vi /etc/sysconfig/network-scripts/ifcfg-eth0

# 物理设备名
DEVICE=eth0

# IP地址
IPADDR=192.168.1.10

# 掩码值
NETMASK=255.255.255.0

# 网络地址(可选)
NETWORK=192.168.1.0

# 广播地址(可选)
BROADCAST=192.168.1.255

# 网关地址
GATEWAY=192.168.1.1

# 引导时是否激活设备 [是|否]
ONBOOT=yes # [yes|no]

#非root用户是否可以控制该设备 [是|否]
USERCTL=no #[yes|no]

# 引导时的协议 [无|静态分配|BOOTP协议|DHCP协议]
BOOTPROTO=static #[none|static|bootp|dhcp]

?

二、配置DNS

?

vi /etc/resolv.conf

# 主DNS
nameserver 202.96.209.5

# 次DNS
nameserver 202.96.209.133

?

三、重启网络服务

?

1、# service network restart
2、# /etc/init.d/network restart
3、# ifdown eth0
???? # ifup eth0
4、# ifconfig eth0 down
???? # ifconfig eth0 up

热点排行