Summary of setting IP addresses in RHEL6

Source: Internet
Author: User


Summary of setting IP addresses in RHEL6 first describes the differences between setting IP addresses in RHEL6 and setting IP addresses in RHEL5. After installing RHEL6, the DHCP automatic acquisition method is selected by default:
[Root @ localhost ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0DEVICE = eth0 // specify the NIC device name: eth0HWADDR = 00: 0c: 29: f9: 67: 5b // specify the physical NIC address: 00: 0c: 29: f9: 67: 5b NM_CONTROLLED = yes // whether the device eth0 can be managed by the Network Manager graphical management tool ONBOOT = no // whether the eth0 device setting takes effect when the Network service starts, the default value is false. BOOTPROTO = dhcp // The start protocol is dhcp automatic acquisition mode. TYPE = Ethernet // The network TYPE is Ethernet mode. USERCTL = no www.2cto.com PEERDNS = yesIPV6INIT = no many habits of RHEL5 friend, I like to use neat, system-config-network and other graphical tools to configure IP addresses. Sorry, I found this is not the case in RHEL6, of course, in RHEL6, in addition to modifying the main configuration file of the NIC, you can also use setup, system-config-network, and other tools to open the tui graphical interface of the NIC. For example, if you enter: system-config-network

Okay. After you click OK, click sav, And sav quit, let's take a look at the current Nic configuration list before starting.

Some may be eager to start the NIC service now, but RHEL5 won't, but after RHEL6's network service is restarted, the ip configuration is wrong.

Where can we find the cause? In the main configuration document of the NIC under RHEL6, the default ONBOOT = no is changed to ONBOOT = yes. Restart the network service again.

Failed, and an error was found: the device was not managed by NetworkManager, resulting in continued solution:
Cause: In the original main configuration document of the network card under RHEL6, there is a line like NM_CONTROLLED = yes by default, which means that the network card eth0 must be hosted by NetworkManager, in this line, yes | the change of the no Switch Control item takes effect immediately. You can change it to "no" and immediately solve the above problem. If you do not want to change it, you can do the same.


After restarting the NetworkManager server, restart the NIC to solve the problem.


Now let's look at the network information of eth0:


Okay, everything is normal. In addition, many friends are particularly confused about Network Manager when using RHEL6 to configure IP addresses. In fact, he is just a network manager for graphical management of network devices in the upper right corner of the screen. It is very convenient to help you manage wireless, ADSL, VPN, etc, service NetworkManager start | stop determines whether you can see it in the upper right corner. In the main configuration file of eth0 NIC: NM_CONTROLLED = yes | no determines whether your eth0 can be hosted by NNetwork Manager. I cut the images changed to yes | no, and you will understand them. When NM_CONTROLLED = yes

When NM_CONTROLLED = no

Conclusion: When NM_CONTROLLED = yes, You need to restart the NetworkManager service and restart the network service to make the NIC configuration take effect, the only advantage is that you can use NetworkManager to manage your Nic devices, such as eth0 and ppp0. When NM_CONTROLLED = no, you want your Nic configuration to take effect, you don't need to restart the NetworkManager service. Simply restart the network service. The only downside is that you cannot use NetworkManager to manage your Nic devices, such as eth0 and ppp0.
 

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.