Sunday 15 July 2012








Router vs switch


Router is computer networking device which is use to connect two or more different networks and forword packets between them.router maintains routing table to find out
the route to reach destination address. Router works on network layer of OSI model.


Switch is computer networking device which is use to connect different segments of a network and networking devices .Switch maintains a mac-address database of connected
devices to its port. switch works on data-link layer of OSI model.



In fig 1.1 I two different networks are created with two switches. Which are  Network A and Network B.

In fig1.1 Network A pc0 can ping to any other pc on the same network and Network B Pc9 can ping to any
other Pc on the same network.

PC>ping 192.168.20.3
Pinging 192.168.20.2 with 32 bytes of data:

Reply from 192.168.20.2: bytes=32 time=96ms TTL=128
Reply from 192.168.20.2: bytes=32 time=62ms TTL=128
Reply from 192.168.20.2: bytes=32 time=63ms TTL=128
Reply from 192.168.20.2: bytes=32 time=62ms TTL=128

Now lets go to Fig 1.2.

In fig 1.2. Network A is connected with Network B with a Switch 00.




In fig 1.2 when ping from Pc0 of Network A to PC9 of Network B the ping was unsuccessful because switch cannot connect two different network.

PC>ping 10.0.0.2

Pinging 10.0.0.2 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Now lets go to Fig 1.3.
In fig 1.3.  Network A is connect with network B with a router.





In fig 1.3 when we ping from Pc0 of Network A to Pc9 of Network B the ping was successful because router connect two different networks.


NOTE: In computer networking Switch is used to create networks and routed is used to connect networks.

Give me suggestions to improve.