|
|
此文章由 scoopy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 scoopy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
等大神估计是等不到了,自己动手,丰衣足食。
https://learningnetwork.cisco.co ... art=30&tstart=0
This was an interesting post. Let me make an attempt to explain it.
1. We start with a ping command from the first laptop on the left - 10.1.1.1.
Cmd - Ping 192.168.1.1
2. A frame will be built as follows.
1st Frame:
a. Source MAC - 00:..:10 (Mac of the sender computer)
b. Destination Mac - 00:..:10 (Mac of the gateway interface - learned using ARP for gateway IP configured in network interface)
c. Source IP - 10.1.1.1 /8
d. Destination IP - 192.168.1.1
3. Now this will reach the gateway interface, which is working on "ethernet protocol" - and requires MAC address' to send and recieve frames. Here second frame will be built, keeping in mind that this interface provides connectivity to "all other networks" as it is a gateway.
2nd Frame.
a. Source MAC - 00:...:10 (This is MAC address of the gateway interface, and it requires senders and recievers MAC address to built a frame because it is working on ethernet standards.)
b. Destination MAC - 00:..:92 ( Gateway, 10.1.1.1 sent an ARP request from its self to know the MAC address of destination IP - 192.168.1.1.
Since 192.168.1.1 is connected on the other end,
it checked the request,
saw that it matched its IP,
and sent a reply with its MAC address.)
c. Source IP - 10.1.1.1
d. Destination IP - 192.168.1.1
4. This frame will be sent out of Laptop 1 - 10.1.1.1 on the left and recieved by laptop on the right - 192.168.1.1
5. The 192.168.1.1 laptop will analyse the 2nd frame as follows:
a. Is the destination MAC mine?
b. Yes it is, so I will process it further.
c. Is the IP address mine?
d. Yes it is, so I will process it further.
e. Processing the request type, so let me built a reply as this is an ICMP request.
6. Now a reply is built as follows:
Reply - 1st frame:
a. Source MAC - 00:..:92 (Mac of the sender computer)
b. Destination Mac - 00:..:92 (Mac of the gateway interface - learned using ARP for gateway IP configured in network interface or from cache)
c. Source IP - 192.168.1.1
d. Destination IP - 10.1.1.1
7. Now this will reach the gateway interface,
2nd Frame.
a. Source MAC - 00:...:92 (This is MAC address of the gateway interface)
b. Destination MAC - 00:..:10 ( Gateway, 192.168.1.1 knows the MAC address of destination IP - 10.1.1.1 from its cache)
c. Source IP - 192.168.1.1
d. Destination IP - 10.1.1.1
8. This frame will be sent out of Laptop 2 - 192.168.1.1 on the right and recieved by laptop on the left - 10.1.1.1 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
评分
-
查看全部评分
|