Router forwarding packet package

Encapsulation process of router forwarding packets

HostA requires Communication HostB must first pass through the gateway, and now there is no mac address of the gateway, so ARP broadcast will occur, then

Source IP: 192.168.1.2/24
Source mac address: 00-11 -12-21-11-11
Destination IP: 192.168.1.1/24
Destination mac address: FF-FF-FF-FF-FF-FF

Ping packet comes, E0 port Will respond to HostA’s own mac address, and then send a ping packet back

Source IP: 192.168.1.2/24, then
Source mac address: 00-11-12-21-11- 11
Destination IP: 192.168.2.2/24
Destination mac address: 00-11-12-21-22-22

The ping packet comes to E0 to check the target mac address and split it, then The routing table will let you go E1

If there is no source mac, the packet will be lost, and the E1 port will trigger the ARP broadcast. At this time,
source IP: 10.1.1.1/8
source mac address: 00-11-12-21-33-33
Target IP: 10.1.1.2/8
Target mac address: FF-FF-FF-FF-FF-FF

E1 of B The port first unpacks the package to see the target IP and then responds, feeds its own mac back to E1, E1 caches, HostA’s second ping packet to E1, E1 checks whether it is itself, then

Source IP: 192.168.1.2/24
Source mac address: 00-11-12-21-33-33
Destination IP: 192.168.2.2/24
Destination mac address: 00-11-12-21-44 -44

Arrive to router B, check the routing table is E0, and then lack the mac address of HostB, the ping packet is lost, E0 triggers ARP, then

Source IP: 192.168.2.1/ 24
Source mac address: 00-11-12-21-55-55
Destination IP: 192.168.2.2/24
Destination mac address: FF-FF-FF-FF-FF-FF

HostB sees that the target is itself, and responds, giving Hos the mac address of HostB On the tBE0 port, HostA sends the third ping packet to it.

————————————————
Copyright statement: This article is the original article of the CSDN blogger “My Goodness 3000”, following CC 4.0 BY-SA Copyright agreement, please attach the original source link and this statement for reprinting.
Original link: https://blog.csdn.net/weixin_45693462/article/details/102593749

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1387 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.