Hub:-
A hub is basically a multiport repeater A hub connects multiple wires coming from different branches, for example, the connector in star topology which connects different stations. Hubs cannot filter data, so data packets are sent to all connected devices, they do not have the intelligence to find out the best path for data packets which leads to inefficiencies and wastage.
Types of Hub
Active Hub: These are the hubs that have their own power supply and can clean, boost, and relay the signal along with the network It serves both as a repeater as well as a wiring center. These are used to extend the maximum distance between nodes.
Passive Hub: These are the hubs that collect wiring from nodes and power supply from the active hub. These hubs relay signals onto the network without cleaning and boosting them and can't be used to extend the distance between nodes.
Intelligent Hub: It works like active hubs and includes remote management capabilities. They also provide flexible data rates to network devices. It also enables an administrator to monitor the traffic passing through the hub and to configure each port in the hub.
Bridge
A bridge operates at the data link layer A bridge is a repeater, with add on the functionality of filtering content by reading the MAC addresses of source and destination. It is also used for interconnecting two LANS working on the same protocol. It has a single input and single output port. thus making it a 2 port device.
Types of Bridge
Transparent Bridges: These are the bridge in which the stations are completely unaware of badge's existence ie whether or not a bridge is added or deleted from the network. figuration of the stations is unnecessary. These bridges make use of two processes Le bridge swing and bridge learning.
Searce Routing Bridges: In these bridges, routing operation is performed by the source station and the frame specifies which route to follow. The host can discover the frame by sending a special called the discovery frame, which spreads through the entire network using all possible paths the destination.
Gateway
A gateway, as the name suggests, is a passage to connect two networks together that may work on different networking models. They basically work as the messenger agents that take data from one system, interpret it, and transfer it to another system Gateways are also called protocol verters and can operate at any network layer Gateways are generally more complex than switches a reuters. Gateway is also called a protocol converter.
Gateway is a network device used to connect two or more dissimilar networks. In networking plance (Handshakes network), networks that use different protocols are dissimilar networks. A peeway usually is a computer with multiple NICs connected to different networks. A gateway can ho be configured completely using software. As networks connect to a different network through peways, these gateways are usually hosts or end points of the network.
Gateway uses packet switching technique to transmit data from one network to another. In this it similar to a router, the only difference being router can transmit data only over networks da une sanse protocols.