Receiving the Bit Stream

The mechanics of logical adjacency by a receiving device vary slightly, based on whether the bit stream is received by the destination machine, a bridge, or a router. These scenarios are described in the following sections.

Bit Stream Reception by the Destination Machine

When the bit stream is received by the destination machine, the recipient must convert the seemingly endless stream of 1s and 0s back into a frame of data. Given that both the structure and content of a frame are transmitted in the form of individual bits, the data link layer protocols of the destination machine don't really rebuild a frame. Rather, it is buffering the incoming bits until it has a complete frame. As soon as it recognizes that the incoming bits have formed a complete frame, an error-detection routine is performed to ensure that no errors occurred during transit that would have altered the frame's contents. If the frame is defective, one of two things may happen, depending on the LAN technology. Some LANs, such as FDDI, generate a retransmit request that is sent back to the source machine. Other protocols, such as Ethernet II, just discard the damaged frame and wait for higher-level protocols, such as TCP, to discover the missing data and initiate the retransmission activity.

After a frame is successfully received, the framing is stripped off to reveal the IP packets that were embedded in the frame's data field.

Remember that occasionally there will be no one-to-one correlation between frames and packets.

An Introduction to Internetworking

Therefore, the data link layer may find itself with partial IP packets. These are buffered up until all fragments of a packet are received. The fragments are then restored to their original packet structure. Complete IP packets are then passed up the stack to the IP protocols for further processing.

Note As you will see in Part III, "'Routing Protocols," some routing protocols share information about MTU sizes. This helps a network fine-tune itself and reduces the likelihood of fragmentation.

The destination machine's IP protocols accept packets from the Ethernet protocols and strip off the packet structure to reveal the embedded data segments. These protocols may have to reconstruct any segments that were fragmented. Completed segments are passed up to the TCP protocols where the segment header is removed and the application data restored to its original state for delivery to the appropriate application or higher-layer protocol. The recipient application, or protocol, is identified by the application port number that was originally set by the source machine's TCP protocol.

Bits transmitted over a network may only be received directly by the destination machine if both the source and destination machines are on the same network. This is typically the case with LAN communications. If the destination machine does not reside locally on the same network as the source machine, however, an intermediary networking device (such as a bridge or router) is needed to forward that bit stream on to its destination.

Bit Stream Reception by a Router

Routers can be used to exchange data between source and destination machines that are not directly connected to the same network, or that for some other reason (such as using different network address ranges) can't directly communicate. As such, they are tasked with accepting bit streams, buffering them until they have a complete frame or packet, and then making a determination about what to do next with that data structure.

To understand how a router can make this next-step determination requires examining the way a router works. First, a router connected to a LAN functions much like any other LAN-attached device. It listens to the transmission media and accepts frames that are either addressed directly to it (that is, the frame's destination address is the router port's MAC address) or have a broadcast address. The router then strips off the framing from the frames that are either directly or indirectly addressed to it and examines the header of the IP packet(s) that were in the frame's data field. This packet is passed to the router's IP protocol stack for further processing.

The router's IP protocol examines the packet's destination address and checks the router's routing tables to see whether it has an entry correlating this address to an interface port. Assuming that it already knows about this destination IP address, the packet is passed to the appropriate interface port. The port, which is really a specialized NIC, applies the logic of its LAN architecture and wraps a new frame around the IP packet. This frame contains the MAC address of the router port rather than the MAC address of the IP session's source machine. The destination MAC address of this frame is the MAC address of the IP packet's destination address. This new frame is placed on the network for delivery.

Figure 1-8 shows a network that better illustrates this process.

Figure 1-8: The router forwards frames to their destination on Network 1.

In Figure 1-8, there are two LANs. The first one uses the IP address range through The second network uses the IP address range through In this example, User 4 (source IP address on Network 2 needs to communicate with the server on Network 1 (destination IP address This user's IP protocol stack recognizes that the destination address is inconsistent with the addresses of other local machines, so it passes the data to the NIC along with instructions to deliver it to the router's E1 port. The NIC wraps an Ethernet frame around this IP packet, including source and destination MAC addresses, and transmits the frame.

The router's E1 interface port sees that the frame is addressed to it, so it accepts the frame. The router strips off the frame and discards it. The IP packet that was inside the frame is passed to the router's IP stack for examination. The IP protocol stack sees the destination IP address is This address is already known to the router and is associated with interface port E0. Therefore, the IP packet is passed to that interface port. Port E0 wraps a new frame around the IP packet. This frame contains the MAC address of the server's NIC in the destination MAC address field and the MAC address of the E0 port in the source MAC address field. This frame is placed on Network 1 for delivery to the server.

Bit Stream Reception by a Bridge

Bridges are relatively unintelligent network devices; they have a limited capability to analyze received frames and make forwarding decisions. Like routers, they buffer incoming bits until they can reconstruct the original frame. They examine that frame and check its destination MAC address. Bridges, like routers, build and maintain a list of devices that are known to exist somewhere beyond each of its ports. This table is called a bridging table, and it merely correlates a bridge port with a destination MAC address.

If the bridge determines that the destination MAC address resides on the same network that it came from, it assumes that the destination machine has already received it. Otherwise, the bridge assumes that the source machine needs its assistance in delivering the framed data. Subsequently, the bridge checks its bridging table to see which network (that is, bridge port) that frame should be sent to. If the bridge receives a frame but doesn't have an entry in its bridging table for that frame's destination MAC address,

An Introduction to Internetworking it floods that frame out of all ports except for the one it came from.

As soon as the bridge has determined where to send the frame, it converts the frame back into a bit stream and transmits it on the appropriate bridge port. This stream is, essentially, identical to the stream that was received. The only modification is that the bridge retransmits the bit stream at its original signal strength.

Bridges have two potential uses:

• They can segment a LAN environment into two (or more, depending on how many ports the bridge supports) media access domains.

• They can interconnect adjacent LANs.

In either case, bridging two LANs together results in two separate media access domains within a single data link layer broadcast domain. Figure 1-9 illustrates the use and impacts of a bridge on a LAN. The two LANs enjoy separate media access domains within a single MAC broadcast domain. In other words, competition for each LAN's available bandwidth remains limited to its own directly connected machines. Both LANs, however, can generate Layer 2 broadcasts (MAC broadcasts) that are propagated by the bridge.

Figure 1-9: Bridges segment LAN's media access domains.

Figure 1-9: Bridges segment LAN's media access domains.

Bridges differ fundamentally from routers in two aspects:

• Bridges are relatively unintelligent devices.

• Bridges operate only at the physical and data link layers. They possess no capacity for network layer packet forwarding.

Given the subtle, but significant, distinctions between the operational mechanics of bridges and routers, it becomes clear that these two devices were designed for different uses. Both can be used to increase the

An Introduction to Internetworking size of networks, but routing is a far more powerful technology than bridging. Bridges are adept at exchanging data between source and destination machines on adjacent LANs. If a source and destination machine pair reside on networks that are not adjacent, they need to route.

0 0

Post a comment