When packets forwarded from IP layer to layer 2 (bridge /switch),how it reaches the destination address using routing table entries and exchange routing information back to layer3.
Asked
Active
Viewed 5,868 times
1 Answers
2
MAC addresses (layer 2) and routing tables (layer 3) are not related at all.
The routing table is used to find out if a packet should be delivered locally, or routed to some network interface using a known gateway address.
Once the decision is made to route if through some network interface, the packet is delivered by layer 2 in exactly the same way as a direct packet to the gateway IP would: The ARP (address resolution protocol) cache is consulted to find out if a MAC address for the destination IP address (gateway IP address) is known. If not, the ARP protocol is used to obtain the MAC address of the destination, and then the packet is sent to this MAC address, using the source MAC address of the network interface it is sent out from.
dirkt
- 17,461