先看,
动态:
[root@centosTest ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0TYPE=EthernetONBOOT=yesBOOTPROTO=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 ~]#
有一些更复杂的配置在本主题的另外的博文中介绍