Today, I learned about APR.
Last time, I learned about the LAN address.
As this picture described, each LAN has a unique MAC address.
Here is the question: How to determine interface's MAC address, knowing its IP address?
The Answer is "Refer to APR table."
This is the APR table, which we can see on our cmd or terminal.
We should know that how APR protocol works in network. Let's have an example.
A(source) wants to send a message to B(destination).
- APR protocol when A and B are at the same LAN.
- B's MAC address is availabe in A's APR table.
- A simply attaches a link-layer header to datagram and enters B's MAC address as destination in the header.
- B's MAC address is not available in A's table.
- A sends a request to find out B’s MAC address. B replies. A stores that in its ARP table. Now A attaches a link-layer header to datagram and enters B’s MAC address as destination in that header.
- B's MAC address is availabe in A's APR table.
-
APR protocol when A and B at the different LANs.
-
B’s MAC address is not available in A’s ARP table since they are not at the same LAN. Send it to the gateway (the LAN’s first hop router).
-
However, APR protocol is a little bit complicated if the nodes at the different LAN.
This picture describe this case.
Every time, the MAC address is changed depending on the source and destination.
IP address is not changed while processing.
'Computer Science ๐ > Network Programming ๐ฐ๏ธ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Switch (0) | 2023.04.25 |
---|---|
Ethernet (0) | 2023.04.20 |
IP address vs MAC address (0) | 2023.04.19 |
NAT, Apr/14/2023 (0) | 2023.04.15 |
DNS(1), Apr/12/2023 (0) | 2023.04.13 |