ashokpbrvits.files.wordpress.com€¦  · web viewafter connection is established, bidirectional...

41
UNIT-V TRANSPORT LAYER Transport layer the need for process-to-process delivery. The Internet model has three protocols at the transport layer: UDP, TCP, and SCTP. First we discuss UDP, which is the simplest of the three. We see how we can use this very simple transport layer protocol that lacks some of the features of the other two. We then discuss TCP, a complex transport layer protocol. We finally discuss SCTP, the new transport layer protocol that is designed for multi homed , multi stream applications such as multimedia. UDP UDP provides connectionless, unreliable, datagram service. Connectionless service means that there is no logical connection between the two ends exchanging messages. Each message is an independent entity encapsulated in a datagram. UDP does not see any relation (connection) between consequent datagram coming from the same source and going to the same destination. UDP has an advantage: it is message-oriented. It gives boundaries to the messages exchanged. An application program may be designed to use UDP if it is sending small messages and the simplicity and speed is more important for the application than reliability. User Datagram UDP packets, called user datagram, have a fixed-size header of 8 bytes made of four fields, each of 2 bytes (16 bits). . The 16 bits can define a total length of 0 to 65,535 bytes. However, the total length needs to be less because a UDP user datagram is stored in an IP datagram with the total length of 65,535 bytes. The last field can carry the optional checksum UDP Services Process-to-Process Communication UDP provides process-to-process communication using socket addresses, a combination of IP addresses and port numbers. Connectionless Services As mentioned previously, UDP provides a connection less service. This means that each user datagram sent by UDP is an independent datagram. There is no

Upload: others

Post on 21-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

UNIT-V

TRANSPORT LAYER

Transport layer the need for process-to-process delivery. The Internet model has three protocols at the transport layer: UDP, TCP, and SCTP. First we discuss UDP, which is the simplest of the three. We see how we can use this very simple transport layer protocol that lacks some of the features of the other two. We then discuss TCP, a complex transport layer protocol. We finally discuss SCTP, the new transport layer protocol that is designed for multi homed , multi stream applications such as multimedia.

UDP

UDP provides connectionless, unreliable, datagram service. Connectionless service means that there is no logical connection between the two ends exchanging messages. Each message is an independent entity encapsulated in a datagram.

UDP does not see any relation (connection) between consequent datagram coming from the same source and going to the same destination.

UDP has an advantage: it is message-oriented. It gives boundaries to the messages exchanged. An application program may be designed to use UDP if it is sending small messages and the simplicity and speed is more important for the application than reliability.

User Datagram

UDP packets, called user datagram, have a fixed-size header of 8 bytes made of four fields, each of 2 bytes (16 bits).

. The 16 bits can define a total length of 0 to 65,535 bytes. However, the total length needs to be less because a UDP user datagram is stored in an IP datagram with the total length of 65,535 bytes. The last field can carry the optional checksum

UDP ServicesProcess-to-Process Communication

UDP provides process-to-process communication using socket addresses, a combination of IP addresses and port numbers.

Connectionless Services

As mentioned previously, UDP provides a connection less service. This means that each user datagram sent by UDP is an independent datagram. There is no relationship between the different user data grams even if they are coming from the same source process and going to the same destination program.

Flow Control

UDP is a very simple protocol. There is no flow control, and hence no window mechanism. The receiver may overflow with incoming messages.

Error Control

There is no error control mechanism in UDP except for the checksum. This means that the sender does not know if a message has been lost or duplicated.

Checksum

UDP checksum calculation includes three sections: a pseudo header, the UDP header, and the data coming from the application layer. The pseudo header is the part of the header of the IP packet in whichthe user datagram is tobe encapsulated with some fields filled with 0s

UDP Applications UDP Features Connectionless Service

UDP is a connectionless protocol. Each UDP packet is independent from other packets sent by the same application program. This feature can be considered as an advantage or disadvanta8e depending on the application requirements.

Flow and Error Control

UDP does not provide error control; it provides an unreliable service. Most applications expect reliable service from a transport-layer protocol. Although a reliable service is desirable.

Encapsulation and Decapsulation

To send a message from one process to another, the UDP protocol encapsulates and Decapsulates messages in an IP datagram.

Queuing

In UDP, queues are associated with ports.

Typical Applications

The following shows some typical applications that can benefit more from the services of UDP

1.UDP is suitable for a process that requires simple request-response communication with little concern for flow and error control

2.UDP is suitable for a process with internal flow- and error-control mechanisms. For example, the Trivial File Transfer Protocol (TFIP)

3.UDP is a suitable transport protocol for multicasting. Multicasting capability is embedded in the UDP software

4.UDP is used for management processes such as SNMP

5.UDP is used for some route updating protocols such as Routing Information Protocol (RIP)

6.UDP is normally used for interactive real-time applications that cannot tolerate uneven delay between sections of a received message

TRANSMISSION CONTROL PROTOCOL

Transmission Control Protocol (TCP) is a connection-oriented, reliable protocol. TCP explicitly defines connection establishment, data transfer, and connection teardown phases to provide a connection-oriented service.

TCP ServicesProcess-to-Process Communication

As with UDP, TCP provides process-to-process communication using port numbers. We have already given some of the port numbers used by TCP.

Stream Delivery Service

In UDP, a process sends messages with predefined boundaries to UDP for delivery. UDP adds its own header to each of these messages and delivers it to IP for transmission.

TCP, on the other hand, allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes.

TCP creates an environment in which the two processes seem to be connected by an imaginary "tube" that carries their bytes across the Internet.

Sending and Receiving Buffers

Because the sending and the receiving processes may not necessarily write or read data at the same rate, TCP needs buffers for storage.

There are two buffers, the sending buffer and the receiving buffer, one for each direction.

· At the sender, the buffer has three types of chambers. The white section contains empty chambers that can be filled by the sending process (producer).

· The colored area holds bytes that have been sent but not yet acknowledged.

· The TCP sender keeps these bytes in the buffer until it receives an acknowledgment. The shaded area contains bytes to be sent by the sending TCP.

· The operation of the buffer at the receiver is simpler. The circular buffer is divided into two areas (shown as white and colored).

· The white area contains empty chambers to be filled by bytes received from the network.

· The colored sections contain received bytes that can be read by the receiving process. When a byte is read by the receiving process, the chamber is recycled and added to the pool of empty chambers.

