5-2 The Network Bridge
A bridge can be used in computer networks to interconnect two LANs together and separate network segments. Recall that a segment is a section of a network separated by bridges, switches, and routers. The bridge is a layer 2 device in the OSI model, meaning that it uses the MAC address information to make decisions regarding forwarding data packets. Only the data that needs to be sent across the bridge to the adjacent network segment is forwarded. This makes it possible to isolate or segment the network data traffic. An example of using a bridge to segment two Ethernet LANs is shown in Figure 5-1. The picture shows that LAN A connects to port 1 of the bridge and LAN B connects to port 2 on the bridge, creating two segments, as shown. There are four computers in LAN A and three computers in LAN B. It is important to note that bridges are now legacy networking devices, but studying these will help you better understand the functionality of switches, especially how data traffic is sent to connected LANs.
FIGURE 5-1 Using a bridge to interconnect two Ethernet LANs.
Bridges monitor all data traffic in each of the LAN segments connected to its ports. Recall that a port is an input/output connection on a networking device. The bridges use the MAC addresses to build a bridging table of MAC addresses and port locations for hosts connected to the bridge ports. A sample bridging table is provided in Table 5-2. The table shows the stored MAC address and the port where the address was obtained.
TABLE 5-2 Bridging Table
MAC Address |
Port |
00-40-96-25-85-BB |
1 |
00-40-96-25-8E-BC |
1 |
00-60-97-61-78-5B |
2 |
00-C0-4F-27-20-C7 |
2 |
The source MAC address is stored in the bridge table as soon as a host talks (transmits a data packet) on the LAN. For example, if computer 1 in LAN A sends a message to computer 2 (see Figure 5-1), the bridge will store the MAC addresses of both computers and record that both of these computers are connected to port 1. If computers 5 or 6 are placing data packets on the network, then the source MAC addresses for 5 and 6 are stored in the bridge table and it is recorded that these computers connect to port 2 on the bridge. The MAC addresses for computers 3 and 4 will not be added to the bridging table until each transmits a data packet.
The bridge monitors the data on its ports to check for an association between the destination MAC address of the Ethernet frames to any of the hosts connected to its ports. An association indicates that the destination MAC address for a host is connected to one of the ports on the bridge. If an association is found, the data is forwarded to that port. For example, assume that computer 1 sends a message to computer 5 (see Figure 5-1). The bridge detects an association between the destination MAC address for computer 5 and port 2. The bridge then forwards the data from computer 1 to computer 5 in LAN B via port 2.
The capability of a bridge to forward data packets only when there is an association is used to isolate data traffic in each segment. For example, assume that computer 1 and computer 2 in LAN A generate a lot of data traffic. The computers in LAN B will not see any of the data traffic as long as there is not an association between the destination MAC addresses of the Ethernet packets and any of the hosts in LAN B (computers 5, 6, and 7).
A potential problem with bridges has to do with the way broadcasts are handled. A broadcast means the message is being sent to all computers on the network; therefore, all broadcasts in a LAN will be forwarded to all hosts connected within the bridged LANs. For example, the broadcast associated with an ARP will appear on all hosts. ARP stands for Address Resolution Protocol, which is a protocol used to map an IP address to its MAC address. In the address resolution protocol, a broadcast is sent to all hosts in a LAN connected to the bridge. This is graphically shown in Figure 5-2. The bridge forwards all broadcasts; therefore, an ARP request broadcasting the message “Who has this IP address?” is sent to all hosts on the LAN. The data packets associated with ARP requests are small, but it requires computer time to process each request. Excessive amounts of broadcasts being forwarded by the bridge can lead to a broadcast storm, resulting in degraded network performance, called a network slowdown.
FIGURE 5-2 An example of using a bridge to isolate data traffic.
The MAC address entries stored in a bridge table are temporary. Each MAC address entry to the bridge table remains active as long as there is periodic data traffic activity from that host on its port. However, an entry into the table is deleted if the port becomes inactive. In other words, the entries stored into the table have a limited lifetime. An expiration timer will commence once the MAC address is entered into the bridge table. The lifetime for the entry is renewed by new data traffic by the computer, and the MAC address is reentered.
In a similar manner, all networking devices (for example, computers) contain an ARP cache, a temporary storage of MAC addresses recently contacted. This is also called the ARP table. The ARP cache holds the MAC address of a host, and this enables the message to be sent directly to the destination MAC address without the computer having to issue an ARP request for a MAC address. The following list outlines typical steps of a communication process between computer 1 and computer 2.
- Computer 1 checks its ARP cache to determine if it already has the MAC address of computer 2. If it does, it will skip to the final step; otherwise, it proceeds to the next step.
- Computer 1 generates an ARP request message for computer 2 with its own MAC and IP information included.
- Computer 1 then broadcasts the ARP request message on its local network.
- Every local network device processes the ARP request message. Those computers that are not computer 2 will discard the message.
- Only a match, which is computer 2, generates an ARP reply message and updates its ARP cache with computer 1 MAC and IP information.
- Computer 2 sends an ARP reply message directly to computer 1.
- Computer 1 receives the ARP reply message and updates its ARP cache with the MAC and IP of computer 2.
The ARP cache contents on a Windows computer can be viewed using the arp -a command while in the command prompt, as shown here:
Windows |
Mac OS X |
||
C:\arp -a |
jmac:~mymac$ arp -a |
||
Interface: 10.10.20.2 on Interface x1000002 |
C1.salsa.org (192.168.12.1) at |
||
Internet Address |
Physical Address |
Type |
00-08-a3-a7-78-0c on en1 |
10.10.20.3 |
00-08-a3-a7-78-0c |
dynamic |
[ethernet] |
10.10.20.4 |
00-03-ba-04-ba-ef |
dynamic |
C3.salsa.org (192.168.12.1) at |
00-08-a3-a7-78-0c on en1 |
|||
[ethernet] |
The ARP cache contents on a Mac OS X computer can be viewed using the arp -a command while in the terminal mode.
The following message is generated if all the ARP entries have expired:
c:\arp -a No ARP Entries Found
The name for the type of bridge used to interconnect two LANs running the same type of protocol (for example, Ethernet) is a transparent bridge. Bridges are also used to interconnect two LANs that are operating two different networking protocols. For example, LAN A could be an Ethernet LAN and LAN B could be a token ring. This type of bridge is called a translation bridge. An example is provided in Figure 5-3. The bridge allows data from one LAN to be transferred to another. Also the MAC addressing information is standardized so the same address information is used regardless of the protocol.
FIGURE 5-3 Using a translation bridge to interconnect an Ethernet and token-ring LAN.
A common application today using a bridge is interconnecting LANs using wireless technology. The use of wireless bridges in LANs is a popular choice for interconnecting the LANs when the cost of physically connecting them is prohibitive. Wireless technology and its LAN applications were presented in Chapter 4, “Wireless Networking.”
The use of a bridge is not as common as it used to be except for wireless network applications. New networking technologies are available that provide similar capabilities to the bridge but that are much more powerful. However, the bridge still is useful and has several advantages. Table 5-3 provides a summary of the advantages and disadvantages of a networking bridge.
TABLE 5-3 Summary of the Advantages and Disadvantages of a Bridge for Interconnecting LANs
Advantages |
Disadvantages |
Easy to install |
Works best in low-traffic areas |
Does an excellent job of isolating the data traffic in two segments |
Forwards broadcasts and is susceptible to broadcast storms |
Relatively inexpensive |
|
Can be used to interconnect two LANs with different protocols and hardware |
|
Reduces collision domains (remember how the CSMA/CD protocol works) |