Three-tier exchange principle

--------------- -------------- theory Overview

MAC (Media Access Control, media access control) address, or MAC address is called, the hardware address is used to define the location of a network device. MAC is integrated in the card, the digital 48bit binary composition, 0 to 23 digits called organizational unique identifier (organizationally unique, are a local area network identifier identifying a node). 24 to 47 are assigned by the manufacturers themselves, wherein a multicast address of 48 bits Flag. Network card physical address is usually written by the manufacturer of the NIC card EPROM chips, chip data can be erased by a program on which it stores the real time data sent identifying the host computer transmitting data and receiving data address. That is, in the course of the underlying physical transport network, the data is transmitted to the host identified by the physical address, it must be globally unique.


IP, the Internet protocol address full name, refers to the IP address, meaning that the distribution of digital label equipment to Internet users using the Internet Protocol. Common IPv4 and IPv6 IP address is divided into two categories, but there are other unusual small class.


ARP (Address Resolution Protocol) i.e., ARP, is to obtain a TCP / IP protocol based on the IP address of the physical address. ARP containing the target host IP address when sending an information request is broadcast to all hosts on the local area network, and receiving the return message, in order to determine the physical address of the target; the return message after receiving the IP address and physical address is stored in the machine ARP cache and retain a certain time, to directly query the ARP cache when the next request to conserve resources.
Now I will be following this picture as an example to explain the three principles of the router forwarding

Three-tier exchange principle

To contact PC1 and PC2 to go through the following steps:
1, PC1 and PC2 are on different subnets, a three-tier exchange.
2, PC1 acquired by the ARP broadcast router A to get connected with their E0 interface MAC address, the packet is encapsulated into a data frame, the MAC address of the original data frame header 00-11-12-21-11-11, the destination MAC address E0 interface MAC address 00-11-12-21-22-22.
3, router A is decapsulated from the interface E0 after receiving the data frame, the router A to find its own routing table for the IP address 192.168.2.2 to match the routing table, a next hop to forward the packet to the E1 interface.
4, router A re-encapsulated data frame, the time source MAC address is 00-11-12-21-33-33 E1 interface, destination MAC address is 00-11-12-21-44-44.
5, from router B decoupling received E1 data frame, the data frame decapsulating destination IP address is checked, match the routing table, the next hop according to a routing table, forwards the packet to the interface E0, and E0 router B found PC2 direct interface is connected, through ARP broadcast, the MAC address of 00-11-12-21-66-66 PC2, PC2 obtain the MAC address of the router B will own MAC address as the source MAC E0 interface MAC address, as a destination PC2 MAC.
6, destination IP and source IP unchanged.

Guess you like

Origin blog.51cto.com/14307755/2427359