Analyze figure 4.
For local network communication, such as communication between A and B. Assume that the logical address of a is 1.1, and the logical address of B is 1.2. A wants to send a signal to B, but a does not know the physical address of B, that is, Mac-B. As a result, a initiates a broadcast signal to find B. After receiving the signal, B informs a of its MAC address. So a knows the physical address of B. It can be found that the broadcast process is to convert the Logical Address to the physical address. For local communications, routers are isolated, and E and F do not receive broadcast signals.
Cross-network communication, for example, communication between A and E. Assume that the logical address of a is 1.1, the logical address of E is 2.1, and a wants to send a signal to E. First, intuitively, we can know that A and E are not in the same network, that is, not local network communication. First, how do computers Know and recognize that they are not a network? Second, how does a router forward routes across networks? Third, if the message is finally delivered to E, which application on E will process the message?
This is actually the case:
First, the logical address should be divided into two segments, indicating the network segment and the host segment respectively. [Logical address. To put it bluntly, it is an IP address]
Second, the subnet mask is used to obtain the network segment of the Logical Address. [Set the IP address and subnet mask to the same phase] For example: The logical address of a is 0000 0001. 0000 0001 And subnet mask phase 1111 1111. 0000 0000 [Note that 1 and any phase is itself; 0 and any phase is 0] After calculation, you can obtain the network segment.
Third, whether it is dynamic learning or manual maintenance, there is a route table in the router: Network Segment forwarding Interface X. y. Z. W r1 A. B .c.d r2 ......
Similarly, there should also be a Mac table in the vswitch: Host MAC address A MAC-A B MAC-B ......
Third, in summary, we can say that the IP address enables communication between the host and the host, the Mac implements local network communication, and the port enables communication between different processes on the same host.
|