[LAN] LAN configuration

1. The configuration file corresponding to the card: / etc / sysconfig / network-scripts / ifcfg-eth3

[root @ Oldboy ~] # CAT / etc / sysconfig / Network-scripts / the ifcfg-eth3 
the TYPE = Ethernet -> Internet type, there are basically Ethernet 
PROXY_METHOD = none 
BROWSER_ONLY = NO 
BOOTPROTO = static 
DEFROUTE = yes 
IPV4_FAILURE_FATAL = NO 
IPV6INIT = yes -> whether ipv6 support 
IPV6_AUTOCONF = yes 
IPV6_DEFROUTE = yes 
IPV6_FAILURE_FATAL = NO 
IPV6_ADDR_GEN_MODE = stable- Privacy 
NAME = eth3 
the DEVICE =eth3 -> first NIC logical device named eth0, the second block is eth1; some systems will identify with characters such as em 
ONBOOT = yes -> The place to be is yes, in order to ensure that the next boot device to activate the card 
HWADDR = 08: 00: 27 :. 4C: 6F: AD -> Ethernet hardware address, mac address, clone if it is vmware virtual machine can not start card, you can not hesitate to delete this 
IPADDR = 192.168.0.109 - -> fixed ip bridge mode virtual machine, the server LAN linux 
NETMASK = 255.255.255.0 -> subnet mask, to plan the network and host bits, typically 255.255.255.0 
the DNS1 = 8.8.8.8 -> main dns here will override the default priority and entered into force in /etc/resolv.conf configuration
 gATEWAY = 192.168.0.1 -> LAN Internet gateway address 
# DNS2 = 192.168.0.1 
USERCTL = NO   
[Oldboy the root @ ~] # CAT / etc / sysconfig / Network-scripts / the ifcfg-eth0 
the DEVICE = eth0 
the HWADDR = 08: 00: 27: 10: A5: 56 is 
the TYPE = Ethernet 
the UUID = e1aa5279-e4c6-45af-8cbc- a63e5fa2b35d -> universal unique identifier (universal unique identifier), if a cloned virtual machine can not start card, you can remove this. 
ONBOOT = yes 
NM_CONTROLLED = yes -> whether by NetworkManager management LAN equipment 
BOOTPROTO = dhcp -> Initiation Protocol, access configuration, there is none | bootp | dhcp three options. 
USERCTL = NO 
IPV6INIT = NO 
PEERDNS = yes

More knowledge NIC configuration View: less /usr/share/doc/initscripts-9.03.49/sysconfig.txt 

 

2. card entry into force:

  ifup eth0 to start eth0 NIC

  ifdown eth0 eth0 NIC Close

Or: /etc/init.d/network restart to restart all network cards

 

If the card configuring the DNS, takes precedence over the /etc/resolv.conf configuration and reboot the network card, will /etc/resolv.conf in coverage.

 

3. setup command -> network configiration card configuration file is

Guess you like

Origin www.cnblogs.com/zoe233/p/11899717.html