Segments

· Although buffering handles the disparity between the speed of the producing and consuming Processes, we need one more step before we can send data.

· The network layer, as a service provider for TCP, needs to send data in packets, not as a stream of bytes. At the transport layer, TCP groups a number of bytes together into a packet called a segment.

· The segments are encapsulated in an IP datagram and transmitted. This entire operation is transparent to the receiving process.

Full-Duplex Communication

TCP offers full-duplex service, in which data can flow in both directions at the same time. Each TCP then has a sending and receiving buffer, and segments move in both directions.

Reliable Service

TCP is a reliable transport protocol. It uses an acknowledgment mechanism to check the safe and sound arrival of data.

Format

The segment consists of a header of 20 to 60 bytes, followed by data from the application program.The header is 20 bytes if there are no options and up to 60 bytes if it contains options.

Source port address This is a 16-bit field that defines the port number of the application program in the host that is sending the segment.

Destination port address This is a 16-bit field that defines the port number of the application program in the host that is receiving the segment.

Sequence number This 32-bit field defines the number assigned to the first byte of data contained in this segment.

Acknowledgment number This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the other party.

Header length This 4-bit field indicates the number of 4-byte words in the TCP header. The length of the header can be between 20 and 60 bytes.

Reserved. This is a 6-bit field reserved for future use.

Control. This field defines 6 different control bits or flags as shown in Figure .One or more of these bits can be set at a time.

URG: Urgent pointer is valid

ACK: Acknowledgment is valid

PSH: Request for push

RST: Reset the connection

SYN: Synchronize sequence numbers

FIN: Terminate the connection

Window size. This field defines the size of the window, in bytes, that the other party must maintain. Note that the length of this field is 16 bits, which means that the maximum size of the window is 65,535 bytes.

Checksum. This 16-bit field contains the checksum. The calculation of the checksum for TCP follows the same procedure as the one described for UDP.

Urgent pointer. This l6-bit field, which is valid only if the urgent flag is set, is used when the segment contains urgent data.

Options. There can be up to 40 bytes of optional information in the TCP header.

TCP Features

Numbering System

the TCP software keeps track of the segments being transmitted or received, there is no field for a segment number value in the segment header. Instead, there are two fields called the sequence number and the acknowledgment number. These two fields refer to the byte number and not the segment number.

Byte Number

The bytes of data being transferred in each connection are numbered by TCP.

The numbering starts with a randomly generated number.

Sequence Number

After the bytes have been numbered, TCP assigns a sequence number to each segment that is being sent. The sequence number for each segment is the number of the first byte carried in that segment’

Acknowledgment Number

The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative.

Flow Control

TCP, unlike UDP, provides flow control. The receiver of the data controls the amount of data that are to be sent by the sender.

Error Control

To provide reliable service, TCP implements an error control mechanism. Although error control considers a segment as the unit of data for error detection (loss or corrupted segments), error control is byte-oriented

Congestion Control

TCP, unlike UDP, takes into account congestion in the network. The amount of data sent by a sender is not only controlled by the receiver (flow control), but is also determined by the level of congestion in the network.

A TCP Connection

· TCP is connection-oriented. a connection-oriented transport protocol establishes a logical path between the source and destination.

· All of the segments belonging to a message are then sent over this logical path.

· TCP operates at a higher level. TCP uses the services of IP to deliver individual segments to the receiver, but it controls the connection itself.

· In TCP, connection-oriented transmission requires three phases: connection establishment, data transfer, and connection termination.

Connection Establishment

TCP transmits data in full-duplex mode. When two TCPs in two machines are connected, they are able to send segments to each other simultaneously.

Three- Way Handshaking

The connection establishment in TCP is called three-way handshaking. an application program, called the client, wants to make a connection with another application program, called the server, using TCP as the transport-layer protocol The process starts with the server. The server program tells its TCP that it is ready to accept a connection. This request is called a passive open.

Although the server TCP is ready to accept a connection from any machine in the world, it cannot make the connection itself.

The client program issues a request for an active open. A client that wishes to connect to an open server tells its TCP to connect to a particular server.

· A SYN segment cannot carry data, but it consumes one sequence number.

· A SYN + ACK segment cannot carry data, but it does consume one sequence number.

· An ACK segment, if carrying no data, consumes no sequence number

Data Transfer

After connection is established, bidirectional data transfer can take place. The client and server can both send data and acknowledgments. We will study the rules of acknowledgment later in the chapter; for the moment, it is enough to know that data traveling in the same direction as an acknowledgment are carried on the same segment. The acknowledgment is piggybacked with the data. Figure shows an example.

Connection Termination

Any of the two parties involved in exchanging data (client or server) can close the connection ,although it is usually initiated by the client. Most implementations today allow two options for connection termination: three-way handshaking.

ATM

Asynchronous Transfer Mode (ATM) is an International Telecommunication Union- Telecommunications Standards Section (ITU-T) standard for cell relay wherein information for multiple service types, such as voice, video, or data, is conveyed in small, fixed-size cells. ATM networks are connection-oriented. Asynchronous transfer mode (ATM) is a technology that has its history in the development of broadband ISDN in the 1970s and 1980s. Technically, it can be viewed as an evolution of packet switching. Like packet switching protocols for data (e.g., X.25, frame relay, Transmission Control Protocol and Internet protocol (TCP IP]), ATM integrates the multiplexing and switching functions, is well suited for bursty traffic (in contrast to circuit switching), and allows communications between devices that operate at different speeds. Unlike packet switching, ATM is designed for high-performance multimedia networking.

ATM technology has been implemented in a very broad range of networking devices. The most basic service building block is the ATM virtual circuit, which is an end-to-end connection that has defined end points and routes but does not have bandwidth dedicated to it. Bandwidth is allocated on demand by the network as users have traffic to transmit. ATM also defines various classes of service to meet a broad range of application needs. This lesson provides an overview of ATM protocols, services, and operation.

Benefits of ATM

The high-level benefits delivered through ATM services deployed on ATM technology using international ATM standards can be summarized as follows:

Dynamic bandwidth for bursty traffic meeting application needs and delivering high utilization of networking resources.

Smaller header with respect to the data to make the efficient use of bandwidth

Can handle Mixed network traffic very efficiently.

Cell network: All data is loaded into identical cells that can be transmitted with complete predictability and uniformity.

