Arp Resolves Ip Addresses (to Mac Address) For Any Hosts And Router Interfaces On The Internet.
Both sides can now add the MAC and IP address of the counter to the cache, which provides the basis for the data exchange. If the target host is not in the same subnet, the sender addresses the default gateway (usually a router). This can also be done by combining MAC and IP addresses, which is why the Address Resolution Protocol is also required.
I have a question relating to switching and routing. I'm going to simplify the actual IP addresses to make it simple to follow. Also, please consider the scope of my question around the typical router doing L3, and a typical switch doing L2 (e.g., no special device such as an L3 switch). How to protect and scan your google chrome for yor mac and iphone. Take the following scenario: Host A in network 1.x needs to communicate to Host B on network 2.x.
In between Host A and Host B is a switch on the 1.x network (call it Switch A) that Host A connects to, a Router, and another switch on the 2.x network that Host B connects to. The router is configured to route between the 1.x and 2.x networks through two different interfaces (as would be expected on a router!); Switch A and Switch B are connected to their respective interfaces on this router. One of my colleagues contends the following: The router maintains a 'master' ARP table and knows about all MAC addresses connected to it through every interface, even if those hosts are connected through X number of downstream switches. (point of contention #1).
Additionally, my colleague contends the router will change the destination MAC address in the L2 header (frame) to the MAC address of Host B, will forward the packet to Switch B, and Switch B essentially does nothing but forward onto the target MAC already indicated in the packet (actually frame at that point). I contend the following: The router deals with Layer 3 only, and only cares about what interfaces connect to which networks. Hence, it knows nothing about MAC addresses of destination hosts connected to it (beyond *maybe* the MAC addresses of direct attached devices, typically switches - even that I'm not convinced, though). The router maintains a routing table only, and simply reads the destination IP in the L3 header, determines which interface is configured for that network, and sends it out that interface. It is the job of Switch B to determine the MAC address of the destination host via a lookup in it's own ARP table, and the switch will subsequently modify the L2 header with the destination host MAC address and send the request to that MAC (Host B). If a router was to truly know about all destination MAC addresses, it would simply get overloaded; the ARP table would be huge.
It solely relies on a routing table, and that's it; the router lets the switch massage the L2 headers and deal with the IPMAC address mapping via each switch's own independent ARP table. To summarize my questions: 1. Does a router maintain any ARP tables whatsoever? Outlook for mac crashing on startup. Does a router know anything about MAC addresses, even directly connected devices, such as directly connected switches? Does a router ever manipulate the L2 header?
Or is this a job left solely for the switch? Now for the bonus questions: 4.
How does this change on a L3 switch? If L3 switches can do both routing + switching, why are routers and switches separate? If there's a 'one device can do both', why are networks still employing separate devices, one for routing, and one for switching? Is it solely for bandwidth purposes, such as the ASIC technology is tuned for higher performance with the single-purpose devices?
Or are there other reasons? I'd love to hear from anyone that can help refute/confirm my colleagues stance. Thank you, -Josh. I should say your colleague is right.
Routers: Make routing decision according on routing table, which is based on L3 addresses, but do change L2 MAC headers. A router has the ARP entries of all hosts connected to all of its interfaces which have communicated through the router, but not the ARP entries of all hosts in the network. (Consider a multi-router set up, which is typical) Switches: Make switching decision based on MAC table (not ARP table, it is different) but do not change the L2 MAC headers. Switches may add tags (IEEE 802.1q, Cisco ISL, etc.) to the MAC headers but the tags should have been removed before reaching the end hosts. The typical operation is like this: (1) The 1.x host (A) wants to send to 2.x host (B). (2) A realises B is on a different network judging from the subnet mask and ip addresses and knows it need help from a router. (3) A does an ARP operation to find out the MAC address of its default gateway, which is a router (R).