If I have an infrastructure type network, why does a local PC send out an ARP request for a MAC? Doesn't the router know the MAC addresses already, since it is using at least Layer 2?
Does it do this to speed things up, no MAC lookups?
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.Sign up to join this community
Frames are delivered directly from host to host on a local LAN, and they do not pass through a router. Even routers need to use ARP to resolve the MAC address from the IP address when sending frames to a host.
A source host (including a router) that has the IP address of a destination host must somehow resolve the IP address to a MAC address on the LAN. IPv4 uses ARP for that. It first looks in its ARP table, and if it doesn't find an entry for the IP address, it will send an ARP request. It needs the MAC address in order to build a frame for the LAN.
When a client has just booted and is configured by DHCP, it knows its own IP address, the network mask and the default gateway's IP address (plus other options like DNS servers).
In order to actually pass an IP packet to the gateway, the packet needs to be encapsulated in an Ethernet frame addressed to the gateway's MAC address - which needs to be learned by ARP on IPv4.
Of course, packets may also be sent to other local destinations (DNS server, file server, directory server, ...). All of these IP addresses also require being "translated" by ARP.
I would assume that what you are calling a "router" is actually a home/small buisness gateway device. These devices are typically a combination of several logical devices intended to provide a "network in a box".
The clients don't know or care that all these functions are in one box. The hardware implementing the functions may or may not care that they are in the same box, the Ethernet switch functionality in particular tends to be done in dedicated hardware while the IP routing and the wifi bridging stuff are often done in software on an embedded CPU.
All the client knows is the details the DHCP server gave it, typically it's IP address, subnet mask, default gateway and DNS server.
From the IP address, subnet mask and default gateway the client fills out it's routing table. A default route is created from the default gateway setting and an on-link route is created from the IP address and subnet mask.
So if the IP is in the local subnet it is treated as on-link and arp is used to find a MAC address for the destination. Otherwise arp is used to find the MAC address for the default gateway.
Don't some of the Cisco boxes have both functions?
Yes, cisco make a massive range of devices.
If I have an older 3750
The 3750 is what is known as a "Layer 3 switch", it has ethernet switching functionality,fast but relatively basic IP routing functionality and DHCP server functionality. However from what I can tell it does not have NAT or stateful firewalling support. So unless you have public IPs for every machine and are prepared to leave all your machines open to the Internet you can't really use it as an internet gateway.
and turn on ip routing, does that change anything for the clients on the network?
Depends how the clients are configured. If you want your switch to do routing between your internal networks then you need to tell your DHCP servers on your internal networks to hand out the switch's IP as the default gateway to clients.
You will also need to set up a default route on the switch to point to your internet gateway and (unless your internet gateway has an interface on all networks) a route on your internet gateway to bring traffic back to the switch.