Class-of-service support for multimedia traffic allowing applications with varying throughput and latency requirements to be met on a single network.

Scalability in speed and network size supporting link speeds of T1/E1 to OC–12 (622 Mbps).

Common LAN/WAN architecture allowing ATM to be used consistently from one desktop to another.

International standards compliance in central-office and customer-premises environments allowing for multivendor operation.

ATM Devices and the Network Environment

ATM is a cell-switching and multiplexing technology that combines the benefits of circuit switching (guaranteed capacity and constant transmission delay) with those of packet switching (flexibility and efficiency for intermittent traffic). It provides scalable bandwidth from a few megabits per second (Mbps) to many gigabits per second (Gbps). Because of its asynchronous nature, ATM is more efficient than synchronous technologies, such as time-division multiplexing (TDM).

An ATM network is made up of an ATM switch and ATM endpoints. An ATM switch is responsible for cell transit through an ATM network. The job of an ATM switch is well defined. It accepts the incoming cell from an ATM endpoint or another ATM switch. It then reads and updates the cell header information and quickly switches the cell to an output interface towards its destination. An ATM endpoint (or end system) contains an ATM network interface adapter. Examples of ATM endpoints are workstations, routers, digital service units (DSUs), LAN switches, and video coder-decoders (Codec’s).

ATM Network Interfaces

An ATM network consists of a set of ATM switches interconnected by point-to-point ATM links or interfaces. ATM switches support two primary types of interfaces: UNI and NNI as shown in Fig. 4.6.3. The UNI (User-Network Interface) connects ATM end systems (such as hosts and routers) to an ATM switch. The NNI (Network-Network Interface) connects two ATM switches. Depending on whether the switch is owned and located at the customer's premises or is publicly owned and operated by the telephone company, UNI and NNI can be further subdivided into public and private UNIs and NNIs. A private UNI connects an ATM endpoint and a private ATM switch. Its public counterpart connects an ATM endpoint or private switch to a public switch. A private NNI connects two ATM switches within the same private organization. A public one connects two ATM switches within the same public organization.

Figure 4.6.3 UNI and NNI interfaces of the ATM

ATM Cell Format

ATM transfers information in fixed-size units called cells. Each cell consists of 53 octets, or bytes as shown in Fig. 4.6.4. The first 5 bytes contain cell-header information, and the remaining 48 contain the payload (user information). Small, fixed-length cells are well suited to transfer voice and video traffic because such traffic is intolerant to delays that result from having to wait for a large data packet to download, among other things.

Header

5 bytes

Payload

48 bytes

Figure 4.6.4 ATM cell Format

An ATM cell header can be one of two formats: UNI or NNI. The UNI header is used for communication between ATM endpoints and ATM switches in private ATM networks. The NNI header is used for communication between ATM switches. Figure depicts the ATM UNI cell header format, and the ATM NNI cell header format. Unlike the UNI, the NNI header does not include the Generic Flow Control (GFC) field. Additionally, the NNI header has a Virtual Path Identifier (VPI) field that occupies the first 12 bits, allowing for larger trunks between public ATM switches.

· Generic Flow Control (GFC)—Provides local functions, such as identifying multiple stations that share a single ATM interface. This field is typically not used and is set to its default value of 0 (binary 0000).

· Virtual Path Identifier (VPI)—In conjunction with the VCI, identifies the next destination of a cell as it passes through a series of ATM switches on the way to its destination.

· Virtual Channel Identifier (VCI)—In conjunction with the VPI, identifies the next destination of a cell as it passes through a series of ATM switches on the way to its destination.

· Payload Type (PT)—Indicates in the first bit whether the cell contains user data or control data. If the cell contains user data, the bit is set to 0. If it contains control data, it is set to 1. The second bit indicates congestion (0 = no congestion, 1 = congestion), and the third bit indicates whether the cell is the last in a series of cells that represent a single AAL5 frame (1 = last cell for the frame).

· Cell Loss Priority (CLP)—Indicates whether the cell should be discarded if it encounters extreme congestion as it moves through the network. If the CLP bit equals 1, the cell should be discarded in preference to cells with the CLP bit equal to 0.

· Header Error Control (HEC)—Calculates checksum only on the first 4 bytes of the header. HEC can correct a single bit error in these bytes, thereby preserving the cell rather than discarding it.

ATM Virtual Connections

ATM standard defines two types of ATM connections: virtual path connections (VPCs), which contain virtual channel connections (VCCs) as shown in Fig. 4.6.6. A virtual channel connection (or virtual circuit) is the basic unit, which carries a single stream of cells, in order, from user to user. A collection of virtual circuits can be bundled together into a virtual path connection. A virtual path connection can be created from end-to-end across an ATM network.

Figure 4.6.6 Virtual channel connections of ATM

ATM Switching Operations

The basic operation of an ATM switch is straightforward: The cell is received across a link with a known VPI/VCI value. The switch looks up the connection value in a local translation table to determine the outgoing port (or ports) of the connection and the new VPI/VCI value of the connection on that link. The switch then retransmits the cell on that outgoing link with the appropriate connection identifier.

Incoming

Outgoing

VPI

VCI

VPI

VCI

Interface

10

122

11

41

1

121

213

10

158

1

12

11

211

111

2

11

151

321

210

2

(11 22VPI/VCI=211/111VPI/VCI=12/11VPI/VCI=11/41)

(VPI/VCI=10/122) Figure 4.6.7 A VP/VC ATM switch table

Because all VCIs and VPIs have only local significance across a particular link, these values are remapped, as necessary, at each switch. Figure 4.6.7 and Fig. 4.6.8 shows a VP-VC switch and an only VP switch, respectively. Usually the intermediate switches are only VPI switches while switches connected to the users are VPI/VCI switches.

Incoming

Outgoing

VPI

VPI

Interface

22

65

1

121

99

2

312

201

1

11

21

2

(1122VPI = 99VPI = 312VPI = 121VPI = 65)

Figure 4.6.8 VP ATM switch table

To make the switching more efficient, ATM uses two types of switches namely, VP switch and VP-VC switch. A VP switch route cells only on the basis of VPI, here VPIs change but VCIs remain same during switching. On the other hand, VP-VC switch uses the complete identifier, i.e. both VPI and VCI to route the cell. We can think of a VP-VC switch as a combination of Only VP and Only VC switch.

