先看,
动态:
[root@centosTest ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
[root@centosTest ~]#
[root@pacteralinux ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0DHCP_HOSTNAME=linuxDEVICE=eth0ONBOOT=yesDHCP=yesBOOTPROTO=dhcpTYPE=EthernetUSERCTL=noPEERDNS=yesIPV6INIT=no
静态:
[root@uyhd000225 ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=10.135.55.210NETMASK=255.255.240.0[root@uyhd000225 ~]#
[root@centosTest ~]# more /etc/sysconfig/network-scripts/ifcfg-bak/ifcfg-eth0DEVICE=eth0TYPE=EthernetONBOOT=yesBOOTPROTO=staticIPADDR=10.13.2.113NETMASK=255.255.255.0GATEWAY=10.13.2.1[root@centosTest ~]#
有一些更复杂的配置在本主题的另外的博文中介绍
本文出自 “从运维到ETL” 博客,请务必保留此出处http://fuwenchao.blog.51cto.com/6008712/1340695