• Keine Ergebnisse gefunden

Longer User Frames

Chapter 9. Shared Media Systems (LANs and MANs)

9.1 Basic Principles

9.1.2 Access Control

The biggest problem in a LAN is deciding which device (end user) can send next.

Since there are many devices connected to a single communications channel, if more than one device attempts to send then there will be a collision and neither transmission will be successful.51

Time 8

arriving 7

data

o 6

o o 5

o o 4

o o 3

o z

o o 1

y y y y y y ...

rs

I

1

II

1

II

1

II

1

/I

1

11_ ...

1 __ \

\ II II II II II I

LAN

Figure 67. Transactions Arriving at a Hypothetical LAN. Arrivals are separated in time and space. The problem is how to decide which device can send next.

Figure 67 shows a LAN with six devices (labelled A to F) attached. The arrow above each device represents the flow of data being generated by the device for transmission to some other device on the LAN. An "0" represents a block of data generated and the numbers on the right of the diagram represent the passage of time. Thus:

1. At time" 1" devices A and E generate some data to send on the LAN.

2. At time 2, device D generates a block of data to send.

3. At time 3, devices 8 and C generate data ...

If the system is to be satisfactory then each user must get a "fair share" of the LAN. This is usually taken to mean that:

• Data should be sent on the LAN in the order that it "arrives" (is generated).

• No device should be able to monopolise the LAN. Every device should get equal service.

• Priority may be given to some types of traffic or user in which case higher priority traffic should receive access to the LAN before lower priority traffic.

• Within each priority level data should be sent in the order that it was generated and every device should get equal service.

Consider Figure 67 again. Even though they are distiibuted over many iocations separated perhaps by great distances, transactions arriving at the LAN form a

51 There is an exception in the case of analogue radio-based LANs where the use of Frequency Modulation (FM) transmission ensures that the strongest signal is received correctly.

\

