In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
[preface]
Communication between two virtual machines on a computer is currently being done.
For each virtual machine, there are two network cards, one bridge mode and one NAT mode.
So here's the problem.
If you use a simple command in the form of ping ip to get the result of ping, which can only prove that two virtual machines can communicate with ping, which network card is used to ping another virtual machine?
[answer]
The ping instruction takes parameters to specify the source ip to ping the destination ip.
The form is as follows: ping-I 192.168.195.130 192.168.195.132
(192.168.195.130 is the source ip,192.168.195.132 is the destination ip)
[example]
The two virtual machines are configured as follows:
Virtual machine 1: (the picture only intercepts part of the information)
Virtual machine 2:
Network card on ping virtual machine 2 on virtual machine 1 (the picture only intercepts part of the information)
PS: the orange part represents the ping instruction, the first ip address is ip on virtual machine 1, and the second ip address is ip on virtual machine 2.
You can see that when the two ip are ip of the same network segment, they will communicate with each other through ping, and when the network segment is different, the ping will not be connected.
Network card on ping virtual machine 1 on virtual machine 2:
PS: the result of ping on virtual machine 2 is exactly the same as that of 1.
If you do not use the I parameter, ping 192.168.195.132 and ping 10.115.63.42 directly on the virtual machine or ping 192.168.195.130 and ping 10.115.63.53 on virtual machine 2 can get the ping result. However, using the I parameter, you can know more clearly which network cards in the two virtual machines are ping each other.
[conclusion] under normal conditions, the network cards of the same network segment can be connected by ping, but the network cards of different network segments can not communicate with ping.
The method of specifying the source ip for ping operation under the above Linux is all the content that the editor has shared with you. I hope I can give you a reference and 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.