In this tutorial you are going to learn about Bridge in Computer Networks.
Introduction to Bridge in Computer Networks
A bridge is a repeater. If bridge and repeater are the same, then you may think why do we need two different terminologies and two different devices. A bridge is normally a repeater but with some additional functionalities and the additional functionality is that it has the potential of reading MAC addresses.
Whenever any device that is dealing something with the MAC address only, then that device will be a layer two device. So the bridge is also a layer two device.
Bridges are also used for interconnecting two local area networks on the same protocol. Let's say we have two local area networks and these two local area networks are using the same protocol, then bridges are used to interconnect these two local area networks.
Bridge is also a port two device like a repeater. A repeater has only two ports, likewise a bridge will also have only two ports.
There are two types of bridges:
- Transparent Bridges
- Source Routing Bridges
Transparent Bridges
Transparent Bridges are the bridges in which stations or nodes are completely unaware of the bridge's existence. It means in a local area network, if there exists a bridge the stations or nodes are unaware of the existence of the bridge. We need not do any configuration in the stations. In a router, we used to give the IP address of the interface as the default gateway for all the stations or PCs whereas in a bridge, we need not do that because the stations are completely unaware of the bridge's existence.
Reconfiguration of stations is unnecessary even if the bridge is added or removed from the network. Suppose if we add a bridge or remove a bridge we need not do any configuration or reconfiguration in the stations.
Source Routing Bridges
In source routing bridges, the routing operation is performed by the source station and the frame specifies which route to follow. For example in a local area network, there is a source station or a source node. If that node is going to send some data to another node, then this node, that is the source station, will have the routing information how this frame has to reach the destination. So that information is processed by the source routing bridges.
Working of Bridge
Suppose if we have a local area network and we have another local area network, to connect these two local area networks we bring in a bridge and this bridge extends the range of the local area network and interconnects these two networks. The very important point to note about bridge is that, this bridge interconnects two networks that are running on the same protocols.
Routers can interconnect two different local area networks that need not be the same protocols, they can run two different protocols. Now you may have a question in your mind. If a bridge can interconnect two local area networks, and a router can also interconnect two local area networks, then what is the difference between a bridge and a router?
Difference between Bridge and Router
The difference between a bridge and a router is that a bridge interconnects local area networks that are running on the same protocol and the bridge is a layer two device. That is, a bridge deals with the MAC addresses whereas if it is a router, then it interconnects two different local area networks that are running with two different protocols and also router is a layer three device. Router deals with the IP addresses and a router changes the data link layer address that is the physical address or MAC address in a packet.
Bridge | Router |
Interconnects local area networks that are running on the same protocol. | Interconnects two different local area networks that are running with two different protocols. |
Bridge is a layer two device. | Router is a layer three device. |
Bridge deals with the MAC addresses. | Router deals with the IP addresses. |
This article on Bridge in Computer Networks is contributed by Rajnish Kumar. If you like TheCode11 and would like to contribute, you can also write your article to us. Here is our mail id - thecode11info@gmail.com