Wide Area Networks - Lecture 5

These Notes are divided into hyperlinked sections

Introduction
Switching, circuit versus packet switching
Advantages/ Disadvantages of these Approaches
Data Link Layer
Frames
Flow Control
Examples of Flow Control Schemes
ATM, What is this?
ATM cells. What are they?
How does the cell switching operate?
Data Link in ATM
Cell transmission
Cell reception
Conclusion
References


Introduction

This section will cover the following material.
How does circuit switching differ from packet switching?
What is the difference between a connection oriented service (e.g. Transmission Control Protocol) and a connectionless service (e.g. User Datagram Protocol)?
Use of Data Link layer
Asynchronous Transfer Mode (ATM), cell structure
Data link layer in ATM
Cell transmission and reception


Switching, Circuit versus Packet Switching

In circuit switching, the path for the signals to follow is determined before the data transfer session and remains in place until the data transfer is complete. All data arrive in the order that they were sent. All data follow the same route to the destination. There is no need for any addressing or routing to be performed after the circuit has been set up.

Packet switching is where the data to be sent is divided into small sections called datagrams and each datagram is sent onto the network with the destination address in its header. The packets find their individual route to their destination. Packets may arrive in any order.


Advantages/ Disadvantages of these Approaches

Circuit switching:

But: Datagram/ packet switching: But: Data Link Layer

What services are provided to the network layer by the Data Link layer?

Provides for: Unacknowledged connectionless service: Acknowledged connectionless service: Acknowledged connection-oriented service: Other Protocols used in Data Link Layer.

Frames

Frames are formed by the Data Link layer from the PDU passed down to it by the Network layer above. The bit stream is broken into frames for error checking between nodes in a network and uses a form of Cyclic Redundancy Check (CRC) for each frame.

To mark the start and finish of frames, there must be some form of definition of the extent of the frame.

Frames may be separated in 4 ways

  1. Character count. Header field specifies number of characters in the frame. Errors in physical layer can cause this to malfunction (rarely used today)
  2. Starting and ending characters with character stuffing. DLE STX for beginning, DLE ETX for end. Problems with 'accidental' DLE characters. Overcome by sender inserting an extra DLE before any DLE occurrences in the data. Receiver removes extra DLE.
  3. Starting and ending flags with bit stuffing. Delimiting flags are used 01111110 at each end of the frame. To avoid erroneous flags, sender monitors the data stream and if five 1s are in the stream, an extra 0 (bit stuffing) is inserted. Receiver monitors arriving bit stream and removes the extra 0. The flags are not treated in this way.
  4. Physical layer coding violations. This method can be used if the encoding on the physical medium contains some redundancy and it is these redundant codings that will be used to mark start and end of a frame.
Flow Control

This is necessary to prevent the sender overwhelming the receiver. All flow control schemes follow the same scheme. Frames may not be sent unless there is an explicit (or implicit) permission granted from the receiving entity.

An example from the receiver could be:

"You can send me n frames for now, but after you have sent them you may not send any more unless and until I tell you to do so."


Examples of Flow Control Schemes

Stop and Wait. Here the sender transmits a frame and waits for an ACKnowledgement frame before it fetches the next frame from the network layer. A timer exists to account for lost frames and/ or ACKs.

Sliding Window. Piggybacking is used in duplex data transfer schemes with ACKs being carried within data frames. A section of the header field is set apart for the protocol. If n bits are set aside, 2n combinations are possible.

The receiver keeps a receiving window that corresponds to the set of frames that it is prepared to accept. The sender keeps a sending window that corresponds to the set of frames that it is allowed to send. Periodically, the windows shrink and grow as the data is transferred. A frame must be held in memory until an ACK has arrived to indicate correct reception of a frame. When a new packet arrives from the network layer, it is given the next highest sequence number of the available window. When an ACK arrives, the lower edge of the window is advanced by one. If due to some error in the network the sending window ever grows to its maximum size, the data link layer must stop the network layer from passing any more packets until ACKs begin to arrive.

Go Back n. This is used when the packets are (comparatively) small and the round-trip time is long. The previous 2 schemes would be bad for bandwidth utilisation so another scheme allows the sender to transmit many more frames without receiving an ACK. The number used here is made to be about the same time as the round trip time would have been. This allows for the transmitter to be sending continuously and receiving ACKs for packets sent some time previously. This technique is known as pipelining. Retransmission here can be by returning to the number of the frame that was not received and then re-transmitting all frames; alternatively selective repeat may be used to just send the one frame needed. Can require a large amount of data link layer memory.


ATM, What is this?

Asynchronous Transfer Mode is a circuit switched technology that sets up a virtual circuit before transfer of data. Virtual refers to the fact that the circuit may be one of many multiplexed onto a fibre.


ATM cells. What are they?

48 bytes of payload, 5 bytes of header - always


Figure 5.1 ATM Cell Layout

Why? What advantage is this?

Small packets of data will pass through a network faster than longer ones. Hardware can be optimised to deal with a fixed size of cell.

