/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/resolv.conf
/etc/hosts

以下是我的设置
/etc/sysconfig/network
这里主要是指定了网关
NETWORKING=yes
NETWORKING_IPV6=no
GATEWAY=192.168.1.1
HOSTNAME=localhost.localdomain

/etc/sysconfig/network-scripts/ifcfg-eth0
这里主要指定IP获得方式(static),ip地址,子网掩码,网络类型
# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE=eth0
#BOOTPROTO=dhcp
BOOTPROTO=static
IPADDR=192.168.1.21
NETMASK=255.255.255.0
TYPE=Ethernet
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
/etc/resolv.conf

指定DNS
search localdomain
nameserver 192.168.1.1
Tags: ,
centos | 评论(0) | 引用(0) | 阅读(7636)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]