ATM Reference Model

The ATM architecture uses a logical model to describe the functionality that it supports. ATM functionality corresponds to the physical layer and part of the data link layer of the OSI reference model.

The ATM reference model, as shown in Fig. 4.6.9, consists of the following planes, which span all layers:

· Control—This plane is responsible for generating and managing signaling requests.

· User—This plane is responsible for managing the transfer of data.

· Management—This plane contains two components:

· Layer management manages layer-specific functions, such as the detection of failures and protocol problems.

· Plane management manages and coordinates functions related to the complete system.

The ATM reference model consists of the following ATM layers:

· Physical layer—Analogous to the physical layer of the OSI reference model, the ATM physical layer manages the medium-dependent transmission.

Figure 4.6.9 ATM reference model

· ATM layer—Combined with the ATM adaptation layer, the ATM layer is roughly analogous to the data link layer of the OSI reference model. The ATM layer is responsible for the simultaneous sharing of virtual circuits over a physical link (cell multiplexing) and passing cells through the ATM network (cell relay). To do this, it uses the VPI and VCI information in the header of each ATM cell.

· ATM adaptation layer (AAL)—Combined with the ATM layer, the AAL is roughly analogous to the data link layer of the OSI model. The AAL is responsible for isolating higher-layer protocols from the details of the ATM processes. The adaptation layer prepares user data for conversion into cells and segments the data into 48-byte cell payloads. Finally, the higher layers residing above the AAL accept user data, arrange it into packets, and hand it to the AAL.

The ATM Physical Layer

The main functions of the ATM physical layer are as follows:

· Cells are converted into a bit stream,

· The transmission and receipt of bits on the physical medium are controlled,

· ATM cell boundaries are tracked,

· Cells are packaged into the appropriate types of frames for the physical medium.

The ATM physical layer is divided into two parts: the physical medium-dependent (PMD) sub layer and the transmission convergence (TC) sub layer.

The PMD sub layer provides two key functions.

· It synchronizes transmission and reception by sending and receiving a continuous flow of bits with associated timing information.

· It specifies the physical media for the physical medium used, including connector types and cable.

The TC sub layer has four functions:

· Cell delineation, it maintains ATM cell boundaries, allowing devices to locate cells within a stream of bits.

· Generates and checks the header error control code to ensure valid data.

· Cell-rate decoupling, maintains synchronization and inserts or suppresses idle (unassigned) ATM cells to adapt the rate of valid ATM cells to the payload capacity of the transmission system.

· Transmission frame adaptation packages ATM cells into frames acceptable to the particular physical layer implementation.

ATM Layer

The ATM layer provides routing, traffic management, switching and multiplexing services. It processes outgoing traffic by accepting 48-byte segment from the AAL sub- layers and transforming them into 53-byte cell by addition of a 5-byte header. The cell header format is already discussed in section 4.6.4. And the switching part and virtual connections were discussed in 4.6.5.

Adaptation Layers

ATM adaptation layers allow existing packet networks to connect to ATM facilities. AAL Protocol accepts transmission from upper layer services (e.g.: packet data) and map them into fixed-sized ATM cells. These transmissions can be of any type, variable or fixed data rate. At the receiver, this process is reversed and segments are reassembled into their original formats and passed to the receiving services. Instead of one protocol for all types of data, the ATM standard divides the AAL layer into categories, each supporting the requirements of different types of applications. There are four types of data streams that are identified: Constant-bit rate, variable bit-rate, connection oriented packet data transfer, connectionless packet data transfer. In addition to dividing AAL by category (AAL1, AAL2 and so on), ITU-T also divides it on the basis of functionality. Each AAL layer is actually divided into two layers: the convergence sub-layer and Segmentation and reassembly (SAR) sub-layer. Table 4.6.1 below gives a brief description of these data streams and various ATM adaptation layers which are used for each of them.

Table 4.6.1 Mapping of various data types and ATM adaptation layers

Service Class

Quality of Service Parameter

ATM Adaptation layers

Constant

Bit rate (CBR)

This class is used for emulating circuit switching. The cell rate is constant with time. CBR applications are quite sensitive to cell-delay variation. Examples of applications that can use CBR are telephone traffic (i.e., nx64 kbps), videoconferencing, and television.

AAL1: AAL1, a connection-oriented service, is suitable for handling constant bit rate sources (CBR), such as voice and videoconferencing. AAL1 requires timing synchronization between the source and the destination. For this reason, AAL1 depends on a medium, such as SONET, that supports clocking. The AAL1 process prepares a cell for transmission in three steps. First, synchronous samples (for example, 1 byte of data at a sampling rate of 200 microseconds) are inserted into the Payload field. Second, Sequence Number (SN) and Sequence Number Protection (SNP) fields are added to provide information that the receiving AAL1 uses to verify that it has received cells in the correct order. Third, the remainder of the Payload field is filled with enough single bytes to equal 48

bytes.

Variable Bit Rate - non-real time (VBR– NRT)

This class allows users to send traffic at a rate that varies with time depending on the availability of user information. Statistical multiplexing is provided to make optimum use of network resources. Multimedia e-mail is an example of VBR–NRT.

AAL 2: The AAL2 process uses 44 bytes of the cell payload for user data and reserves 4 bytes of the payload to support the AAL2 processes.

VBR traffic is characterized as either real-time (VBR-RT) or as non-real-time (VBR-NRT). AAL2 supports both types of VBR traffic.

Variable bit rate–real time (VBR–RT)

This class is similar to VBR–NRT but is designed for applications that are sensitive to cell-delay variation. Examples for real-time VBR are voice with speech activity detection (SAD) and interactive compressed

video.

Connection oriented packet transfer or

Available bit rate (ABR)

This class of ATM services provides rate-based flow control and is aimed at data traffic such as file transfer and e-mail. Although the standard does not require the cell transfer delay and cell-loss ratio to be guaranteed or minimized, it is desirable for switches to minimize delay and loss as much as possible. Depending upon the state of congestion in the network, the source is required to control its rate. The users are allowed to declare a minimum cell rate, which is guaranteed to the connection by the network.

