Further Reading The Application Layer

110 Communication Networks Copyright © 2005 PragSoft • LAN protocol stack . This implements the LAN protocol layers. This usually takes the form of a hardware card inside the user station, containing a microprocessor and firmware which implements the non-physical protocols. • Physical Interface Unit . This directly interfaces the user station-based LAN hardware to the LAN physical medium. The exact form of the PIU is highly dependent on the LAN physical medium. Coaxial cable connectors and cable TV taps are common examples. • Physical Medium . This provides a physical path for signals to travel between stations. Coaxial cable, optical fiber, and infra red light are examples. The LAN protocol stack will be the main focus of our attention in this chapter.

9.1.1. Topologies and Access Protocols

There are two general categories of LAN topologies: bus and ring see Figure 9.94. The bus topology uses a broadcast technique, hence only one station at a time can send messages and all other station listen to the message. A listening station examines the recipient address of the message and if it matches its own address, copies the message; otherwise, it ignores the message. The ring topology uses a closed, point-to-point-connected loop of stations. Data flows in one direction only, from one station to the next. As with the bus topology, transmission is restricted to one user at a time. When a station gains control and sends a message, the message is sent to the next station in the ring. Each receiving station in the ring examines the recipient address of the message and if it matches its own address, copies the message. The message is passed around the ring until it reaches the originator which removes the message by not sending it to the next station. Figure 9.94 LAN topologies. PIU Bus Ring PIU PIU PIU PIU PIU PIU PIU Given that access to the bus or ring is restricted to one station at a time, some form of arbitration is needed to ensure equitable access by all stations. Arbitration is imposed by access protocols. A number of such protocols have been devised: • Carrier Sense . This protocol is applicable to a bus topology. Before a station can transmit, it listens to the channel to see if any other station is already www.pragsoft.com Chapter 9: Local Area Networks 111 transmitting. If the station finds the channel idle, it attempt to transmit; otherwise, it waits for the channel to become idle. Because of an unavoidable delay in a station’s transmission to reach other stations, it is possible that two or more stations find the channel idle and simultaneously attempt to transmit. This is called a collision. Two schemes exist for handling collisions: • Collision Detection. In this scheme a transmitting station is required to also listen to the channel, so that it can detect a collision by observing discrepancies in the transmission voltage levels. Upon detecting a collision, it suspends transmission and re-attempts after a random period of time. Use of a random wait period reduces the chance of the collision recurring. • Collision Free . This scheme avoids collisions occurring in the first place. Each station has a predetermined time slot assigned to it which indicates when it can transmit without a collision occurring. The distribution of time slots between stations also makes it possible to assign priorities. • Token Ring . This protocol is applicable to a ring topology. Channel access is regulated by a special message, called a token, which is passed around the ring from one station to the next. The state of the ring is encoded in the token i.e., idle or busy. Each station wishing to transmit needs to get hold of the idle token first. When a station gets hold of the idle token, it marks it as busy, appends to it the message it wishes to transmit, and sends the whole thing to the next station. The message goes round the ring until it reaches the intended recipient which copies the message and passes it on. When the message returns to the originator, it detaches the message, marks the token as idle and passes it on. To ensure fair access, the token should go round the ring, unused, at least once before it can be used by the same station again. • Token Bus . This protocol is applicable to a bus topology but makes it behave as a ring. Each station on the bus has two other stations designated as its logical predecessor and its logical successor, in a way that results in a logical ring arrangement see Figure 9.95. A special message is provided which plays the role of a token. Each station receives the token from its predecessor, re- addresses it to its successor, and retransmits it on the bus. The rest of the protocol is as in a token ring.