Solution to the problem that physical NICs in Red Hat Enterprise Linux 5 (rhel5) are occupied by peth0 and cannot be connected to the Internet

Source: Internet
Author: User

Environment: Virtual Machine rhel5 in vmware7 Networking Mode: Bridging

Test the communication between the system and other Linux Hosts in the Virtual Machine in rhel5 in the last two days. The result shows that the system is in the network status, but cannot be pinged. The virtual amd physical network card of VMware is occupied by a peth0 connection. The port connecting eth0 is vmnics. The options in the network have been changed countless times, and the system has restarted for n times, finally, I googled this article on the Internet, which was originally caused by xen.

After setting up step 1 in the reference document, restart rhel5, select the option that does not end with no xen from the Start menu, and the network connection is successful.

 

Post the original text here for reference, the original link http://blog.chinaunix.net/u1/44125/showart_1193359.html

RelatedRHEL 1, 5.0Nic settings

Since the official release of Redhat Enterprise Linux 5.0 in December March 14, 2007, it should be said that the time is not short, and its new feature "xen" virtualization technology is undoubtedly a major highlight, and the release is very timely, but like the SELinux mechanism in the RHEL4 era, this mechanism has never been used in previous RHEL systems. In addition, the strict security control and management rights of SELinux make the system administrator do not know how to set it at the moment, it is a pity to simply close it. The reason is that when a thing appears, if it brings you trouble and increases the workload, it will become disgusted. This is a common feeling. The Application of "xen" Technology on rhel5 is also the same. When administrators contact rhel5, there may be some inconveniences, which may cause inconvenience to work and study, rhel5 is more versatile than RHEL4. From today on, I will share with you the settings of rhel5 different from previous versions.

Problem:Nic for rhel5.0

Environment Introduction:

Hardware: ThinkPad r61 7738 laptop;

System: Dual-system installed, Windows Server 2003/Redhat Enterprise Linux 5

Details:

The host is equipped with two NICs. After installing rhel5, peth0 and other messy interfaces appear, occupying the physical port of eth0, use the ifconfig down/ifdown command to disable other NICs from being invalid. No matter how you unplug the eth0 Nic, ifconfig displays that eth0 is always running, instead, the peth0 interface will display/disappear with the network cable plugging, resulting in the eth0 configuration is also invalid. How can I set it to make peth0 disappear and return the physical Nic to eth0, at the same time, after the system is installed by default, the system will start at least five types of NICs, resulting in inconvenience in using the ifconfig command to view eth0 information, and RedHat in order to keep rhel5 more universal, the netconfig command exclusive to RedHat in RHEL4 is removed, causing great inconvenience When configuring the NIC.

The ifconfig command result is as follows:

Solution:

First, you must set to enable only eth0 and Lo at rhel5 startup. It is necessary to first understand "xen" and what is xen? Xen is an open-source para-virtualizing Virtual Machine (vmm) or "hypervisor" designed for machines with X86 architecture. Xen can safely execute multiple virtual machines on a set of physical hardware. Therefore, xen is actually a program similar to VMware that everyone is familiar, we can virtual install and use slackware, Debian, Gentoo... on fedora ...... and other releases. Because xen is a kernel-based virtual program, it is closely integrated with the operating platform. Compared with Vmware, it occupies about a few percent of the system resources.

After the system is installed by default, the system automatically starts the xen kernel at startup to support virtualization. After the xen is started, the first virtual operating system is the xen itself, we can find a virtual machine with domain 0 through XM list. Domain 0 is the manager and controller of other virtual hosts. Domain 0 can build more other domains and manage Virtual Devices. It can also perform management tasks, such as virtual machine sleep, wake up, and migrate other virtual machines. A server process called xend manages the system through domain 0. xend manages a large number of virtual hosts and provides access to the console of these systems. A command is sent to xend through an HTTP interface using a command line tool. The specific descriptions of each NIC are as follows:

Eth0 is mapped to peth0. The system automatically generates a xenbr0 Nic, which is used to bridge the guestos. vif0.0 refers to the first network of domain0; vif0.1 refers to the second Nic of domain0;

If you do not want to use the xen virtual machine, you can select a kernel without xen at startup, so that these additional NICS will not be generated.

Step 1: Disable the xend process so that it does not start automatically.

1. Use the ntsysv command:

 

2. Run the chkconfig command:

# Chkconfig -- list | grep xend

Xend 0: off 1: off 2: On 3: On 4: On 5: on 6: Off

Xendomains 0: off 1: off 2: On 3: On 4: On 5: on 6: Off

# Chkconfig -- level 2345 xend off

 

 

Step 2: Enable the netconfig command to configure the NIC. To solve this problem, install the netconfig package.

1. Attach a CD:

Mount/dev/CDROM/mntOrMount-T iso9660/dev/CDROM

CD/mnt/servers

Ls netconfig *

2.InstallNetconfigPackage

Netconfig-0.8.24-1.2.2.1.i386.rpm(In the thirdCD)

# Mount/Media/CDROM

# Cd/Media/CDROM/RedHat/RPMS

# Rpm-IVH netconfig-0.8.24-1.2.2.1.i386.rpm

Rpm-IVH netconfig-0.8.24-1.2.2.1.i386.rpm

Now, you can use the netconfig command to set the IP address.

3. You can also directly edit this configuration file.

VI/etc/sysconfig/network-script/ifcfg-eth0

Now, restart the system and we will find that:

The netconfig command can also be used again. This is basically done here. Is it very easy to operate? For a new system, you can quickly master it. Through the rhel5 operation, you will find that, the rhel5 command setting is closer to the Linux operating system. Its modular design ensures that different Linux users can set rhel5 more conveniently, for example, adding the user's command "adduser ", we recommend that you use as many universal commands as possible to set the Linux operating system and lay a good foundation for operating Linux from different vendors in the future.

 

Related Article

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.