AAL3/4: AAL3/4 supports both connection- oriented and connectionless data. AAL3/4 prepares a cell for transmission in four steps. First, the convergence sub layer (CS) creates a protocol data unit (PDU) by prepending a beginning/end tag header to the frame and appending a length field as a trailer. Second, the segmentation and reassembly (SAR) sub layer fragments the PDU and prepends a header to it. Then the SAR sub layer appends a CRC-10 trailer to each PDU fragment for error control. Finally, the completed SAR PDU becomes the Payload field of an ATM cell to which the ATM layer prepends the standard ATM header.

AAL 5: AAL5 is the primary AAL for data and supports both connection-oriented and connectionless data. It is used to transfer most non-SMDS data, such as classical IP over ATM and LAN Emulation (LANE). AAL5 also is known as the simple and efficient adaptation layer (SEAL)

Connectionless data transfer or unspecified bit rate (UBR)

This class is the catch-all, other class and is widely used today for TCP/IP.

ATM Applications

ATM is used in both LANs and WANs; let’s have a look at few of the possible applications.

ATM WANs: ATM is basically a WAN technology that delivers cell over long distances. Here ATM is mainly used to connect LANs or other WANs together. A router between ATM network and the other network serves as an end point. This router has two stacks of protocols: one belonging to ATM and other belonging to other protocol.

ATM LANs: High data rate (155 and 622 Mbps) of ATM technology attracted designers to think of implementing ATM technology in LANs too. At the surface level, to implement an ATM LAN ATM switch will replace the traditional Ethernet switch, in a switched LAN. But few things have to be kept in mind and software modules would be needed to map the following differences between the two technologies:

· Connectionless versus connection-oriented: ATM is a virtual connection oriented technology, while traditional Ethernet uses connectionless protocols.

· Physical address versus virtual circuit identifier: In the Traditional LAN packets are routed based on the source and destination addresses, while in ATM cells are routed based on the virtual circuit identifiers (VPI-VCI pair).

LAN Emulation: LAN Emulation (LANE) is a standard defined by the ATM Forum that gives to stations attached via ATM the same capabilities that they normally obtain from legacy LANs, such as Ethernet and Token Ring. As the name suggests, the function of the LANE protocol is to emulate a LAN on top of an ATM network. Specifically, the LANE protocol defines mechanisms for emulating either an IEEE 802.3 Ethernet or an Token Ring LAN.

Multimedia virtual private networks and managed services: Service providers are building on their ATM networks to offer a broad range of services. Examples include managed ATM, LAN, voice and video services (these being provided on a per- application basis, typically including customer-located equipment and offered on an end- to-end basis), and full-service virtual private-networking capabilities (these including integrated multimedia access and network management).

Frame-relay backbones: Frame-relay service providers are deploying ATM backbones to meet the rapid growth of their frame-relay services to use as a networking infrastructure for a range of data services and to enable frame relay to ATM service internetworking services.

Internet backbones: Internet service providers are likewise deploying ATM backbones to meet the rapid growth of their frame-relay services, to use as a networking infrastructure for a range of data services, and to enable Internet class-of-service offerings and virtual private intranet services.

Carrier infrastructures for the telephone and private-line networks: Some carriers have identified opportunities to make more-effective use of their SONET/SDH fiber infrastructures by building an ATM infrastructure to carry their telephony and private- line traffic

Cryptography

The word cryptography has come from a Greek word, which means secret writing. In the present day context it refers to the tools and techniques used to make messages secure for communication between the participants and make messages immune to attacks by hackers. For private communication through public network, cryptography plays a very crucial role. The role of cryptography can be illustrated with the help a simple model of cryptography as shown in Fig. The message to be sent through an unreliable medium is known as plaintext, which is encrypted before sending over the medium. The encrypted message is known as ciphertext, which is received at the other end of the medium and decrypted to get back the original plaintext message. In this lesson we shall discuss various cryptography algorithms, which can be divided into two broad categorize - Symmetric key cryptography and Public key cryptography.

Symmetric Key Cryptography

The cipher, an algorithm that is used for converting the plaintext to ciphertex, operates on a key, which is essentially a specially generated number (value). To decrypt a secret message (ciphertext) to get back the original message (plaintext), a decrypt algorithm uses a decrypt key. In symmetric key cryptography, same key is shared, i.e. the same key is used in both encryption and decryption as shown in Fig. The algorithm used to decrypt is just the inverse of the algorithm used for encryption. For example, if addition and division is used for encryption, multiplication and subtraction are to be used for decryption.

Symmetric key cryptography algorithms are simple requiring lesser execution time. As a consequence, these are commonly used for long messages. However, these algorithms suffer from the following limitations:

· Requirement of large number of unique keys. For example for n users the number of keys required is n(n-1)/2.

· Distribution of keys among the users in a secured manner is difficult. Figure .

Monoalphabetic Substitution

One simple example of symmetric key cryptography is the Monoalphabetic substitution. In this case, the relationship between a character in the plaintext and a character in the ciphertext is always one-to-one. An example Monoalphabetic substitution is the Caesar cipher. As shown in Fig. in this approach a character in the ciphertext is substituted by another character shifted by three places, e.g. A is substituted by D. Key feature of this approach is that it is very simple but the code can be attacked very easily.

Polyalphabetic Substitution

This is an improvement over the Caesar cipher. Here the relationship between a character in the plaintext and a character in the ciphertext is always one-to-many. Key feature of this approach is that it is more complex and the code is harder to attack successfully.

Transpositional Cipher

The transpositional cipher, the characters remain unchanged but their positions are changed to create the ciphertext. Figure illustrates how five lines of a text get modified using transpositional cipher. The characters are arranged in two-dimensional matrix and columns are interchanged according to a key is shown in the middle portion of the diagram. The key defines which columns are to be swapped. As per the key shown in the figure, character of column is to be swapped to column 3, character of column 2 is to be swapped to column 6, and so on. Decryption can be done by swapping in the reverse order using the same key. Transpositional cipher is also not a very secure approach. The attacker can find the plaintext by trial and error utilizing the idea of the frequency of occurrence of characters.

Simple Modern Ciphers

A modern symmetric cipher is a combination of simple ciphers. In other words, a modern cipher uses several simple ciphers to achieve its goal.

XOR Cipher

Modern ciphers today are normally made of a set of simple ciphers, which are simple predefined functions in mathematics or computer science. The first one discussed here is called the XOR cipher because it uses the exclusive-or operation as defined in computer science.

