Register now or log in to join your professional community.
Router used to forward packets base on layer 3 ip addressing and between other subnets/networks. Where Switches make forwarding decisions based on Layer 2 mac address an are contained withing a lan. There is an exception to this for layer 3 switches that can make low level layer 3 packet forwarding decisions but it used mainly for inter-vlan routering.
1.ROUTER
works on layer 3(Network Layer) of OSI model.
work based on IP
Forwards the packets from one network to another
it creates WAN
perform logical addressing routing
2. SWITCH
works on layer 2 (Data layer) of the OSI MODEL
Work based on frames and its considerd as intelligent device compare to hub as it maintains MAC table
used to create LAN connection
full duplex device
Routers might have a single WAN port and a single LAN port and are designed to connect an existing LAN hub or switch to a WAN. Ethernet switches and hubs can be connected to a router with multiple PC ports to expand a LAN. Some routers even have USB ports, and more commonly, wireless access points built into them
NIC card are present in both Router and swicth
Router work on layer 3 protocol which is work on routing like Ip routing,EIGRP,OSPF,
Switches work on layer 3 proprotocol which is work vlan trunk etc.
Switch: works in Layer 2, forwards frames, doesn't rebuild frame-headers, handles broadcasts, uses L2 addrssing (e.g. MAC address)
Router: works in Layer 3, routes packets, rebuilds frame-headers, no broadcasts, uses L3 addressing (e.g. IPv4)
Router is Layer 3 packet base (TCP/IP)
Switching is Layer 2 frame base (link protocol)
Router used to forward packets base on layer 3 ip addressing and between subnets/networks.
Switches make forwarding decisions based on Layer 2 mac address an are contained withing a lan
Same difference as layer 3 and layer 2