What is the difference between the router and switch

Kewlx25

Distinguished
switches work on layer2 and routers on layer3
(UDP/TCP)/IP are Layer3 which means they ride on top of Layer2. Layer2 can be anything from ethernet to infiniband to T1 ... etc..

but yeah, google
 
My understanding, which is probably incorrect :p, is that a switch doesn't read the destination IP address in a packet header, whereas a router does, in order to "route" the packet to the correct device according to the DNS assignment.
 

Kewlx25

Distinguished


this is actually a good description.

To follow through on it:
A switch routes via the MAC address (Layer 2)
A router routes via the IP address (Layer3)

Your MAC address is not sent over the internet because not all layer 2 protocols have MAC addresses. But since all routers work on Layer 3, a MAC address is not needed, just an IP.
 

TRENDING THREADS