Debugging experience-network

Source: Internet
Author: User

Debugging experience-network

I have been using linux for many years on the davinci platform. I encountered many problems during the debugging process and stumbled. Today, I have also summarized some experience, which is not a complete formal solution, however, you may be able to give some reference or reference to students who encounter similar problems.

I. Several Common Network Setting commands

Configure IP address and subnet mask
Ifconfig eth0 192.168.1.237 netmask 255.255.255.0

Set Gateway
Route add default gw 192.168.1.1

Set MAC:
Ifconfig eth0 hw ether 20: 00: 00: 02: FF

Force MB
Ethtool-s eth0 speed 100 duplex full
Note: Once the NIC driver problem occurs, it can be adaptive to GB, but it can only work normally under MB. At this time, this force MB is very useful.

In windows,
Force 100 MB: on the local connection properties page, configure-advanced-speed to specify MB
Configure multiple IP addresses for one network adapter: On the properties page of the local connection, add a new ip address to the TCP/IP attribute "advanced.
Note: The company CIDR block is different from the card CIDR block. It is very troublesome to switch the IP address of the PC back and forth! Then you can set up several more IP addresses for communication.

2. Poor network communication, especially when multiple boards run simultaneously, the network is easily disconnected.

Analysis: If the hardware problem can be ruled out, it should be a network conflict. Network conflicts: IP conflicts and MAC conflicts.
After detection, it is determined that the MAC address is in conflict. The MAC address configured in uboot is useless. It is re-specified after linux is started.
Manually set MAC:
Ifconfig eth0 hw ether 20: 00: 00: 02: FF
Solve the problem temporarily.
Later, I modified it to read the configuration file in the application to set the MAC to solve the problem.

Complete IP address management methods:
An IP table should be created for multiple devices. The IP address and MAC address of each device are recorded and cannot be changed at will. If someone changes the IP address table, modify the table accordingly and notify all relevant personnel.

3. Network Multicast failure
Symptom: After the multicast program is compiled, it runs on the Linux server and can communicate with the search device of the Management Program, but cannot run on the board.

Modification steps:
1. Change the card kernel to allow multicast.
2. After configuring the IP address of the board, add the route and run the following command on the Board:
Route add-net 224.0.0.0 netmask 240.0.0.0 dev eth0
Then run the application.
3. Later, the network route is configured in the application: First read the IP address in the configuration file, call ifconfig to set the IP address, then use system to call route to add a route, and then perform the multicast operation.

4. view the NIC indicator to analyze network faults:

Observe that there are two indicators on the backend RJ45 side of the NIC. They are connection status indicators and signal transmission indicators respectively. In normal conditions, the connection status indicators are green and bright, and the signal indicators are red. Normally, they should not stop flashing.

If we find the connection indicator light, that is, the green light is not on, it indicates that the connection between the nic and the hub or switch is faulty.
To solve this problem, you can use the tester to perform segmentation troubleshooting. If multiple modules are interconnected from the switch to the NIC, you can use the binary method to quickly locate the problem. In general, this fault occurs mostly because the network cable is not firmly connected and the inferior crystal head is used. In addition, most of the fault points have problems at both ends of the connection. For example, the connection between the port of the switch and the network adapter connecting to the computer can be easily solved by using the tester.

If the indicator light is not on, it indicates that there is no signal for transmission, but it is certain that the line is normal.
If there is a signal transfer, use the replacement method to switch the network cable connected to the computer to another computer, or use a tester to check whether there is a signal transfer. If there is a signal transfer, it is a problem with the local Nic. In practice, it is proved that it is a common fault that the NIC causes no information transmission. In this case, you can first check whether the NIC is installed normally and whether the IP address is set incorrectly. You can Ping the IP address of the Local Machine. If you can Ping the general rules, the NIC is normal. If the problem persists, you can try to reinstall the NIC Driver. In addition, if you use an integrated Nic or a poor quality Nic, it is prone to instability, that is, all the settings are correct, however, the network is disconnected. You can disable the NIC and then enable it again, which also has unexpected results.

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.