
Knows where to find Node A anytime a packet is addressed to it. It reads the MACĪddress and saves it to the lookup table for Segment A. The switch gets the first packet of data from Node A. This layer is responsible for routing, but knows nothing about the MAC address.Īs a side note, at the hardware level, MAC addresses ARE used by switches, but not for routing. In order to be routed, the OSI model adds a layer to allow for path discovery to the next gateway. Routing != Addressing, which is really where the MAC comes into play. How do clients identify each other? By the MAC address.
:max_bytes(150000):strip_icc()/male-computer-programmer-using-laptop-at-desk-in-office-755650739-5a675a9d2d47ba00373c0f99.jpg)
You could be using IPX, which is non-routable. Here's the key point - there can be more types of packets than INTERNET traffic. This will continue from hop to hop until it reaches the final host, each time the MAC addresses will change, but the original IP address will remain the same. This time the MAC address for the source address will be that of the forwarding interface of the router, and the receiving interface of the next hop will be the destination MAC address. For the router to do this it needs a MAC address to send it over the media, It will look up the next hop in it's routing table, encapsulate the IP packet with the same source and destination IP address that was sent from the original host into a new L2 frame. If the IP packet is meant for a host on a different subnet/ network, it will be sent to the default gateway, this router will de-encapsulate the L2 frame (remove and discard it) check the IP address and will forward it. Once it obtains a MAC address the IP packet is encapsulated in a L2 frame and sent across the media. To send data you need two address, the MAC address and the IP address.īasically the sending host will ARP for a MAC address, this occurs when the local host doesn't know the MAC address of the host it has an IP address for or it will ARP for the default gateway MAC address (if it doesn't already know it) if the IP address in on a different subnet/ network.
