BRIDGES AND SWITCHES

There are many ways to connect networks together. The most general approach is via network layer gateways (also known as layer 3 switches or routers) using IP or other packet-switching protocols. Where the networks are LANs however, a common alternative, is to connect at the data-link level, by converting one MAC protocol format to another. A device that performs this function is called a bridge (Figure 1). A bridge may connect two or more LANs, possibly of different types and a system of bridges can then be used to build an internetwork of LANs. To achieve this role, bridges must be capable of transforming one MAC frame format to another when connecting LANs of different kinds and must also be able to route frames to other bridges to support internetworking of non-adjacent LANs. The point of connection of a bridge to a LAN is called a port.

Figure 1:          Bridge joining two LANs

It is instructive therefore to compare bridges with other devices which can be used to connect networks together, namely routers, repeaters and (layer 2) switches.

·         Unlike a router, a bridge has no involvement in the network or internetwork protocols. When a MAC frame arrives at a router, it is stripped down, and its content, for example an IPdatagram, is extracted. The router routes according to the information contained in the IP header, repackages the packet in the MAC or data-link format of the next network, and then transmits it. A bridge, on the other hand, never examines the packet payload of the MAC frame, but uses information in the MAC control field  to decide where the frame is destined and how to deal with it. A bridge is not as general as a router, and relies on the linked networks having similar MAC protocols, but it is, in a sense, more efficient, requiring no packet-level functionality at all.

·         Repeaters are used to join segments of the same type together, which are effectively part of the same LAN. However, a repeater is essentially a physical level device, which simply copies bits from between segments, and does not buffer (except perhaps for a few bits) or attempt translation from one PDU format to another. In an Ethernet network, segments joined by a repeater are part of the same collision domain, in that a collision on one is transmitted to all. A bridge, on the other hand, joins separate networks together, stores complete frames and performs protocol translations between different MAC formats. Two Ethernets joined by a bridge are separate collision domains.

·         A layer 2 switch such as that used in a switched Ethernet network is similar to a bridge in its function but represents a more recent technology. While a switch is often used to connect individual stations it can also, like a bridge, be used to link Ethernet segments which are separate collision domains. Switches do effectively perform a bridging function, and typically use bridge routing protocols to support extended internetworks of LANs. However, there are differences. Firstly switches are usually intended to link segments of LANs of the same type (most commonly Ethernets) and do not in general have to perform format translations between MAC frame types.  Secondly switches are designed for extremely fast operation approximating as closely as possible to wire speed (no additional propagation delay). In general, though a switch can be used to act as a very efficient bridge. One technique which assists in this aim is cut-through which allows a switch to begin transmitting a frame before it has been completely received.

Bridge technology was standardised as part of the IEEE 802 project which defined two bridging approaches called transparent bridging and source routing bridging. The latter was developed as a bridging method for token ring (802.5) and will not be considered further here. Transparent bridging, on the other hand, is widely used and is specified in IEEE 802.1D. The idea is that the bridges themselves do all the work, transparently translating frames from one 802 protocol to another and performing routing, based on intelligent interpretation of the destination MAC address.  

A bridge does introduce some problematic issues.  Firstly, a bridge or switch may have to discard frames under certain circumstances because there is no flow controlat the MAC level, so a sudden influx of frames can cause it to run out of buffer space, and, with no way of asking its sources to desist, frame discard is the only option. Secondly, bridge delays may cause problems with standard timeouts set on delivery of data by underlying LANs. Finally, since frames are transformed, error detection check sequences must be recalculated at each bridge. As a consequence, data is not protected while actually in a bridge.

Other difficulties can be caused by incompatibilities between the MAC protocols in use on the source and destination networks. For example, different MAC protocols specify different maximum frame sizes. If a frame that is within the size limit of the source LAN is too big for the destination, it will typically have to be discarded. Problems can also be caused by different priority systems in different MAC versions. A frame entering an 802.3 (Ethernet) for example must have any priority information discarded; while a frame coming from an 802.3 to a network supporting priority, will have some default value inserted by the bridge.