(05-31-2015 02:00 PM)sgearhart Wrote: No, all local traffic will stay within the switch. When you initiate a request, the network will look for a destination address. If the returned address value is within the domain ip/mask setting then it stays local. If the address returned is outside of the local ip/mask, then it will pass it to the router to look for the address on the wan. Since you have 4 LAN ports and 1 WAN port, you could have 4 separate networks, unable to see each other, and all of them would have the same internet access but you wouldn't be able to use the router as a DHCP for all networks.
Assume this is all on the local network, as determined by the subnet mask and IP address.
When a program initiates a request to a particular IP address, the software within your computer will look up that IP address in its internal table that lists MAC addresses. If it has a MAC address for that IP address, it will send the request out onto its network with that MAC address.
If the switch knows that MAC address, it will send it directly to the other device, it will send it to only that port and it won't be seen by the router or any other devices. The switch watches traffic flowing through it to see what MAC address is attached to which port.
If your computer doesn't know the MAC address associated with a particular IP address, it will send out an ARP request looking for that IP address. The ARP request gets sent to all devices on the whole local network. If any device matches the IP address, it replies with its MAC address. Your computer remembers that MAC and sends any future requests for that IP directly to that MAC address. The network will then route that back through the switch to the right port.
If the IP address is not in the local subnet, your computer will send the data to the MAC address of your default gateway. (Router)
That's the basic theory. There are more and more "tweaks" to how things work and it may work out a little differently in some cases, depending on how "smart" and complicated the network is configured.
The boundaries are also getting fuzzy. Your "router" may actually contain a "router", a switch, a NAT device, a firewall, a VPN device, a WiFi access point, a cable modem, and other things. Your "switch" can be one of several levels of complexity, sometimes even doing some router functions, and may have other functions embedded as well.
(05-31-2015 02:00 PM)sgearhart Wrote: Since you have 4 LAN ports and 1 WAN port, you could have 4 separate networks, unable to see each other, and all of them would have the same internet access but you wouldn't be able to use the router as a DHCP for all networks.
For most home routers, it will DHCP for all 4 LAN ports. The router box contains a router function and a DHCP server. The 4 LAN ports are effective attached to a dumb switch inside the case of the router box, and the DHCP server won't even know which port a device is attached to.
I guess it's possible some home routers are more complicated.