Linux system network connection FAQ diagnosis

Source: Internet
Author: User
Article title: Linux system network connection FAQ diagnosis. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Even if the network is configured step by step according to the operating instructions of the Linux system, the network may still fail to be connected smoothly. This is mainly because the network configuration is quite complicated. Sometimes experience may be more useful than technology in the case of network problems. There are many reasons why Linux cannot access the Internet. I will list some common network faults and solutions to help the Linux system administrator quickly locate network errors and resume normal network operation in a timely manner.

  Step 1: Use the Ipconfig command to determine the basic Nic configuration.

When the operating system cannot access the internet normally, the first choice for the Linux system administrator is to check whether the current Nic configuration is correct. The Ipconfig command can help the system administrator confirm the face-to-face configuration of the NIC. If the IPconfig command displays the result. How can I determine whether the display result is normal? The author provides some ideas for your reference.


Insert: IPconfig command diagram.

1. if an enterprise uses dynamic IP address allocation, the administrator must first determine whether the Liunxu host has obtained the IP address from the DHCP server. This mainly depends on whether the current IP address of the NIC is the same as the IP network segment planned by the DHCP server. If the Linux host cannot connect to the DHCP server or obtain an IP address from it (for example, the IP address of the DHCP server is used up), the IP address displayed here is usually 0.0.0.0. in this case, the system administrator needs to check the connection between the NIC and the DHCP server. You can also query the IP address pool usage of the DHCP server.

2. determine whether the current network parameter settings are correct. Generally, if you use an automatically assigned IP address, this address will not be wrong if it is obtained. If something goes wrong, all hosts in the Lan will be unable to access the Internet. However, if the IP address is manually configured, the configuration may be incorrect. If an IP address is automatically assigned, you only need to check whether the network parameters are obtained from the DHCP server. However, for manual allocation, you also need to determine whether these parameters are accurate. It mainly checks the IP address, subnet mask, default gateway, and DNS configuration. This is the most prone to errors. In particular, the IP address should pay attention to whether it conflicts with the current IP addresses of other hosts, and whether it is in the specified CIDR block.

3. In addition, sometimes the administrator is lucky enough to have a backup and may encounter a situation where the NIC is not started properly (if the NIC driver is not correctly installed or the NIC is temporarily disabled ). At this time, the network administrator often needs to manually restart the network card. To manually restart the NIC, run the/etc/rc. d/init. d/network restart command. This command tells Linux to restart all network interfaces. After running this command, run the Ifconfig command again to check whether the NIC is started properly. If it still cannot be started, the Linux system administrator needs to consider whether it is a hardware fault of the NIC or the main version. You can try again or change the network card.

In addition, the two commands also need to be described. First, the function of the ifconfig command is similar to that of the command in Windows, but its usage is slightly different. In Windows, the ifconifg command has an ALL option that displays detailed IP configuration information. When using this command, if the parameter is not included, only the IP address, subnet mask, and other information are displayed. However, if this parameter is included, DNS and other information are also displayed. This requires special attention during use. In Linux, this command does not have this parameter, and displays detailed IP configuration information directly. Second, the NIC restart command requires certain permissions, such as root permissions. Otherwise, it will be rejected by the system.

[1] [2] [3] Next page

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.