Linux网络配置文件
时间:2007-03-29 来源:manyan1985
DNS配置文件
[root@localhost etc]# cat /etc/resolv.conf
nameserver 210.36.16.33
nameserver 202.103.224.68
search localdomain
IP配置文件
[root@localhost etc]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:04:23:C4:9D:0C
IPADDR=192.168.2.86
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
网关
[root@localhost etc]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain //命令行显示的名字,如[root@localhost ~]#
GATEWAY=192.168.2.254 //也可以放在ifcfg-eth0
主机名
[root@localhost patches]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
[root@localhost etc]# cat /etc/resolv.conf
nameserver 210.36.16.33
nameserver 202.103.224.68
search localdomain
IP配置文件
[root@localhost etc]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:04:23:C4:9D:0C
IPADDR=192.168.2.86
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
网关
[root@localhost etc]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain //命令行显示的名字,如[root@localhost ~]#
GATEWAY=192.168.2.254 //也可以放在ifcfg-eth0
主机名
[root@localhost patches]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
相关阅读 更多 +
排行榜 更多 +