An XOR operation needs two data inputs plaintext, as the first and a key as the second. In other words, one of the inputs is the block to be the encrypted, the other input is a key; the result is the encrypted block. Note that in an XOR cipher, the size of the key, the plaintext, and the ciphertext are all the same. XOR ciphers have a very interesting property: the encryption and decryption are the same.

Rotation Cipher

Another common cipher is the rotation cipher, in which the input bits are rotated to the left or right. The rotation cipher can be keyed or keyless. In keyed rotation, the value of the key defines the number of rotations; in keyless rotation the number of rotations is fixed. Figure 30.10 shows an example of a rotation cipher. Note that the rotation cipher can be considered a special case of the transpositional cipher using bits instead of characters.

The rotation cipher has an interesting property. If the length of the original stream is N, after N rotations, we get the original input stream. This means that it is useless to apply more than N - 1 rotations. In other words, the number of rotations must be between 1 and N-1.

Substitution Cipher: S-box

An S-box (substitution box) parallels the traditional substitution cipher for characters. The input to an S-box is a stream of bits with length N; the result is another stream of bits with length M. And N and M are not necessarily the same. Figure 30.11 shows an S-box. The S-box is normally keyless and is used as an intermediate stage of encryption or decryption. The function that matches the input to the output may be defined mathematically or by a table.

Transposition Cipher: P-box

A P-box (permutation box) for bits parallels the traditional transposition cipher for characters.It performs a transposition at the bit level; it transposes bits. It can be implemented in software or hardware, but hardware is faster. P-boxes, like S-boxes, are normally keyless. We can have three types of permutations in P-boxes: the straight permutation, expansion permutation, and compression permutation as shown in Figure A straight permutation cipher or a straight P-box has the same number of inputs as outputs. In other words, if the number of inputs is N, the number of outputs is also N. In an expansion permutation cipher, the number of output ports is greater than the number of input ports. In a compression permutation cipher, the number of output ports is less than the number of input ports.

Modern Round Ciphers

The ciphers of today are called round ciphers because they involve multiple rounds,where each round is a complex cipher made up of the simple ciphers that we previously described. The key used in each round is a subset or variation of the general key called the round key. If the cipher has N rounds, a key generator produces N keys, K1 K2, ..., KN, where K1 is used in round 1, K2 in round 2, and so on. In this section, we introduce two modem symmetric-key ciphers: DES and AES. These ciphers are referred to as block ciphers because they divide the plaintext into blocks and use the same key to encrypt and decrypt the blocks.

Data Encryption Standard (DES)

One example of a complex block cipher is the Data Encryption Standard (DES). DES was designed by IBM and adopted by the U.S. government as the standard encryption method for nonmilitary and nonclassified use. The algorithm encrypts a 64-bit plaintext block using a 64-bit key, as shown in Figure.

DES has two transposition blocks (P-boxes) and 16 complex round ciphers (they are repeated). Although the 16 iteration round ciphers are conceptually the same, each uses a different key derived from the original key.

The initial and final permutations are keyless straight permutations that are the inverse of each other. The permutation takes a 64-bit input and permutes them according to predefined values.

Triple DES

Triple DES, popularly known as 3DES, is used to make DES more secure by effectively increasing the key length. Its operation is explained below:

· Each block of plaintext is subjected to encryption by K1, decryption by K2 and again encryption by K1 in a sequence as shown in Fig. 8.1.15

· CBC is used to turn the block encryption scheme into a stream encryption scheme

Figure 8.1.15 Triple DES encryption technique

Advanced Encryption Standard (AES)

The Advanced Encryption Standard (AES) was designed because DES's key was too small. Although Triple DES ODES) increased the key size, the process was too slow. AES is a very complex round cipher. AES is designed with three key sizes: 128, 192, or 256 bits. Table 30.1 shows the relationship between the data block, number of rounds, and key size.The structure and operation of the other configurations are similar. The difference lies in the key generation.

Mode of Operation

A mode of operation is a technique that employs the modern block ciphers such as DES and AES.There exist several modes of operation as follows:

· Electronic Code Book (ECB)

· Cipher Block Chaining (CBC)

· Cipher Feedback Mode (CFB)

· Output Feedback Mode (OFB)

Electronic Code Book (ECB)

This is part of the regular DES algorithm. Data is divided into 64-bit blocks and each block is encrypted one at a time separately as shown in Fig. 8.1.11. Separate encryptions with different blocks are totally independent of each other.

Disadvantages of ECB

· If a message contains two identical blocks of 64-bits, the ciphertext corresponding to these blocks are identical. This may give some information to the eavesdropper

· Someone can modify or rearrange blocks to his own advantage

· Because of these flaws, ECB is rarely used

Figure 8.1.11 Electronic Code Book (ECB) encryption technique

Cipher Block Chaining (CBC)

In this mode of operation, encrypted ciphertext of each block of CBC is XORed with the next plaintext block to be encrypted, thus making all the blocks dependent on all the previous blocks. The initialization vector is sent along with data as shown in Fig. 8.1.12.

Figure 8.1.12 Cipher Block Chaining (CBC) encryption technique

Cipher Feedback Mode (CFB)

· In this mode, blocks of plaintext that is less than 64 bits long can be encrypted as shown in Fig. 8.1.13.

· This is commonly used with interactive terminals

· It can receive and send k bits (say k=8) at a time in a streamed manner

Figure 8.1.13 Cipher Feedback Mode (CFB) encryption technique

1. If we change the from one encryption to another using the same plaintext, the Cipher text is different.

2. The cipher text Ci depends on both Pi and the preceding cipher text block.

3. Errors in one or more bits of the cipher text block affect the next cipher text blocks.

Output Feedback Mode (OFB)

The encryption technique of Output Feedback Mode (OFB) is shown in Fig. 8.1.14. Key features of this mode are mentioned below:

· OFB is also a stream cipher

· Encryption is performed by XORing the message with the one-time pad

· One-time pad can be generated in advance

· If some bits of the cipher text get garbled, only those bits of plaintext get garbled

· The message can be of any arbitrary size

· Less secure than other modes

Figure 8.1.14 Output Feedback Mode (OFB) encryption technique

1. If we change the from one encryption to another using the same plaintext, the Cipher text will be different.

2. The cipher text Ci depends on the plaintext Pi'

3. Errors in one or more bits of the cipher text do not affect future cipher text blocks.

Public key Cryptography(Asymmetric key cryptography)