Cells travel along fibre cables in between switches. Switches perform routing functions. Switches can be blocking or non-blocking.

The routing is done once at the set-up of the call. After that, all the cells follow the same physical path.


How does the cell switching operate?

When the connection is set up, the connection is given a virtual circuit number and it is the use of the virtual circuit (VC) numbers that allows the cell to find its way to the destination.

Note: The following description is intended to assist with your understanding of the operation of ATM. This is a model only and should not be used as an answer in an examination situation.

To get the cells to direct themselves at each hop, imagine a road system consisting of roads and roundabouts only. Think of cells as cars, the cables as roads and the switches as roundabouts at every junction.

When a car leaves home, it is given a number (VC number) by the host machine that will direct the car to the correct exit at the next roundabout the car comes to. This number is part of a numbering scheme that will only be valid for the next roundabout the car comes to.

When the car arrives at the first roundabout, the number is checked by a policeman at the roundabout and he directs you to the exit you must leave by.

At the exit, there is another policeman who gives you a different number to guide you when you reach the next roundabout. The car reaches the next roundabout and the cycle begins over again.

All numbers are valid only for the next roundabout and will be changed by the roundabout as you navigate it.

The numbering is worked out by the call set up process that took place earlier.


Data Link in ATM

The ATM physical layer is split into two sections, the physical medium dependent sublayer being akin to the OSI physical layer and the Transmission Convergence (TC) sublayer being similar to the Data Link layer.

There are no physical layer characteristics specific to ATM. Instead ATM cells can be carried by SONET, FDDI and other transmission systems.

Here we shall discuss the data link functionality of the TC sublayer.

An application program produces a message to be sent and it works down the ATM protocol stack having headers and trailers added at each stage and also undergoing segmentation into cells. At some time they arrive at the TC sublayer.


Cell transmission

Firstly the 4 bytes in the header have a checksum applied to them and this is inserted into the 5th byte. The payload is not checked for errors. The polynomial used here is:

x8 + x2 + x + 1. To this is added 01010101 to provide robustness in the face of headers containing mostly 0 bits.

This field is called Header Error Control (HEC) because it only covers errors in the header. Because of the brevity of the header, the checksum is able to correct all single bit errors. Studies of a major US optical network have shown that 99.64% of all errors are single-bit.

After the HEC has been calculated and inserted, the cell is ready for transmission. The transmission medium may be either asynchronous in which case the cell may be sent whenever it is ready to go; else the transmission medium is synchronous and the cells are transmitted according to a predefined timing pattern.

If no cells have been passed to Transmission Convergence, the TC layer may invent Idle Cells for transmission.

If the cells were to be transported using SONET, the TC layer would produce the SONET frames and pack the ATM cells in the format required by the scheme (not easy because a SONET payload does not hold an integral number of 53 byte cells). Mappings for ATM cells onto other transmission systems are currently being defined.


Cell reception

The receiving TC sublayer must work out where the cell boundaries in the bit stream lie. There are no flags used here. If SONET is used, the SPE pointer can be used to indicate the position of the cell in the structure.

Otherwise, the TC layer keeps a 40 bit shift register and uses an algorithm to attempt to detect whether the byte that appears in the HEC position is valid for the 4 bytes in the addressing section. The bits are shifted one at a time until the HEC matches the leftmost 32 bits.

This is not very reliable, why not?

By using this boundary as a starting point for a search, the next cell start ought to have been correctly identified. If the guess was correct, the next cell boundary will be examined. The headers of d cells are examined.

This takes time and so the synchronisation time will suffer for a large d.The probability of getting synchronised incorrectly with a random bit stream is

2-8d. Choice of d can make this chance arbitrarily small.

If a HEC appears to be bad, the cell will be dropped. If several cells appear to be errored, TC has lost synchronisation and will have to begin the hunting process to define a frame beginning.

The mechanism used for cell delineation calls for the TC sublayer to understand and use data intended for the ATM layer above it. This is in total contravention of the normal rules of protocol engineering. The idea of layered protocols is to make each layer completely independent of the layers above it. ATM ignores this.


Conclusion

The data link layer is responsible for providing services to the network layer. These include error checking and dealing with the errors, determining how the physical layer bits are grouped into frames and also it has the task of flow control to make sure that the receiver is not overwhelmed.

The raw bit stream arrives at the data-link layer via the physical layer.

Flow control is accomplished at this layer, with Sliding Window protocol being widely used.

Many networks use a bit oriented protocol such as SDLC, HDLC, ADCCP or LAPB at the data link level.

All ATM cells have a 5 byte header and a 48 byte payload.

ATM systems use their own protocol which does a bare minimum of error checking and no flow control.


References

The following references are from Tannenbaum, Computer Networks, Third Edition
 

Switching, circuit vs packet p130

BISDN & ATM, switching (blocking, non- blocking) p147

Data Link Layer:

Design issues, problems. Services provided to Network layer.  p176
 


Framing p179

Error detection and correction p183

Data Link Protocols p190

Data Link in ATM p235


(c) MMClements 2001                     Back to Top of Page