Packet communication between different network segments

Source: Internet
Author: User

Packet communication between different network segments host A communicates with host C, A Ping C, figure: A-switch-router M-router N-switch-C, AC different subnets (1) if two machines are not in the same subnet, A must communicate with Objective C. A must send an ARP packet to the "Default Gateway", and the IP address of the "Default Gateway" is already set in system. The IP address actually corresponds to the E0 IP address of the router M. Therefore, when A broadcasted an ARP request to the IP address of the "Default Gateway", the MAC address of the E0 port of the router M is returned to, in this case, the target MAC address of the packet is replaced with the E0 port MAC address of M. After www.2cto.com (2) MAC is replaced, it is transmitted to the physical layer of the switch, then to the data link layer of the switch, and then to the physical layer through the data link layer. (3) pass through the bit to the physical layer of the router M, and then transmit it to the data link layer. The destination IP address is compared with the router M's three-layer IP route table. If the match is correct, it is handed over to the upper layer for processing, otherwise, the data packet content will be cached, and relevant table items will be found in the route table based on the target address to obtain the MAC address of NEXTHOP and the outbound interface, the two addresses are used as the new destination and source MAC addresses to encapsulate pre-cached data packets and then forward the packets. This process is called frame rewriting (REWRITE ). After www.2cto.com (4) repeats MAC replacement, find the table items matching the destination IP address in Vron N. If N contains the MAC table items corresponding to C, data is transmitted to the network layer of the C, otherwise N sends the MAC of the ARP Broadcast Request C. (5) When C receives A packet, it performs A reverse MAC replacement process from A to C. In the reverse process, the MAC for ARP request next hop is omitted in each step, because the MAC table has been created.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.