In public key cryptography, there are two keys: a private key and a public key. The public key is announced to the public, where as the private key is kept by the receiver. The sender uses the public key of the receiver for encryption and the receiver uses his private key for decryption as shown in Fig. 8.1.16.

Advantages:

The pair of keys can be used with any other entity

The number of keys required is small

Disadvantages:

It is not efficient for long messages

Association between an entity and its public key must be verified

RSA

The most popular public-key algorithm is the RSA (named after their inventors Rivest, Shamir and Adleman) as shown in Fig. 8.1.17. Key features of the RSA algorithm are given below:

· Public key algorithm that performs encryption as well as decryption based on number theory

· Variable key length; long for enhanced security and short for efficiency (typical 512 bytes)

· Variable block size, smaller than the key length

· The private key is a pair of numbers (d, n) and the public key is also a pair of numbers (e, n)

· Choose two large primes p and q (typically around 256 bits)

· Compute n = p x q and z = (p-1)x(q-1)

· Choose a number d relatively prime to z

· Find e such that e x d mod (p-1)x(q-1) = 1

· e and n to the public; Z and d secret.

· For encryption: C = Pe (mod n) For decryption: P = Cd (mod n)

Figure 8.1.17 The RSA public key encryption technique

Diffie-Hellman

RSA is a public-key cryptosystem that is often used to encrypt and decrypt symmetric keys. Diffie-Hellman, on the other hand, was originally designed for key exchange. In the Diffie-Hellman cryptosystem, two parties create a symmetric session key to exchange data without having to remember or store the key for future use. They do not have to meet to agree on the key; it can be done through the Internet. Let us see how the protocol works when Alice and Bob need a symmetric key to communicate. Before establishing a symmetric key, the two parties need to choose two numbers p and g. The first number, p, is a large prime number on the order of 300 decimal digits (1024 bits). The second number is a random number. These two numbers need not be confidential. They can be sent through the Internet; they can be public.

Procedure

Figure 30.26 shows the procedure. The steps are as follows:

--------------------------------------

K=gXY mod pStep 1: Alice chooses a large random number x and calculates R1=gx mod p.

Step 2: Bob chooses another large random number y and calculates R2 = gY mod p.

Step 3: Alice sends R1 to Bob. Note that Alice does not send the value of x; she sends only R1-

Step 4: Bob sends R2 to Alice. Again, note that Bob does not send the value of y,he sends only R2.

Step 5: Alice calculates K = (R2)X mod p.

Step 6: Bob also calculates K = (R1)Y mod p.

The symmetric key for the session is K.

(gx mod p)Y mod p =(gY mod p)X mod p =gxy mod p

Network security

Network security can provide one of the five services as shown in Figure 31.1. Four of these services are related to the message exchanged using the network: message confidentiality, integrity, authentication, and non repudiation. The fifth service provides entity authentication or identification.

Message Confidentiality

Message confidentiality or privacy means that the sender and the receiver expect confidentiality. The transmitted message must make sense to only the intended receiver. To all others, the message must be garbage. When a customer communicates with her bank, she expects that the communication is totally confidential.

Techniques

The actual implementation of security goals needs some help from mathematics. Two techniques are prevalent today: one is very general cryptography and one is specific steganography.

Cryptography

Some security services can be implemented using cryptography. Cryptography, a word with Greek origins, means “secret writing”.

Steganography

The word steganography, with its origin in Greek, means “covered writing”, in contrast to cryptography, which means “secret writing”.

symmetric- key cryptography

Figure 16.4 shows the general idea behind symmetric- key cryptography. Alice can send a message to Bob over an insecure channel with the assumption that an adversary, Eve, cannot understand the contents of the message by simply eavesdropping on the channel.

The original message from Alice to Bob is referred to as plaintext; the message that is sent through the channel is referred to as the ciphertext. Alice uses an encryption algorithm and a shared secret key. Bob uses a decryption algorithm and the same secret key.

(Figure 16.4 The general idea of symmetric-key cryptography16.13)

Traditional ciphers

Traditional ciphers usedtwotechniques for hiding information from an intruder: substitution & transposition.

Substitution ciphers

A substitution cipher replaces one symbol with another. If the symbols in the plaintext are alphabetic characters, we replace one character with another.

( Example 16.1 Use the additive cipher with key = 15 to encrypt the message “hello”.Solution:We apply the encryption algorithm to the plaintext, character by character: The ciphertext is therefore “wtaad”.16.15)

Modern symmetric-key ciphers

Since traditional ciphers are no longer secure, modern symmetric-key ciphers have been developed during the last few decades. Modern ciphers normally use a combination of substitution, transposition and some other complex transformations to create a ciphertext from a plain text . Modern ciphers are bit-oriented. The plaintext, ciphertext and the key are strings of bits. In this section we briefly discuss two examples of modern symmetric-key ciphers: DES and AES. The coverage of these two ciphers is short: interested readers can consult the references at the end of the chapter for more details.

DES

The Data Encryption Standard (DES) is a symmetric-key block cipher published by the National Institute of Standards and Technology (NIST) in 1977. DES has been the most widely used symmetric-key block cipher since its publication (Figure 16.5).

Asymmetric-key cryptography

Figure 16.7 shows the general idea of asymmetric-key cryptography as used for confidentiality. The figure shows that, unlike symmetric-key cryptography, there are distinctive keys in asymmetric-key cryptography: a private key and a public key. If encryption and decryption are thought of as locking and unlocking padlocks with keys, then the padlock that is locked with a public key can be unlocked only with the corresponding private key. Eve should not be able to advertise her public key to the community pretending that it is Bob’s public key.

(Figure 16.7 The general idea behind asymmetric-key cryptography16.23)

Message Integrity

Message integrity means that the data must arrive at the receiver exactly as they were sent. There must be no changes during the transmission, neither accidentally nor maliciously.

There are occasions on which we may not even need secrecy, but instead must have integrity. One way to preserve the integrity of a document was traditionally through the use of a fingerprint. The electronic equivalent of the document and fingerprint pair is the message and digest pair. To preserve the integrity of a message, the message is passed through an algorithm called a cryptographic hash function. The function creates a compressed image of the message that can be used like a fingerprint. Figure 16.8 shows the message, cryptographic hash function and message digest.

(Figure 16.8 Message and digest16.31The message digest needs to be safe from change.)

