do routers contain switches ?
-
it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?
-
it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?
well it wouldn't be the router searching the ARP table. The sending client would do the lookup in its own ARP table. If it didn't have an address for x.x.1.4, it would do an ARP broadcast to get it. I don't think the router has a role in this situation. Why? because if the default route is 192.168.1.1 then it is probably already on that subnet. The client is going to realize the destination is on the same subnet using the subnet mask. If the router had an integrated switch, the switch would be involved in forwarding the frame. Anyways my $0.02
-
well it wouldn't be the router searching the ARP table. The sending client would do the lookup in its own ARP table. If it didn't have an address for x.x.1.4, it would do an ARP broadcast to get it. I don't think the router has a role in this situation. Why? because if the default route is 192.168.1.1 then it is probably already on that subnet. The client is going to realize the destination is on the same subnet using the subnet mask. If the router had an integrated switch, the switch would be involved in forwarding the frame. Anyways my $0.02
no I'm not talking about lan communication suppose you send a packet to codeproject from your pc. its trip will be (with all address change of course) 192.168.1.4->192.168.1.1(def.gate.)->10 more machines->codeproject say your external ip is 100.100.100.100 when its reply gets at 100.100.100.100 your router is in charge of sending it to x.x.x.4...I'm talking about this bit
-
it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?
My knowledge is a bit rusty, but routing and switching occur at different protocol levels. Routing is on the network layer (like IP) and switching on the link layer (e.g.: Ethernet) I guess you are talking about a router with multiple LAN ports. I don't think there are any more unmanaged switches around, where packets are unconditionally sent out on all ports; the switch knows what devices are on which port, and will only transmit on the appropriate one (it will have to use address resolution if it doesn't know the MAC address, but this only happens once, or when the device is moved to another port) If the destination IP address is not on the local network, the router will naturally forward it to the WAN side. And it is not a stupid question :)
-
it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?
I guess you are right. A Router must be a Switch with ARP lookup logic to determine which port to switch to.