In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, let's introduce the Linux system to detect IP conflicts and what is the solution. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.
How to detect IP conflicts in Linux systems?
1. Detected by the arping command. Arping 192.168.0.25 Unicast reply from 192.168.0.25 [00:25:e4:6c:4a:ff] 2.390ms
If there is no information to show, my IP is unique on the network.
The solution to the loss of native ip caused by the conflict of network ip under Centos.
two。 Detect whether there are ip conflicts between other hosts in the domain. If you have connectivity and assume that it is caused by ip conflicts, you can scan them using the tool arp-scan, which also uses the arp protocol.
Tool installation command: ubuntu installation command: sudo apt-get install arp-scan centos installation command: yum install arp-scan IP conflict detection command: sudo arp-scan-I eth0-l
The display information is as follows: # arp-scan-I eth0-l # arp-scan-I eth0-l 192.168.1.10 00:1b:a9:63:a2:4c BROTHER INDUSTRIES, LTD. 192.168.1.30 00:1e:8f:58:ec:49 CANON INC. 192.168.1.33 00:25:4b:1b:10:20 Apple, Inc 192.168.1.37 10:9a:dd:55:d7:95 Apple Inc 192.168.1.38 20:c9:d0:27:8d:56 (Unknown) 192.168.1.39 d4:85:64:4d:35:be Hewlett Packard 192.168.1.39 00:0b:46:e4:8e:6d Cisco (DUP: 2) * * 192.168.1.40 90:2b:34:18:59:c0 (Unknown)
We can see that there is an ip conflict between Hewlett Packard and Cisco.
Let's look at an example:
A linux host IP:192.168.0.25 MAC: 00:14:k2:5d:8e:b2
A windows host IP:192.168.0.25 MAC: 00:25:e4:6a:4b:f4
The IP addresses of the two hosts are the same (IP:192.168.0.25) and the MAC addresses are different
Then the windows host prompts the IP address conflict, but the linux host does not.
So how do you know if your linux host conflicts with the IP addresses of other windows hosts in the network?
Actually, it is very simple to execute on the linux host side.
# arping 192.168.0.25
Unicast reply from 192.168.0.25 [00:25:e4:6a:4b:f4] 1.390ms
If there is no information, it means my IP is unique on the network.
If you have the above information, it means that there is a host in the network whose MAC address is 00:25:e4:6a:4b:f4 and the IP address is the same as mine. At this time, you can verify it through the ifconfig command, and you will find that the local MAC address is 00:14:k2:5d:8e:b2. We can use the local area network scanning software to find the host with the MAC address 00:25:e4:6a:4b:f4, and isolate it or change the IP address.
Principle: the arping command sends the arp packets with a broadcast address, and all hosts in the Ethernet will receive the arp packets, but the local machine will not Reply any information after receiving it. When we execute the following command on the linux host:
Arping 192.168.0.25 uses eth0 by default and sends one to all hosts in the LAN:
Arp request,tell 192.168.0.25 your mac address of who has 192.168.0.25
When the windows host receives the arp packets, it replies:
"I am 192.168.0.25, mac is 00:25:e4:6a:4b:f4", so we will receive the Reply message of the windows host whose mac address is 00:25:e4:6a:4b:f4.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is the whole content of Linux system detecting IP conflicts and solutions. More content related to Linux system detection of IP conflicts and solutions can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.