In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article to share with you is about Linux how to achieve local area network network devices communicate with each other, Xiaobian think quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.
In the local area network, there are several extensions running on linux (different network segments from the host linux), and the network segments of these hosts have no route in the whole local area network. Any host in the local area network cannot communicate with it, as shown in the above figure. This can only be done by jumping to the host and then connecting from the host.
Problem solving:
It can be seen that the host IP of 10.8.1.84 can communicate in the test, but the following 172.17.0.1 network segment is unreachable by any node in the local area network. You can only connect to hosts on the 172.17.0.1 segment by connecting to 10.8.1.84 first
Solution:
Add the network segment you want to access to the windows routing table, and the next hop points to the ip of the host. Because only hosts can communicate with hosts on this segment
route -p add 172.17.0.0 mask 255.255.0.0 10.8.1.84
Verification:
Problem: there are some tp-link routers in the local area network that connect devices next time, but there is a strange phenomenon. tp-link devices attached can communicate with any device in the local area network (ping reachable), but devices in the local area network cannot communicate with attached devices (ping unreachable)
Analysis: tp-link wireless small router is equivalent to a device with nat function, because the ip of wan port of router is reachable ip in local area network, but lan port under router includes ip obtained by wireless device from tp-link. ip segment is generally ip of another network segment. this ip segment has no route in real local area network, so device under wifi can ping any device in local area network, but any device in local area network cannot ping device under wifi.
Because the tp-link router thinks that the devices under the lan port need to access the internet, and tp-link will convert the nat of these devices under the lan port into the existing ip of the local area network, that is, the ip of wan. When a device in the local area network needs to access a device under WiFi, the device in the local area network cannot access the device under WiFi because tp-link does nat. You can only do virtual server (port mapping) in tp-link, map the port of the device connected under tp-link, and map it out with ip of wan port (ip identifiable by local area network), so that other devices in local area network can access the device connected under wifi.
The above is how to realize the communication between network devices in the local area network in Linux. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.