Linux Network Administrator experience: Nic needs to be matched (figure)

Source: Internet
Author: User
Article Title: Linux Network Administrator experience: Nic needs to be matched (figure ). Linux is a technology channel of the IT lab in China. Includes desktop applications, Linux system management, kernel research, embedded systems and open source, and other basic categories. I am a Linux Network Administrator, network topology 1. There are two key servers in the LAN, one is the master server, the other is the backup server, and the middle is connected through the heartbeat line. Server A uses the red-flag Linux 4.0 as the file server.

A heartbeat line is A network cable used to connect two servers, A and B. Of the two servers A and B, A is the working machine and B is the backup machine. Two NICs are configured on the server, one of which is used for communication between two servers (nodes. The software installed on the server monitors the running status of the other Party in real time through the heartbeat line. Once the system detects a Server failure during running, all processes on the server can be transferred to the backup server to provide uninterrupted services to the customer. At the same time, it also has an intelligent detection and processing system for system crashes. It can detect faults of hardware, storage devices, networks and system software by various means. This ensures the normal operation of the network to the maximum extent, which is also called "Heartbeat detection ". The heartbeat line is mainly completed by a RS-233 detection link. The ping command is used to verify the accuracy of the system down detection.

One day, it was found that the network adapter connecting Linux server A to the heartbeat line experienced A physical fault due to hardware wear and Aging (RTL8139AS, 100 M. Then, go to the computer market to purchase the most common 10 Mb/Mb adaptive NIC-Realtek multi-function module (Multifunction Mode) Single-Chip RTL 8139D (L) Nic. It is compatible with almost all major Linux releases. The installation process is smooth and the system automatically identifies it. Both machines can run normally. After the IP address of the network adapter is set, it is found that the connection between server A and server B through the heartbeat line is not allowed. Because the heartbeat line is connected to the network card to detect the server status, you should focus on viewing the network card status and configuration of each machine's heartbeat line connection. Check that the network card status is correct, nic lights are also on. Is the network cable not plugged in or is there a problem? The original network cable is replaced with a normal network cable again, but the heartbeat line between the two servers is still disconnected. So far, hardware problems have been basically ruled out. It is estimated that there is still a problem with the NIC settings. Enter the NIC status options of the two machines and compare the NIC status of the two machines one by one.


1. First, check the current working mode of the network adapter of Linux Server A. Enter the following command:

# Mii-tool-v
Eth0: negotiated 100baseTx-FD, link OK
Product info: vendor 00:00:00, model 0 rev 0
Basic mode: autonegotiation enabled
Basic status: autonegotiation complete, link OK
Capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
From the above information, we can see that this network card works in 10 M Full Duplex adaptive mode, "10 basetx-fd" means 10 M Full Duplex. Server B connects to the heartbeat Nic In the full duplex status of 100 Mbit/s.

In the past, server A and server B used 10/100 Mbit/s adaptive Ethernet cards with A design speed of 100 Mbit/s. After server A changes the new Nic, the NIC will automatically select the 10 m full-duplex adaptive mode. The network is disconnected because the network interfaces on both sides are in different working statuses.

2. Run the following command to modify the NIC working mode:

# Mii-tool -- help
Usage: mii-tool [-VvRrwl] [-A media,... |-F media] [interface...]
Media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
(To advertise both HD and FD) 100 baseTx, 10 baseT
Media optional modes include 100baseTx-FD, 100baseTx-HD, 10baseT-FD, and 10baseT-HD. Interface indicates the selected Nic, such as eth0 and eth1. The default value is eth0.

3. Modify the NIC to work in 10 m duplex mode. Enter the command: # mii-tool-F 100baseTx-FD eth0

Run the ping command to check the connection status. The result shows that the connection is normal and the problem is solved.

At present, there are many adaptive NICs. According to the principle, they should be able to correctly adapt to the speed and duplex mode. However, due to brand inconsistency, full duplex mode is often not implemented correctly. Only manual settings are required. Therefore, when setting network device parameters, we must refer to the network device parameters on the server or other workstation to try to match each device. In addition, it is recommended that you set an initial rate when using an adaptive Nic, and the speed on both sides should be the same, rather than adaptive. The speed setting usually causes network interruption.

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.