Check and troubleshoot common Linux Network Problems

Source: Internet
Author: User
Tags dmesg

1. Nic is not working properly

1) Use the lsmod command to determine whether the NIC is loaded

# Lsmod

2) if not loaded, use the dmesg command to determine whether hardware is detected.

# Dmesg

3) Use ifconfig to determine whether the network settings are normal

2. DNS settings

View the/etc/resolv. conf file to check DNS Configuration

3. Default route settings

Use the route command to view the route table

# Route

If the route settings are incorrect, modify the settings as follows:

# Route del default

# Route add default GW 192.168.0.254

4. One Nic is bound to multiple IP addresses

Run the following command:

# Ifconfig eth0: 0 192.168.0.253

# Ifconfig eth0: 1 192.168.0.252

 

If you want to automatically bind the command when the system starts, you can write these commands to the/etc/rc. d/rc. Local script.

Or

In the/etc/sysconfig/network-scripts/directory, copy the ifcfg-eth0 to ifcfg-eth0: 0, ifcfg-eth0: 1, and make the following changes:

Device = eth0: 0 [1]

Ipaddr = 192.168.0.253 [1, 252]

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.