Bridge and gateway, are the backbone devices of the networking. A “bridge” operates on two layers, a physical layer, and a data link layer. A “gateway” operates on all the seven layers of the OSI model. The primary difference between a bridge and a gateway is that a “bridge is used only to transfer the frame to the expected destination, in a most efficient path”. A gateway “converts the format of the packet in one protocol to the format of the packet in another protocol”.
Let study, the difference between these two in a comparison chart below.
Content: Bridge Vs Gateway
Comparison Chart
Basis for Comparison | Bridge | Gateway |
---|---|---|
Basic | Bridge transmits the frames between two separated segments of LAN. | Gateway is a protocol converter. |
Layer of Operation | Operates on two layers, physical and data link layer. | Operates on all the seven layer of OSI model. |
Work | Checks the destination address on received frame and forward the frame to the address it belongs. | It allows two different network using different protocols to communicate with each other. |
Definition of Bridge
A bridge operates on two layers of OSI model that are, physical layer and a data link layer. A bridge can divide a large network into smaller segments and is also used to connect two originally separated LANs. The purpose of a bridge is to transmit the frame between two separate LANs.
When a bridge receives a frame, it regenerates the signal and checks the destination address of the frame and forwards the new copy of the frame only to the segment to which it belongs. A bridge does not broadcast the frame to all the stations in the receiver segment; it only forwards the frame to destination/receiver station.
Let us understand the working of a bridge in the following steps:-
- A bridge receives a frame which contains its destination address on it.
- A bridge maintains a look-up table which contains the physical address of all the stations that are connected to it.
- It compares the destination address in the frame, with the addresses in the look-up table.
- If a match is found, then the bridge recognises to which segment the packet belongs and forward the packet to its destination station.
Types of Bridge
- Simple Bridge: It is the least expensive bridge. Connects only two LANs. Addresses in the lookup table are fed manually. Maintenance is time-consuming than cost-saving.
- Multiport Bridge: Connects more than two LANs.
- Transparent Bridge: Dynamically builds its look-up table and keeps the table updating during its bridging operations.
Definition of Gateway
A Gateway operates on all seven layers of OSI model. A gateway work as a “protocol converter”. A router can accept and transfer packets only across a network using similar protocols. But, a gateway can accept and transfer the packet across networks using a different protocol. A gateway is software installed within a router.
The steps performed by a gateway when it accepts a packet formatted in a protocol are as follow:-
- A gateway accepts a packet which is formatted for a protocol (e.g. Apple Talk), used by the sender’s network.
- It then converts that packet to be formatted for another protocol (e.g. TCP/IP), used by the receiver’s network.
- After converting the format of the packet, a gateway forward that packet to its destination/receivers network.
Sometimes the modification is needed only to header and trailer of the packet and sometimes a gateway has to adjust the data rate, size, and format of the packet.
Key Differences Between Bridge and Gateway
- A bridge is always used to regenerate the signal and find the most efficient path to transmit the frame. A gateway is used to increase the compatibility to establish communication between two networks using two different protocol.
- A bridge always operates on frames, and the gateway operates on packets.
- Bridge operates on the physical layer and data link layer whereas, a gateway can operate on all the layers of OSI model.
Conclusion
A bridge operates only on a data link layer and a physical layer where the data is in the form of frames. A gateway operates on all the seven layers of OSI model where the upper layer contains data in the form of packets.
John Magugu says
Thanks for the explanation. This has been very confusing to many of us.
Good work!!
Bhavneet S Bhatia says
thanks,
the explanation is perfect.
all my doubts are cleared.
FYN says
Whats is the similarities of bridge and gateway ?
anonymous says
Thank you
Rajendran says
Very good information
Thank u very much