CentOS6.5 network configuration, centos6.5 Configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.