What is Computer Network :

The network which is involved in sharing of data among multiple computing devices interacting with each other across the internet is the concept of Computer Network. The devices interacting with the internet has to follow certain Protocols in order to access the internet like https,Ip,FTP,SMTP etc….
Communication can be wired or wireless.The devices communicating with each other are connected via different network topologies like Star,Ring,Bus,Mesh etc…
There are varoious types of networks like, LAN(Local area network),MAN(Metropolitan area network)& WAN(Wide area network).

Various Networking Devices :

1) Hub :

A Hub is basically a centralized device which has multiple ports associated with it. Each of these ports are connected to different computing devices via wires or cables, hence Hub is helps multiple devices to share data with each other,& hence Hub sometimes called as a Multiport Repeater. The problem of using Hub is that it is not an intelligent networking device i.e. it doesn’t has the capability to filter data, so when any signal or message comes from one of the device connected to it it simply broadcasts the message to each & every device connected with it , instead of sending that message to the intended location. There is only a single Collision Domain in case of Hub, every communication taking place has to go through Hub i.e. if multiple messages from different devices reaches Hub at the same time then the messages will collide with each other & there will be loss of data.Hub works in Physical layer of the OSI model as it is a physical device.
There are mainly 2 types of Hubs:

1) Active Hub :

This type of Hub rely on power supply for it’s working.It has the capability to filter & amplify data signals if needed & thus it can also be used as a repeater.

2) Passive Hub :

This type of Hub doesn’t need any kind of power supply for it’s working,& it transmits data to all other devices connected with it as it is , as it doesn’t amplify the signal.

2) Switch :

A Switch is a device that works in Data-Link layer of the OSI model hence it is considered as a layer-2 device. It is much more intelligent networking device than that of Hub, as it has the capability to filter data packets, internally a switch maintains a CAM table for this purpose. Like Hub switch also has multiple ports associated with it & each port is connected to a particular device. At first, whenever switch receives a particular message from a specific it stores the MAC address of that device in it’s CAM table, & then it broadcasts the message to every device that are connected to it,& when reply comes from one of the device it again stores the MAC address of the receiver device in it’s CAM table & in this way it stores the hardware address of every device connected to it.Later it filters the data by looking at the CAM table & sends the message to that receiver device to which the message has been sent, so Switch first broadcast then Unicast & Multicast messages based on requirement. Every port of switch is a collision domain. Mode of communication is full duplex with the help of switch.

3) Bridge :

A Bridge is a device which is used establish connection between 2 or more LANs.It is Layer-2 device that works in Data-Link layer. It is also an intelligent device & it also has the capability to filter data packets like Switch. Internally Bridge maintains a table which stores port number & MAC address of every device. At first it broadcast message to every devices connected with it’s each & every port & once the table gets updated with port number & MAC address of each & every connected device, then it unicasts message to every device of a specific segment only to which the message is intended. It filters data based on port number & sends message to every devices connected with the bridge via that port number. Thus it reduces the amount of traffic within a LAN by dividing it into 2 or more segments.

4) Router :

A Router is an inter-networking device which works in the Network layer of the OSI model. It is a device which is used to establish connection between multiple networks over the internet, hence it is considered as a WAN(Wide Area Network) device. Routers internally maintains a Routing table to keep track of data packets & it routes data packets based on IP address of source & destination. A Router can have 2/4/8 ports. Router can be Wired,Wireless,Virtual etc…
Types of Routing :

1) static routing :

In static Routing ,the path between the source & destination is set manually which causes much more overhead.

2) dynamic routing :

In Dynamic Routing, routers uses different routing algorithms to find best & shortest possible path for packet delivery between source & destination.