(

single logical queue. The objective is to give access to the LAN to transactions in the queue in FIFO (First In First Out) order.

If each device was able to know the state of the whole queue and schedule its transmissions accordingly then the system could achieve its objective.

Unfortunately devices are separated from one another perhaps by many kilometers. Because of the geographic separation it takes time for information to travel from one device to another. The only communication medium available to them is the LAN itselfl

This then is the problem for any LAN system. A LAN system aims to provide

"fair" access for all attached devices but it is not possible for each device to know about the true state of the notional "global queue".

Fairness ---~

A real communication system has other things to worry about than fairness.

Users are concerned with what functions a system delivers and, importantly, at what cost. The challenge in design of a LAN protocol is to deliver the optimal cost performance characteristic. Fairness and efficiency are important but the resulting system is the objective.

There are many ways of approaching the ideal of "fairness".

SA Send Anyway ...

When a device has something to send it just sends anyway without regard for any other device that may be sending.

This has never been seriously used for a cable LAN but was used in the

"Aloha" system where multiple devices used a single radio channel to communicate one character at a time. Using Frequency Modulation (FM) the strongest signal will be correctly received and the weaker signal(s) will be lost.

This technique works but at very low utilisations. It requires a higher layer protocol capable of retrying if data is lost.

Contention with Carrier Sense (Carrier Sense Multiple Access (CSMA) with or without Collision Detection (CD))

Using this technique, before a device can send on the LAN it must

"listen" to see if another device is sending. If another device is already sending, then the device must wait until the LAN becomes free. Even so, if two devices start sending at the same time there will be a collision and neither transmission will be received correctly. In CSMA/CD, devices listen to their own signal to detect collisions. When a collision occurs the devices must wait for different lengths of time before attempting to retry.

This collision detection feature is present in some techniques and not in others. Either way, each user of the LAN must operate an "end-to-end"

protocol for error recovery and data integrity.

In all CSMA type LANs there is a gap in time between when one device starts to send and before another potential sender can detect the condition. The longer this gap is, the higher the chance that another sender will try to send and, therefore, the higher the possibility of collision. In practice one of the major determinants of the length of the gap is the physical length of the LAN. Thus the practical efficiency of this

Chapter 9. Shared Media Systems (LANs and MANs) 173

kind of LAN is limited greatly by the physical length of the LAN. The utilisation of the carrier medium (usually a bus) is limited more by collision probabilities than by data block sizes. In some situations, 200/0 is considered quite good.

Performance:

• As the data transfer speed of the LAN increases, throughput does not increase at the same rate. Faster link speeds do nothing to affect the propagation delays. Thus the length of the "gaps" during which collisions can occur becomes the dominant characteristic.

• There is no way of allocating priorities.

• Fairness of access to the LAN is questionable.

• Low access delay. CSMA techniques do have the advantage that if nothing is currently happening on the LAN, a device may send immediately and doesn't have to wait (as it does in some other techniques). A disadvantage is that as LAN utilisation increases so access delay becomes highly erratic and (potentially at least) unbounded.

The big advantage of CSMA techniques is one of cost:

• The hardware adapters are very simple and low in cost.

• The cables typically used are low cost telephone twisted pair or CATV style coaxial cable.

• They usually run over bus-type networks which use less cable than ring or star topologies.

Token Passing (Token-Ring, Token Bus, FOOl)

A "token" (unique header containing control information) is sent from user to user around a "ring". Only the device with the token is allowed to send at a particular instant in time. "Block" multiplexing is used and blocks are limited in length by a time delay (maximum sending time) which is user specified.

In detail, the token passing protocols differ considerably, but the performance characteristics are as follows:

• The LAN can be utilised efficiently up to quite high capacities.

Utilisation of 70% or even more can be achieved.

• Access is fair in the sense that all devices on the ring get an equal opportunity to use the LAN.

• It is possible to have a priority scheme such that, for example, real time traffic can be given priority over more normal data traffic. Even packetised voice may be handled in a limited way. The problems of voice and data mixture do not go away but there is considerable improvement over CSMA/CO.

• Ring techniques also suit fibre optical cables since it is difficult (possibie but difficult) to treat optical fibre as a bus and attach many users to the common medium. Fibre technology is, in 1992, primarily a point to point unidirectional technology.

• Geographic length is less of a problem and it is now possible to have practical rings of thousands of miles in length. (There are practical limits on the length and the number of devices imposed by

imperfections in synchronisation ("phase jitter etc. ") on the physical medium. On an electrical token-ring, LAN operation is considered problematic if the number of stations or repeaters goes above 250 or so.)

Two problems exist with the token passing approach:

1. There is an access delay due to "ring latency" between when a device has data to send and when it may start sending even if there is no traffic. This is because the device must wait for a token to arrive before it is allowed to send.

2. As the data transfer speed increases so does the length of the LAN (measured in bits). That is to say, the higher the speed of the LAN, the more bits can fit on it at one time. This means that on a

reasonably sized LAN there would be room for more than one frame to be present simultaneously but that is not allowed because there is only a single token.

The problem here is not that efficiency gets less but that there is an opportunity to become more efficient that the protocol cannot take advantage of.

The biggest problem with this method has been its cost. Since the token controls everything, there must be something to control the token and, for example, to handle the condition of errors occurring which put a permanently busy token onto the ring. Since it is considered vital that there be no "ring control unit" (which is obviously capable of failure and, therefore, has to be backed up, etc.) then each device attachment must be capable of ring control. There must be a mechanism to control which device is the ring controller when the ring is started and another to ensure takeover by one and only one other device if the current controller fails. All this takes logic and the cost has been significantly higher than for the CSMA technique. Recent improvements in chip technologies have minimised this cost differential however.

Insertion Rings (Metaring)

The principle of Metaring52 is to allow a device to send anytime provided that no data is arriving on the LAN at the time that it starts sending.

Thus, because it takes time for data to travel from one node to another, multiple nodes can transmit at the same time. This does not cause collisions because there is a buffering scheme that intervenes and prevents collisions from causing loss of data.

Metaring uses two counter rotating rings so that a control message may travel in the opposite direction to the data. This control message visits each device and essentially allocates LAN capacity (permission to send) among all the devices on the LAN.

This scheme has the following characteristics:

• As the link speed is increased and ring latency (in terms of the number of bits held on the ring at anyone time) increases, the ring is able to handle more and more traffic.

52 There are many kinds of insertion ring. One of the earliest was implemented on the IBM Series/1 computer in 1981. Metaring is a highly sophisticated version of an old principle.

Chapter 9. Shared Media Systems (LANs and MANs)

175

• At relatively low speeds (say 16 megabits per second) the protocol could produce a ring latency that is too high for some applications but at speeds of 100 megabits and above this is much less of a problem.

• A fair access scheme is implemented using the control signal.

• There is very little access delay at low ring utilisation.

• The technique offers significantly higher throughput than FOOl for roughly the same cost.

Distributed Queueing (DQDB)

The distributed queueing protocol of DQDB53 aims to provide fairness of access by having a device keep track (as far as it can) of the state of the notional global queue and its position in that queue.

The protocol uses two slotted busses to provide communication in both directions. The protocol is described in section 9.5, "DQDB/SMDS -Distributed Queue Dual Bus" on page 201.

The characteristics of this protocol are:

• The busses are managed in slots so that capacity may be allocated for constant rate traffic ("isochronous"- voice).

• Over relatively short distances the protocol provides excellent fairness of access to the busses. This breaks down a bit over longer distances at heavy loadings but can still be very effective.

• A single node can use the entire network capacity effectively.

• Data is sent in cells of 48 data bytes.

• There is no slot reuse so over long distances or at very high speed the maximum capacity is still only the speed of the bus.

• Both busses are used for data transport.

• There is very little access delay at low and medium LAN utilisations because data may be sent in the first free slot when there is nothing already queued downstream.

This technique is used in Metropolitan Area Network equipment currently being installed by many PTTs. It is also the basis of the access protocol called "SMDS".

Using a Ringmaster (CRMA)

53 Distributed Queue Dual Bus

The CRMA protocol uses a folded bus (similar to a ring) topology but has a ring controller node. The ring controller sends out a (preemptive) control message at short intervals. This message asks each node how much data has arrived on its queue since the last time it saw the message (cycle). Thus what it is really doing "is taking a picture of the global queue at defined intervals.

This information enables the system to grant access to the LAN much more fairiy than other protocois. in Figure 67 on page 172 it can be seen that data may arrive at each node in a somewhat random fashion.

Protocols that grant equal access for each node (such as token passing protocols) will give access to a block of data that just arrived at a

hitherto idle node ahead of data that may have been waiting in a queue at a busier node for some time. Thus for example, in token-ring protocol if six blocks arrive in quick succession at node A, and then a single block arrives at node S, the block at node S will get access to the LAN before some of the blocks queued at node A.

CRMA aims to allow access to the LAN for all traffic globally in FIFO order!

The characteristics of CRMA are:

• It gives the best fairness characteristic of any of the protocols being discussed.

• It will operate at almost any speed (the higher the better).

• It does not allow spatial reuse. This means that when data is received by a node, the cell that the data has been received from (and therefore is now logically empty) cannot be used by other stations to carry data. This is a waste of potential capacity.

• It avoids the problem of potentially high access delay due to ring latency by suspending the cyclic protocol at very low loads and allowing a device to send immediately when data becomes available.

Chapter 9. Shared Media Systems (LANs and MANs) 177