CentOS6.5 network configuration, centos6.5 Configuration
1 Nic description
1) Two NICs:
The first Nic is configured with the Internet: eth0
The second Nic is configured with the Intranet: eth1 (the Intranet should also be configured on the second Nic for machines without the Internet)
2. Default Nic Configuration
1) Default Configuration after installation:
After CentOS 6.5 is installed by default, network connections are not automatically enabled!
2) default IP address diagram:
3) default Nic 1 configuration file.
File Path:/etc/sysconfig/network-scripts/ifcfg-eth0
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Use vi to open it, as shown in.
3. The NIC automatically obtains the IP Address Configuration
Procedure:
1) # vi/etc/sysconfig/network-scripts/ifcfg-eth0
2) Modify ONBOOT = yes.
3) # service network restart # restart the NIC.
4. Configure static IP addresses for NICs
1) edit the configuration file and add and modify the following content
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO = static # enable static IP addresses
ONBOOT = yes # enable network connection automatically
IPADDR = 192.168.21.129 # Set the IP address
NETMASK = 255.255.255.0 # Set the subnet mask
GATEWAY = 192.168.21.2 # Set the GATEWAY
DNS1 = 8.8.8.8 # Set the primary DNS
DNS2 = 8.8.4.4 # Set backup DNS
IPV6INIT = no # Disable IPV6
: Wq! # Save and exit
2) After modification, run the following command:
# Service ip6tables stop # stop IPV6 service
# Chkconfig ip6tables off # disable IPV6 startup
# Service network restart # restart a network connection
# Ifconfig # view IP addresses
Reproduced http://blog.csdn.net/clevercode/article/details/46376985