650) this. width = 650; "title =" 1.jpg" alt = "130050897.jpg" src =" http://img1.51cto.com/attachment/201309/130050897.jpg "/>
This is the test environment.
First, to ensure normal communication in the same network segment
HOST 1: 192.168.220.100
Host 2: 192.168.220.167
Communication result:
650) this. width = 650; "title =" 2.jpg" alt = "130402189.jpg" src =" http://img1.51cto.com/attachment/201309/130402189.jpg "/>
Now test the communication result of the failed CIDR Block:
HOST 1: 192.168.1.1/24
Host 2: 172.16.1.1/24
Test results:
650) this. width = 650; "title =" 3.jpg" alt = "130700116.jpg" src =" http://img1.51cto.com/attachment/201309/130700116.jpg "/>
It indicates that the network cannot be connected without configuring a gateway.
Communication Method 1:
Each Other refers to its own outbound interface as the default outbound interface route add default dev eth0)
Test results:
650) this. width = 650; "title =" 4.jpg" alt = "131008350.jpg" src =" http://img1.51cto.com/attachment/201309/131008350.jpg "/>
Method 2:
Each other's ip address is its own default gateway. In this test, the gateway configured on linux is not allowed to be in the same network segment as itself. Therefore, this test is conducted by window, here I use the virtual gns to do it, and the results are the same)
Test Results
650) this. width = 650; "title =" 5.jpg" alt = "131748158.jpg" src =" http://img1.51cto.com/attachment/201309/131748158.jpg "/>
All results can be pinged.
Summary:
The reason why the CIDR block cannot communicate by default is that different CIDR blocks cannot be resolved for arp. Simply speaking, arp cannot be sent out. After the default gateway is specified, the pc can request the arp of the gateway, and finally resolve the mac addresses of different network segments to achieve communication.
Ppp links are more exotic. You do not need to specify a gateway to communicate with each other. If you are interested, you can perform an experiment. The principle is that the ppp link is a point-to-point link, ping the packets by yourself and send them to the peer end. In addition, the communication between the ppp link is not resolved by arp, because the ppp link can communicate without a gateway.
This article is from the keepalive blog, please be sure to keep this source http://jefferyyu.blog.51cto.com/2843635/1299134