Solve the problem that the Nic cannot be pinged in the CentOS system.

Source: Internet
Author: User
Yesterday, I received a task where one network card (intranet/multiple network cards) on a server cannot communicate with other servers. I want to confirm the problem. In other words, I have never been exposed to such problems. I don't know how to start it. I am not very familiar with packet capture and network. I can only ask for advice from our friends. We would like to thank luffy, bikong, and zero for their help. Analysis

Yesterday, I received a task where one network card (intranet/multiple network cards) on a server cannot communicate with other servers. I want to confirm the problem. In other words, I have never been exposed to such problems. I don't know how to start it. I am not very familiar with packet capture and network. I can only ask for advice from our friends. We would like to thank luffy, bikong, and zero for their help.

The problem is analyzed and cannot be pinged. first, I checked whether there was a problem with the Nic configuration. then I compared the configurations on several servers and confirmed that there was no problem with the configuration. Then the friends told me to capture the package and see if there is any arp... I won't capture the packet. later, google found the following command,TcpdumpArp. then, log on to the faulty server,

For example:

Sister's, I didn't receive any arp packets .. It hurts .. To compare the status of normal servers.

Normally, the following information is output. It indicates that the NIC is working OK.

In comparison, arp-n

[Problematic]

[Normal]

View dmesg information

[Problematic]

[Normal]

Fault cause:

1. intranet network cable problems

2. problems with vSwitch ports connected to the intranet network cable

3. emxx bug. solution:

(1) add the start parameter biosdevname = 0 in grub, such as kernel/vmlinuz-2.6.32-131.21.1.el6.i686 ro roo biosdevname = 0

# Vi/etc/grub. conf
Kernel/vmlinuz-2.6.32-279.el6.x86_64 ro root = UUID = export nomodeset rd_NO_LUKS KEYBOARDTYPE = pc KEYTABLE = us LANG = en_US.UTF-8 rd_NO_MD SYSFONT = latarcyrheb-sun16 crashkernel = auto export rd_NO_DM rhgb quiet biosdevname = 0

(2) delete the udev configuration file rm-f/etc/udev/rules. d/70-persistent-net.rules

(3) rename the Nic configuration file mv/etc/sysconfig/network-scripts/ifcfg-em1/etc/sysconfig/network-scripts/ifcfg-eth0

(4) modify the content of the NIC configuration file and change all em1 to eth0. perl-p-I-e's/em1/eth0/g' ifcfg-eth0

(5) restart the system and then restart the service network restart.

====================================== My analysis problem method ================ ====================

Ensure that the network cable and switch machine ports are correct:

[Root @ hiker vhosts. d] # mii-tool em1
Em1: negotiated 100baseTx-FD flow-control, link OK
[Root @ hiker vhosts. d] # mii-tool em2
SIOCGMIIPHY on 'em2' failed: Resource temporarily unavailable

1. view the route table information. Route table view command

Netstat-rn

2. if the route table is normal, simply replace the configurations of the two NICs to see if a Nic is faulty. when changing the configurations, check whether each item is correctly changed. My replacement method:

1) The first step to back up the configuration of the two NICs, such as the ifcfg-em1 ifcfg-em2 to back up the ifcfg-em11ifcfg-em22, please do not back up em1.bak and the like, will report an error at startup, it is bad

2) configure the two NICs in step 2, and correct the DEVICE, HWADDR, IPADDR, and UUID information. Proceed with caution...

3) in step 3, set the ONBOOT configurations of the remaining NICs to no to avoid starting the remaining enable when the NICs are restarted.

4) Step 4: write a script to ensure that the script can be restored when an error occurs in the above steps, and then place the script in the scheduled task. O & M personnel, you know, and try to restore each step.

5) NOW, make sure the above is correct, and you can start the service network ....

3. in the above two steps, we can roughly analyze whether the network card is faulty ....

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.