(Figure 16.9 Checking integrity16.32Checking integrityTo check the integrity of a message or document, we run the cryptographic hash function again and compare the new message digest with the previous one. If both are the same, we are sure that the original message has not been changed. Figure 16.9 shows the idea.)

Message Authentication

Message authentication is a service beyond message integrity. In message authentication the receiver needs to be sure of the sender's identity and that an imposter has not sent the message.

A message digest guarantees the integrity of a message—it guarantees that the message has not been changed. A message digest, however, does not authenticate the sender of the message. When Alice sends a message to Bob, Bob needs to know that the message is really from Alice. To provide message authentication, Alice needs to provide proof that it is she who is sending the message and not an impostor. A message digest per se cannot provide such a proof. The digest created by a cryptographic hash function is normally called a modification detection code (MDC). What we need for message authentication is a message authentication code (MAC).

(Message authentication code (MAC)To ensure the integrity of the message and authenticate its origin, we need to change an MDC to a MAC. The difference is that the latter includes a secret between Alice and Bob.Figure 16.10 Message authentication code16.34)

Digital signatures

We are all familiar with the concept of a signature. A person signs a document to show that it originated from him/her or was approved by him/her. The signature is proof to the recipient that the document comes from the correct entity. In other words, a signature on a document, when verified, is a sign of authentication—the document is authentic. When Alice sends a message to Bob, Bob needs to check the authenticity of the sender: he needs to be sure that the message comes from Alice and not Eve. Bob can ask Alice to sign the message electronically. In other words, an electronic signature can prove the authenticity of Alice as the sender of the message. We refer to this type of signature as a digital signature.

(Digital signature processFigure 16.11 shows the digital signature process. The sender uses a signing algorithm to sign the message. The message and the signature are sent to the recipient. The recipient receives the message and the signature and applies the verifying algorithm to the combination. If the result is true, the message is accepted, otherwise it is rejected.Figure 16.11 The digital signature process16.36)

Message Nonrepudiation

Message nonrepudiation means that a sender must not be able to deny sending a message that he or she, in fact, did send. The burden of proof falls on the receiver. For example, when a customer sends a message to transfer money from one account to another, the bank must have proof that the customer actually requested this transaction.

(ServicesA digital signature provides three out of our initial five security services: message,authentication, message integrity and non-repudiation. We have seen the first two, the third can be done using the following figure.Figure 16.13 Non-repudiation using digital signatures16.39)

Entity Authentication

In entity authentication (or user identification) the entity or user is verified prior to access to the system resources (files, for example). For example, a student who needs to access her university resources needs to be authenticated during the logging process. This is to protect the interests of the university and the student.

Entity authentication is a technique designed to let one party prove the identity of another party. An entity can be a person, a process, a client or a server. The entity whose identity needs to be proved is called the claimant: the party that tries to prove the identity of the claimant is called the verifier.

Data-origin versus entity authentication

There are two differences between message authentication (data-origin authentication), discussed before, and entity authentication, discussed in this section.

· Message authentication (or data-origin authentication) might not happen in real time, while entity authentication does.

· Message authentication simply authenticates one message: the process needs to be repeated for each new message. Entity authentication authenticates the claimant for the entire duration of a session.

Verification categories

In entity authentication, the claimant must identify themselves to the verifier. This can be done with one of three kinds of witnesses:

· Something known. This is a secret known only by the claimant that can be checked by the verifier. Examples are a password, a PIN, a secret key and a private key.

· Something possessed. This is something that can prove the claimant’s identity. Examples are a passport, a driver’s license, an identification card and a credit card

· Something inherent. This is an inherent characteristic of the claimant. Examples are conventional signatures, fingerprints, voice, facial characteristics, retinal pattern and handwriting.

KEY MANAGEMENT

To use symmetric-key cryptography, a shared secret key needs to be established between the two parties. To use asymmetric-key cryptography, each entity needs to create a pair of keys and distribute the public key securely to the community. Key management defines some procedures to create and distribute keys securely.

Symmetric-key distribution

In a community with n entities, n (n − 1)/2 keys are needed for symmetric-key communication. The number of keys is not the only problem: the distribution of keys is another. If Alice and Bob want to communicate, they need a way to exchange a secret key. If Alice wants to communicate with a million people, how can she exchange a million keys with

them? Using the Internet is definitely not a secure method. It is obvious that we need an efficient way to maintain and distribute secret keys.

Key distribution center: KDC

A practical solution is the use of a trusted third party, referred to as a key-distribution center (KDC). Each person establishes a shared secret key with the KDC. A secret key is established between the KDC and each member. The process is as follows:

1. Alice sends a request to the KDC stating that she needs a session (temporary) secret key between herself and Bob.

2. The KDC informs Bob about Alice’s request.

3. If Bob agrees, a session key is created between the two.

Public-key distribution

In asymmetric-key cryptography, people do not need a symmetric shared key. If Alice wants to send a message to Bob, she only needs to know Bob’s public key, which is open to the public and available to everyone. If Bob needs to send a message to Alice, he only needs to know Alice’s public key, which is also known to everyone. In public-key cryptography, everyone shields a private key and advertises a public key.

Public announcement

The naive approach is to announce public keys publicly. Bob can put his public key on his web site or announce it in a local or national newspaper. When Alice needs to send a confidential message to Bob, she can obtain Bob’s public key from his site or from the newspaper, or even send a message to ask for it. This approach, however, is not secure—it is subject to forgery.

Trusted center

A more secure approach is to have a trusted center retain a directory of public keys. The directory, like the one used in a telephone system, is dynamically updated. Each user can select a private and public key, keep the private key, and deliver the public key for insertion into the directory. The center requires that each user register in the center and prove their identity. The directory can be publicly advertised by the trusted center. The center can also respond to any inquiry about a public key.

Certification authority

The previous approach can create a heavy load on the center if the number of requests is large. The alternative is to create public-key certificates. Bob wants two things: he wants people to know his public key, and he wants no-one to accept a forged public key as his. Bob can go to a certification authority (CA), a government authority that binds a public key to an entity and issues a certificate. The CA itself has a well known public key that cannot be forged. The CA issues a certificate for Bob. To prevent the certificate itself from being forged, the CA signs the certificate with its private key. Now Bob can upload the signed certificate. Anyone who wants Bob’s public key downloads the signed certificate and uses the center’s public key to extract Bob’s public key.