You are on page 1of 47

Introduction and Data Link Layer UNIT 1

Introduction: Each of the past three centuries has been dominated by a single technology. The 18th century was the time of great mechanical systems accompanying the industrial revolution. The 19 th century was the age of steam engine. During 20th century, the information gathering, processing and distribution. Earlier computer systems were highly centralized usually with in a single room, which were used to serve almost all organizations computer needs. After merging computers and communications there is a lot of influence on the computer system organization. With this computational needs of an organization are replaced with large number of separate but inter connected computers. These systems are called computer networks. A computer network is an interconnected collection of autonomous computers. Two computers are said to be interconnected if they are able to exchange information. The connection need not be via a copper wire; fiber optics, microwave links and communication satellites can also be used. Definitions: Network: Interconnected collection of autonomous computers Host: machine running user application Subnet: Communication subnet carries messages between hosts Channel: Logical Line of communication (circuit) Topology: Network Configuration Components of computer Network: The communication between the two nodes is implemented and controlled by using hardware (physical) and software (logical) components in a computer network. Hardware components: 1. Computer hardware 2. Front End Processor 3. Terminals 4. Modems, Multiplexers, Concentrators 5. Transmission media 6. Data switching equipment (switches, routers etc.) Logical Components: S. SANTHI PRIYA UNIT 1 NOTES 1

1. Operating systems protocols for 2. File management systems 3. Communication software 4. Application software. Computer Networks: A network is a set of devices (also referred to as nodes) connected by a media links. Each node can be computer, printer or any other device capable of sending the data and/or receiving the data generated by other nodes of the network. These links connecting the devices are also called communication channels. Network Criteria: To get an effective and efficient network, it must meet a number of criteria. The most important are performance, reliability and security. It depends upon number of factors including number of users, type of transmission medium , capability of the connected hardware and efficiency of the software. Number of users: Generally the design of a network is based on the assessment of the average number of users that will be communicating at any one time. In peak load period, however the actual number of users can exceed the average load and there by decrease the network performance. Types of Transmission Medium: The medium defines the speed at which data can travel.A medium that can carry at 100 Mbps is ten times more powerful than a medium that can carry data at only 10 Mbps. Hardware: The types of hardware included in a network affect both the speed and capacity of the transmission. A higher speed with greater storage capacity computer provides better performance. Software: The software used to process the data at the sender; receiver and intermediate nodes also affect the network performance. The software is used to provide the services, such as routing, to ensure error free delivery, congestion control, flow control, etc. A well designed software can speed up the process and make transmission more effective and efficient. Reliability: It can be measured by frequency of failure, the time it takes a link to recover from a failure and the network robustness in a catastrophe. Frequency of a Failure: It indicates the reliability of the network. A network that fails often, however is of little value to a user. Recovery Time of a Network after Failure: A network which recovers quickly is more useful. Otherwise, it has to provide an alternate link.

S. SANTHI PRIYA

UNIT 1

NOTES

Catastrophe: Networks must be protected from catastrophic events such as earth quake, fire or theft. Security: Network security includes protecting data from unauthorized access and viruses. Unauthorized access: For a network to be useful, sensitive data must be protected from un authorized access (passive intruder) and also from active intruder. Mainly protection can be accomplished at two levels, at a lower level user identification codes and passwords and at a higher level encryption technique. Viruses: A network can be susceptible to viruses because a network is accessible from many points. A virus is an illicitly introduced code that damages the system. A network can be protected from virus by hardware and software specially designed for it. Networks for Companies: In many organizations which have a number of computers in operation, often located for apart, to keep the track of inventories, monitor productivity and do the local pay roll at that loacation. It is necessary to connect all the computers to extract and correlate the information about entire organization. 1. The advantage while doing so is resource sharing, the goal is to make all programs, equipment and data available to any one on the network without regard to the physical location of the resource and the user. 2. A second advantage or goal is to provide high reliability by having alternative sources of files. If all files are replicated on two or three computers, so if one of them is unavailable, the other copies can be used. 3. Third on is saving money. Small computers have a much better price/performance ratio than long ones. 4. Another goal is scalability, the ability to increase system performance gradually as the work load grows just by adding more processors. 5. Another important and powerful goal is communication medium using the network, it is possible to communicate together who are apart. Networks for people: At the early of 1990s, the computer networks began to start delivering services to private individuals at home. There are three major services: 1. Access to remote information. 2. Person to Person communication. 3. Interactive entertainment. Access to remote information will come in a category of interaction between person and remote data base. Many people paying their bills

S. SANTHI PRIYA

UNIT 1

NOTES

managing bank accounts, home shopping, making reservations, booking cinema tickets, on line news paper, on line digital library. Another application which falls on this category is access of information WWW, which contains information about arts, business, government, health, society, science, sports, travel and too many other topics. E-mail is the widely used person to person communication, by which communication having messages which audio and video is done. One more is virtual meeting, called video conference. Television, new films information and game playing come in the category of Interactive entertainment. Social aspects: The most popular feature of many networks are news groups or bulletin boards where people exchange information with like minded individuals. This is a positive use of computer networks. The problem arises while news groups are setup on the topics like politics, religion which would turn controversial at times. Computer networks offer the potential of sending anonymous messages, which are undesirable in most cases. Why networks use protocols? All networks require rules so that entities can communicate with each other Protocol is a set rules and standards that defines how devices and applications communicate A Protocol defines what is communicated, how it is communicated and when it is communicated Why a Layered Network Model? A model is a pattern that organizes general concepts as an easily understood description Reduces complexity Standardizes interfaces Ensures interoperable technology Accelerates evolution Simplifies teaching and learning

Network Hardware: Classification based on transmission technology : 1) Broadcast Networks 2) Point to Point Networks - Broadcast Networks use one communication channel that is shared by all the machines. Packets are sent to the shared channel and are listened to by all machines.(for smaller, geographically localized networks) Broadcast

S. SANTHI PRIYA

UNIT 1

NOTES

Networks: a single communication channel is shared by all computers on the network. - Point to Point network packets are routed to their destination. Used for larger area.(routing algorithms play an important role) This type of networks provides a direct link between two computers. Classification based on scale - Data Flow machine : Same circuit board - Multicomputer : same system, processors communicate over high speed busses - LAN: Room, Building, Campus - MAN: City -WAN: Country, Continent - Internet: Global LAN: LANs are distinguished from other kinds of networks by 1. Size 2. Topology( token bus IEEE standard 802.3, token Ring IEEE standard 802.4 of Broad cast networks) 3. Transmission technology Broadcast in LAN: each time one machine is the master and is allowed to transmit. Static Broadcast: round robin algorithm Dynamic Broadcast: each machine has to decide itself weather or not to transmit. MAN: MAN is distinguished by its adopted standard DQDB DQDB: Distributed Queue Dual Bus(IEEE standard 802.6) - it contains two unidirectional buses which all the omputers are connected WAN - spans over Country or continent - The different Hosts are connected by a communication subnet or subnet Topology: Some possible topologies are Star , Ring, Tree,, Bus; internet & Internet internet: a collection of interconnected networks Internet: specific worldwide internet Subnets , networks, internetworks Subnets: (WAN) collection of routers and communication lines (without hosts). Ex: telephone subnet Networks: combination of subnet and its hosts. Ex: telephone network = telephone subnets+ telephones

S. SANTHI PRIYA

UNIT 1

NOTES

internetwork: formed when distinct networks are connected together. Ex: conneting LAN and WAN Network Software: Layers: Networks are organized in levels to reduce design complexity. Protocols: Rules and conventions of a specific layer (layer n) Network Architecture: a set of layers and protocols Protocol Stack: list of protocols (1 per layer) used by a system. Network Software: Protocol Hierarchies Design Issues for the Layers Connection-Oriented and Connectionless Services Service Primitives The Relationship of Services to Protocols Protocol Hierarchies Layers (levels): to reduce design complexity Peers: entities comprising the corresponding layers on different machines Design Issues for the Layers: Addressing Data transfer Error Control Sequencing Flow Control Message size Multiplexing Routing Connection-Oriented and Connectionless Services:

S. SANTHI PRIYA

UNIT 1

NOTES

Service Primitives:

The Relationship of Services to Protocols Service: set of operations that one layer provides to another. - Specified by Primitives (operations) Protocol: set of rules governing the messages exchanged between peers within a layer. Peers negotiate communication parameters. Network communication is very complex Testing and maintenance is simplified Easy to replace a single layer with a different version

Transmission mode: 1. Simplex communication 2. Half-duplex communication 3. Full-duplex communication

S. SANTHI PRIYA

UNIT 1

NOTES

ISO-OSI Reference Model: The ISO (International Standards Organization) has created a layered model, called the OSI (Open Systems Interconnect) model, to describe defined layers in a network operating system. The purpose of the layers is to provide clearly defined functions that can improve Internet work connectivity between "computer" manufacturing companies. Each layer has a standard defined input and a standard defined output. Understanding the function of each layer is instrumental in understanding data communication within Local, Metropolitan or Wide networks ISO/OSI Network Model The standard model for networking protocols and distributed applications is the International Standard Organization's Open System Interconnect (ISO/OSI) model. It defines seven network layers. Presentation Layer ensures that data transmitted by one network node is correctly interpreted by the other network node Session Layer establishes and manages communication sessions Transport Layer formats messages into packets suitable for transmission over the network Network Layer routes packet to their proper destination Data Link Layer interface between network software and hardware Physical Layer the layer at which communication between devices actually takes place

Layer 1 - Physical Physical layer defines the cable or physical medium itself, e.g., thinnet, thicknet, unshielded twisted pairs (UTP). All media are functionally equivalent. The main difference is in convenience and cost of installation and maintenance. Converters from one media to another operate at this level. Layer 2 - Data Link Data Link layer defines the format of data on the network. A network data frame, aka packet, includes checksum, source and destination address, and data. The largest packet that can be sent through a data link layer defines the Maximum Transmission Unit (MTU). The data link

S. SANTHI PRIYA

UNIT 1

NOTES

layer handles the physical and logical connections to the packet's destination, using a network interface. A host connected to an Ethernet would have an Ethernet interface to handle connections to the outside world, and a loopback interface to send packets to itself.

Ethernet addresses a host using a unique, 48-bit address called its Ethernet address or Media Access Control (MAC) address. MAC addresses are usually represented as six colon-separated pairs of hex digits, e.g., 8:0:20:11:ac:85. This number is unique and is associated with a particular Ethernet device. Hosts with multiple network interfaces should use the same MAC address on each. The data link layer's protocol-specific header specifies the MAC address of the packet's source and destination. When a packet is sent to all hosts (broadcast), a special MAC address (ff:ff:ff:ff:ff:ff) is used. Layer 3 - Network NFS uses Internetwork Protocol (IP) as its network layer interface. IP is responsible for routing, directing datagrams from one network to another. The network layer may have to break large datagram, larger than MTU, into smaller packets and host receiving the packet will have to reassemble the fragmented datagram. The Internet work Protocol identifies each host with a 32-bit IP address. IP addresses are written as four dot-separated decimal numbers between 0 and 255, e.g., 129.79.16.40. The leading 1-3 bytes of the IP identify the network and the remaining bytes identify the host on that network. The network portion of the IP is assigned by InterNIC Registration Services, under the contract to the National Science Foundation, and the host portion of the IP is assigned by the local network administrators, locally by noc@indiana.edu. For large sites, usually sub netted like ours, the first two bytes represents the network portion of the IP, and the third and fourth bytes identify the subnet and host respectively. Even though IP packets are addressed using IP addresses, hardware addresses must be used to actually transport data from one host to another. The Address Resolution Protocol (ARP) is used to map the IP address to it hardware address. Layer 4 - Transport Transport layer subdivides user-buffer into network-buffer sized datagrams and enforces desired transmission control. Two transport protocols, Transmission Control Protocol (TCP) and User Datagram

S. SANTHI PRIYA

UNIT 1

NOTES

Protocol (UDP), sits at the transport layer. Reliability and speed are the primary difference between these two protocols. TCP establishes connections between two hosts on the network through 'sockets' which are determined by the IP address and port number. TCP keeps track of the packet delivery order and the packets that must be resent. Maintaining this information for each connection makes TCP a stateful protocol. UDP on the other hand provides a low overhead transmission service, but with less error checking. NFS is built on top of UDP because of its speed and statelessness. Statelessness simplifies the crash recovery.

Layer 7 Application Application protocol

Name of unit exchanged Application APDU

Interface 6 Presentation Presentation protocol PresentationPPDU

Interface 5 Session Session protocol Session SPDU

Transport

Transport protocol Communication subnet boundary Internal subnet protocol Network Network

Transport

TPDU

Network

Network

Packet

Data link

Data link

Data link

Data link

Frame

Physical Host A

Physical Router

Physical Router

Physical Host B

Bit

Network layer host-router protocol Data link layer host-router protocol Physical layer host-router protocol

Layer 5 - Session The session protocol defines the format of the data sent over the connections. The NFS uses the Remote Procedure Call (RPC) for its session protocol. RPC may be built on either TCP or UDP. Login sessions uses TCP whereas NFS and broadcast use UDP. S. SANTHI PRIYA UNIT 1 NOTES 10

Layer 6 - Presentation External Data Representation (XDR) sits at the presentation level. It converts local representation of data to its canonical form and vice versa. The canonical uses a standard byte ordering and structure packing convention, independent of the host. Layer 7 - Application Provides network services to the end-users. Mail, ftp, telnet, DNS, NIS, NFS are examples of network applications. This is a top-down explanation of the OSI Model

Layer 7 - Application Layer

A basic PC logic flowchart is shown in Fig. 1. The Keyboard & Application are shown as inputs to the CPU (requesting access to the hard disk). The Keyboard requests accesses through user inquiries (such as "DIR" S. SANTHI PRIYA UNIT 1 NOTES 11

commands) and the Application seeks access through "File Openings" and "Saves". The CPU, through the Disk Operating System, sends and receives data from the local hard disk ("C:" in this example). Electronic mail (E-Mail), client-server databases, games played over the network, print and file servers, remote logons, and network management programs (or any "network aware" applications) are all aware of the network redirector. They have the ability to communicate directly with other "network applications" on the network. The "Network Aware Applications" and the "Network Redirector" make up Layer 7 (the Application layer of the OSI Model, as shown in Fig. 3). Layer 6 - Presentation Layer The Network Redirector sends CPU operating system native code to the network operating system: the coding and format of the data is not recognizable by the network operating system. The data consists of file transfers and network calls by network aware programs. For example, when a dumb terminal is used as a workstation (in a mainframe or minicomputer network), the network data is translated into (and from) the format that the terminal can use. The Presentation layer presents data to and from the terminal using special control characters to control the screen display (LFline feed, CR-carriage return, cursor movement, etc..). The presentation of data on the screen would depend on the type of terminal that's used: VT100, VT52, VT420, etc. Similarly, the Presentation layer strips the pertinent file from the workstation operating system's file envelope. The control characters, screen formatting, and workstation operating system envelope are all stripped or added to the file (if the workstation is receiving or transmitting data to the network). This could also include translating ASCII file characters from a PC world to EBCDIC in an IBM Mainframe world.

The Presentation Layer also controls security at the file level: this provides both file locking and user security. The DOS Share program is often used for S. SANTHI PRIYA UNIT 1 NOTES 12

file locking. When a file is in use, it is locked from other users to prevent 2 copies of the same file from being generated. If 2 users both modified the same file, and User A saved it, then User B saved it, then User A's changes would be erased! Layer 5 - Session Layer The Session layer manages the communications between the workstation and the network. The Session layer directs the information to the correct destination, and identifies the source to the destination. The Session layer identifies the type of information as data or control. The Session layer manages the initial start-up of a session, and the orderly closing of a session. The Session layer also manages Log on procedures and Password recognition (See Fig. 5).

Layer 4 - Transport Layer In order for the data to be sent across the network, the file must be broken up into usable small data segments (typically 512 - 18K bytes). The Transport layer breaks up the file into segments for transport to the network, and combines incoming segments into a contiguous file. The Transport layer does this logically, not physically, and it is done in software as opposed to hardware.

S. SANTHI PRIYA

UNIT 1

NOTES

13

The Transport layer provides error checking at the segment level (frame control sequence). This makes sure that the datagrams are in the correct order: the Transport layer will correct out of order datagrams. The Transport layer guarantees an error-free host to host connection. It is not concerned with the path between machines. Layer 3 - Network Layer The Network layer is concerned with the path through the network. It is responsible for routing, switching, and controlling the flow of information between hosts. The Network layer converts the segments into smaller datagrams than the network can handle: network hardware source and destination addresses are also added. The Network layer does not guarantee that the datagram will reach its destination.

Fig. 7. Network Layer

Layer 2 - Data Link Layer The Data Link layer is a firmware layer of the network interface card. The Data Link layer puts the datagrams into packets (frames of bits: 1s & 0s) for transmission, and assembles received packets into datagrams. The Data Link layer works at the bit level, and adds start / stop flags and bit error checking (CRC or parity) to the packet frame. Error checking is at the bit level only: packets with errors are discarded and a request for re-transmission is sent out. The Data Link layer is primarily concerned with bit sequence.

S. SANTHI PRIYA

UNIT 1

NOTES

14

Fig. 8. Data Link Layer Layer 1 - Physical Layer The Physical layer concerns itself with the transmission of bits. It also manages the network card's hardware interface to the network. The hardware interface involves the type of cabling (coax, twisted pair, etc.), frequency of operation (1 Mbps, 10Mbps, etc.), voltage levels, cable terminations, topography (star, bus, ring, etc.), etc. Examples of Physical layer protocols are as follows: 10Base5 - Thicknet, 10Base2 - Thinnet, 10BaseT - twisted pair, ArcNet, FDDI, etc. (see Fig. 9).

Fig. 9. Physical Layer Layer-Specific Communication Each layer may add a Header and a Trailer to its Data (which consists of the next higher layer's Header, Trailer and Data as it moves through the layers). The Headers contain information that specifically addresses layer-to-layer communication. For example, the Transport Header (TH) contains information that only the Transport layer sees. All other layers below the Transport layer pass the Transport Header as part of their Data.

S. SANTHI PRIYA

UNIT 1

NOTES

15

PDU - Protocol Data Unit (a fancy name for Layer Frame)

S. SANTHI PRIYA

UNIT 1

NOTES

16

OSI Model Concepts


Services - Defines what the layer does not how it works Interfaces -Defines how to access a layer e.g. parameters and results Protocols -As long as the layer works any protocol necessary can be used. OSI Layer 1: Physical Layer Functions: - Transmission of a raw bit stream - forms the physical interface between devices Makes sure that when one side sends a 1 bit,the other side receives it as a 1. Covers all aspects for communication Mechanical interface defines the connectors used, number of pins, their placement, size, material used. Electrical interface defines the voltage/current levels of signals. Functional interface attaches meaning to each signal. Procedural interface specifies the sequence of events Issues: -Which modulation technique? -How long will a bit last? - Half- or full-duplex transmission - How many pins does the network connection have? - How is a connection set up or torn down? OSI Layer 2: Data Link Layer Functions: Data link layer attempts to make physical link reliable. May divide upper layer packet into multiple frames. Ensure that peer entity will recognize frame boundaries. May introduce sequence numbers and acknowledgments. Some mechanism for error control and flow control. How to share the link, if it is half-duplex or multipoint. Can be connection-oriented or connectionless Provides reliable transfer of information between two adjacent nodes Creates frames, or packets from bits and vice versa Provides frame-level error control Provides flow control S. SANTHI PRIYA UNIT 1 NOTES 17

In summary, the data link layer provides the network layer with what appears to be an error-free link for packets. OSI Layer 3: Network Layer Functions: Network layer is designed to facilitate communication between systems across a communication network. Implements network routing and message delivery through networks to the correct destination. Congestion control can also be done at network layer. Internetworking. Internet protocol or IP is one example. Responsible for routing decisions: Fixed routing vs. dynamic routing OSI Layer 4: Transport Layer Functions: - Hide the details of the network from the session layer -Example: If we want to replace a point-to-point link with a satellite link, this change should not affect the behavior of the upper layers. - Provides reliable end-to-end communication Implements end-to-end protocol. Implements required quality-of-service. May detect erroneous packets. Reorders packets which arrive out-of-sequence. Ensures that there is no loss or duplication of packets. May provide connection-less or connection-oriented type of service. Provides for the connection management. Multiplexing and demultiplexing. Packetization, flow control, etc. Examples: TCP, and UDP * Establishes and deletes connections across the network OSI Layer 5:Session Layer Allows users on different computers to establish a session. This layer requests for a logical connection to be established based on an end-user's request. Any necessary log-on or password validation is also handled by this layer. This layer provides services like dialogue discipline which can be full duplex or half duplex. Session layer can also provide check pointing (or synchronization) mechanism.

S. SANTHI PRIYA

UNIT 1

NOTES

18

If a failure occurs between checkpoints, all data can be retransmitted from the last checkpoint. May perform synchronization and token management between several communicating applications Groups several user-level connections into a single session

OSI Layer 6: Presentation Layer Performs specific functions that are requested regularly by applications: Presentation layer defines the data format to be exchanged between the programs. Manages abstract data structures, and converts them hostrepresentation to network- representation and vice versa. Encryption ASCII to Unicode, Unicode to ASCII OSI Layer 7: Application Layer Application layer protocols are application dependent Implements communication between two applications of the same type:

- FTP -SMTP (email)

TCP/IP Network Model:


Although the OSI model is widely used and often cited as the standard, TCP/IP protocol has been used by most Unix workstation vendors. TCP/IP is designed around a simple four-layer scheme. It does omit some features found under the OSI model. Also it combines the features of some adjacent OSI layers and splits other layers apart. The four network layers defined by TCP/IP model are as follows.

S. SANTHI PRIYA

UNIT 1

NOTES

19

Application

Transport Internet Host-toNetwork

The TCP/IP Reference Model

Layer 1 - Link This layer defines the network hardware and device drivers. Layer 2 - Internet This layer is used for basic communication, addressing and routing. Job of the internet layer is to deliver IP packets where they are supposed to go. Packet routing is clearly the major issue here, as is avoiding congestion Layer 3 - Transport Handles communication among programs on a network. TCP and UDP fall within this layer. Layer 4 - Application End-user applications reside at this layer. Commonly used applications include NFS, DNS, arp, rlogin, talk, ftp, ntp and traceroute.

S. SANTHI PRIYA

UNIT 1

NOTES

20

Layer (OSI names) TELNET Protocols TCP IP Networks ARPANET SATNET Packet radio LAN FTP SMTP UDP DNS Application Transport Network Physical + data link

Fig: Protocols and networks in the TCP/IP model initially

TCP/IP vs. OSI Model

S. SANTHI PRIYA

UNIT 1

NOTES

21

TCP/IP vs. OSI Model TCP/IP model was created AFTER the protocols OSI was devised BEFORE the protocols TCP/IP is widely implemented OSI is structured Neither are perfect Comparing OSI and TCP/IP Models Concepts central to the OSI model Services Interfaces Protocols Comparison: Both are based on stack of independent protocols TCP/IP did not distinguish between service,interface,protocol OSI protocols are better hidden than in TCP/IP protocols and can be replaced easier A Critique of the OSI Model and Protocols

S. SANTHI PRIYA

UNIT 1

NOTES

22

Why

OSI did not take over the world Bad timing Bad technology Bad implementations Bad politics

A Critique of the TCP/IP Reference Model Problems: Service, interface, and protocol not distinguished Not a general model Host-to-network layer not really a layer No mention of physical and data link layers Minor protocols deeply entrenched, hard to replace

S. SANTHI PRIYA

UNIT 1

NOTES

23

Data link layer design issues or services provided by the Data link layer :
(1) Providing a well defined service interface to the network layer (2) Determining how the bits of the physical layer are grouped into frames (3) Dealing with transmission errors (4) Regulating the flow of frames It transfers data from the network layer on the source machine to the network layer on the destination machine. Job of the data link layer is to transmit the bits to the destination machine, so they can be handed over to the network layer there, as shown in fig (a). Actual transmission follows the path of fig (b).

Various types of services provided by the data link layer are

S. SANTHI PRIYA

UNIT 1

NOTES

24

1. Unacknowledged connectionless service Here the source machine sends the data to the destination machine without any acknowledgement. For this no connection is either established or released. If the data is lost due to noise or interference, the lost data is not even recovered by the layer. 2. Acknowledged Connectionless service Here each data frame is acknowledged by the destination machine. If any data frame is lost or not arrived in time the same can be transmitted again. In this service no connections are used. 3. Acknowledged Connection Service It establishes a connection prior to data transmission. Each frame is numbered before transmission and corresponding acknowledgement is also received. The transmission is carried out in distinct phases In the connection oriented services, the transfer of data has three distinct phases. 1. Connection establishment, having both sides initialize variables and counters need to keep the track of which frames have been received and which one have not. 2. The data frame are transmitted 3. Connection release, in this phase the connection is disconnected between source machine and destination machine This type of service is useful where reliability is needed or where the channel is more noisy Framing: The usual approach is for the data link layer to break the bit stream into discrete frames and compute the checksum for which each frame. When a frame arrives at the destination, the checksum is recomputed. If the newly computed checksum is different from the one contained in the frame, the data link layer knows that an error has occurred and takes steps to deal with it. (e.g., discarding the bad frame and sending back an error report)

S. SANTHI PRIYA

UNIT 1

NOTES

25

The following are the four method of framing (1) Character count (2) Starting and ending characters, with character stuffing (3) Starting and ending flags, with bit stuffing (4) Physical layer coding violations Character count This framing method uses a field in the header of frame to specify the number of characters in the frame, Fig a illustrates such framing for four frames of sizes 5, 5, 8, 9 characters respectively. A disadvantage with this framing is that the count can be garbled by transmission error. E.g. if a character count of 5 in the first frame becomes a 7, the destination will go out of synchronization and unable to locate the exact start of next frame. Fig. b illustrates this type of error.

Character Stuffing In character stuffing, the special character Data Link Escape (DLE) is stuffed in front of control character when appears as a part of data. The format is as follows:

S. SANTHI PRIYA

UNIT 1

NOTES

26

Bit Stuffing In bit stuffing a specific bit is stuffed into the outgoing characters stream. The format is as follows:

S. SANTHI PRIYA

UNIT 1

NOTES

27

Each frame begins and ends with a special bit pattern, 01111110 called a flag bit, byte. When five consecutive 1s are encountered in the data, it automatically stuffs a 0 bit into outgoing bit stream. Physical Layer Coding Violation: This method is only applicable to network in which the encoding on the physical medium contains some redundancy. In some network, 1 bit of data may encode using two physical bits. Normally a 1 nit is a high low pair and a 0 bit is a low high pair. The combinations of high high and low low are not used for data. This scheme is called Manchester encoding. This encoding uses the inversion at the middle of each bit interval for both synchronization and bit representation. By this, receiver easily locates the bit boundaries. Error Control To ensure the proper sequencing and safe delivery of frames at the destination, an acknowledgement should be sent by the destination network. The receiver sends back special control frames bearing positive or negative acknowledgements about the incoming frames. If a negative acknowledgement means that something has gone wrong and the frame is to be retransmitted. A timer at senders and receivers end is introduced. Also sequence numbers to the outgoing frames are maintained so that the receiver can distinguish retransmissions from originals. This is one of the most important part of data link layer duties. Error control in Data Link Layer (DLL) is based on Automatic Repeat Request (ARQ) i.e. retransmission of data in three cases. (1) (2) (3) Damaged frames Lost frames Lost acknowledgements

Flow Control When the sender is running on fast machine or lightly loaded machine and receiver is on slow or heavily loaded machine. Then the transmitter will transmit frames faster than the receiver can accept them. Even if the transmission is error free at a certain point the receiver will simply not be able to handle the frames as they arrive and will start to loose. To prevent this flow control, mechanism is incorporated which includes a feedback mechanism requesting transmitter a retransmission of incorrect message block. The most common transmission technique is known as Automatic Repeat Request (ARQ).

S. SANTHI PRIYA

UNIT 1

NOTES

28

Error Detection and Correction:


Network must be able to transfer data from one device to another with complete accuracy, otherwise the system is useless. Yet any time data are transmitted from source to destination, they can be corrupted in passage. In fact it is more likely that some part of a message will be altered in transit then that the entire contents will arrive intact. A reliable system must have a mechanism for detecting and correcting such errors. Error detection and correction are implemented in the data Link Layer. Types of errors: When an electromagnetic signal flows from one point to another, it is subjected to unpredictable interference from heat, magnetism and other forms of electricity.This interference can change the shape or timing of the signal. If the signal is carrying binary data , such changes can alter the meaning of the data changing to 0 to 1 or 1 to 0. Bits can be changes singly or in clumps. There are three types of possible errors that may occur; single bit, multiple bit and burst errors. Single bit Error: The term single bit error means that only one bit of a given data unit is changed from 1 to 0 or 0 to 1. The data unit may be a byte, character or packet etc. Multiple bit Error: Multiplebit error means that two or more non consecutive bits in data unit may have changed from 1 to 0 or from 0 to 1. Burst Error: The term burst error means that two or more consecutive bits in the data unit have changed from 1 to 0 or 0 to 1. Error Detection: There are several mechanisms for error detection; they are exact count encoding and redundancy. These codes are used to detect errors, not to prevent the occurrence of error or not to correct the occurred error. Exact-count encoding: With exact count encoding, the no of 1s in each data unit is same. Redundancy: The redundancy involves the transmitting of each data unit twice. If same data unit is not received twice in succession, a transmission error has occurred. The same concept can be used for messages. The major problem for this is if error has occurred at the same position of both data units, it is not possible to recognize it even though there is an error, because in comparison both data units are same.

S. SANTHI PRIYA

UNIT 1

NOTES

29

Cyclic Redundancy Check (CRC): It is the most powerful redundancy checking technique. It is based on the binary division . Polynomial codes are used for generating check bits in the form of cyclic redundancy check. The CRC bits are appended at the end of each data unit so that the resulting data unit becomes exactly divisible by a second, predetermined number. At the receiver, the incoming data unit is divided by the same number. If there is no remainder, the data unit is assumed to be intact and is there fore accepted. A remainder indicates that data unit has damaged. Steps involved in calculation of CRC: 1. Multiply i(x) by zxn-k (put zeros in (n-k) low order positions) 2. Divide x n-k i(x) by g(x) X n-k i(x) = g(x)q(x)+r(x) remainder Quotient 3. The remainder polynomial r(x) provides the CRCs , add remainder r(x) to x n-1 i(x) (i.e put check bits in the n-k low order position) B(x)=xn-k i(x)+r(x) Where b(x) is a transmitted codeword/data unit. Name Polynomic Used in CRC-8 CRC10 CRC12 CRC16 CCITT16 CCITT32 X8+X2+X+1 X10+X9+X5+X4+X+1 X12+X11+X3+X2+X+1 X16+X15+X2+X+1 X16+X12+X5+1 X32+X26+X23+X22+X16+X12+X11+X 10+X8+X7+X5+X4+X2+X+1 ATM header check ATM AALCRc Bisync Bisync HDLC, XMODEM, V.41 IEEE802,DOD,v.42, AAL5 error

S. SANTHI PRIYA

UNIT 1

NOTES

30

S. SANTHI PRIYA

UNIT 1

NOTES

31

Elementary Data Link Protocols:


To introduce the subject of protocols, we will begin by looking at the three protocols of increasing complexity. To start with, we are assuming that in the physical layer, data link layer, and the network layer are independent processes that communicate by passing messages back and forth.. Another key assumption is that machine A wants to send a long stream of data to machine B using a reliable, connection oriented service. A is assumed to have an infinite supply of data ready to send and never wait for data to be produced. Lets take a look at the various functions and definitions needed in the protocols to follow. These definitions are located in the file protocol.h #define MAX_PKT 1024 /* determines packet size in Bytes*/ typedef enum {false,true}boolean; /* Boolean type*/ typedef unsigned int seq_nr; /* sequence of ack numbers */ typedef struct {unsigned char data[MAX_PKT];} packet;/*packet definition*/ typedef enum {data, ack, nak} frame_kind; /*frame_kind definition */ typedef struct { layer */ frame_kind kind; seq_nr seq; seq_nr ack; packet info; }frame; /* frames are transported in this /* /* /* /* what kind of a frame is it? */ sequence number */ acknowledgement number */ the network layer packet */

/* Wait for an event to happen; return its type in event. */ void wait_for_event(event_type *event); /* Fetch a packet from the network layer for transmission on the channel. */ Void from_network_layer(packet *p); /* Deliver information from an inbound frame to the network layer.*/ Void to_network_layer(packet *p); /* Go to an inbound frame from the physical layer and copy it to r. */ Void from_physical_layer(frame *r); S. SANTHI PRIYA UNIT 1 NOTES 32

/* Pass the frame to the physical layer for transmission. */ Void to_physical _layer(frame*s); /* Start the clock running and enable the timeout event.*/ Void start_timer(seq_nr k); /* Stop the clock and disable the timeout event. */ Void stop_timer(seq_nr k); /* Start an auxiliary timer and enable the ack_timeout event .*/ Void start_ack_timer(void); /* Stop an auxiliary timer and disable the ack_timeout event.*/ Void stop_ack_timer(void); /* Allow the network layer to cause a network_layer_ready event. */ Void enable_network_layer(void); /* Forbid the network layer from causing a network_layer_ready event. */ Void disable_network_layer(void); /* Macro inc is expanded in-line: Increment K circularly. */ #define inc(K) if (K<MAX_SEQ) K=K+1; else K=0 listed together, but conceptually they should be merged with the protocols themselves. In C, this merging is done by putting the definitions in a special header file, in this case protocol.h, and using the #include facility of the C preprocessor to include them in the protocol files.

Unrestricted Simplex Protocol: The protocol consists of two distinct procedures, a sender and a receiver. The sender runs in the data link layer of the source machine, and the receiver runs in the data link layer of the destination machine. No sequence numbers or acknowledgements are used here, so MAX_SEQ is not needed. The only event type possible is frame_arrival (i.e. the arrival of an undamaged frame). The sender is in an infinite while loop just pumping data out onto the line as fast as it can. The body of the loop consists of three actions: go fetch a packet from the ( always obliging) network layer, construct an outbound frames using the variable s, and send the frame on its way. Only the info S. SANTHI PRIYA UNIT 1 NOTES 33

field of the frame is used by this protocol, because the other fields have to do with error and flow control, and there are no errors or flow control restrictions here. The receiver is equally simple. Initially it waits for something to happen, the only possibility being the arrival of an undamaged frame. Evevtually, the frame which arrives and the procedure wait_for_event returns, with event set to frame_arrival (which is ignored anyway). /* Protocol 1 provides for data transmission in one direction only, from sender to receiver. The communication channel is assumed to be error free, and the receiver is assumed to be able to process all the input infinitely fast. Consequently, the sender just sits in a loop pumping data out onto the line as fast as it can. */ typedef enum {frame_arrival} event_type; #include protocol.h void sender1(void) { frame s; /* buffer for an outbound frame */ packet buffer; /* buffer for an outbound packet*/ while (true) { from_network_layer(&buffer); /*go get something to send */ s.info = buffer; /*copy it into s for transmission*/ to_physical_layer(&s); /*send it on its way */ } } void receiver1(void) { frame r; event_type event; /* filled in by wait, but not used here */ while (true) { wait_for_event(&event); /*only possibility is frame_arrival */ from_physical_layer(&r); /* go get the inbound frame */ to_network_layer(&r.info); /*pass the data to the network layer */ } } Fig. An unrestricted simplex protocol

S. SANTHI PRIYA

UNIT 1

NOTES

34

simplex stop-and-wait protocol: Stop and Wait

Receiver provides feedback to the sender. After having passed a packet to its network layer, the receiver sends a little dummy frame back to the sender which, in effect, gives the sender permission to transmit the next frame. After having sent a frame, the sender is required by the protocol to bide its time until the little dummy (i.e., acknowledgement) frame arrives. Protocols in which the sender sends one frame and then waits for an acknowledgement before proceeding are called stop-and-wait. Figure gives an example of a simplex stop-and-wait protocol. As in protocol 1, the sender starts out by fetching a packet from the network layer, using it to construct a frame and sending it on its way. Only now, unlike in protocol 1, the sender must wait until an acknowledgement frame arrives before looping back and fetching the next packet from the network layer. The sending data link layer need not even inspect the incoming frame. There is only one possibility. The only difference between receiver 1 and receiver 2 is that after delivering a packet to the network layer, receiver 2 sends an acknowledgement frame back to the sender before entering the wait loop again. Although data traffic in this example is simplex, going only from the sender to the receiver, frames do travel in both directions. Consequently, the communication channel between the two data link layers needs to be capable of bidirectional information transfer. However, this protocol entails a strict alteration of flow: first the sender sends a frame, then the receiver sends a frame, then the sender sends another frame, then the receiver sends another one, and so on. A half duplex physical channel would suffice here. /* Protocol 2 (stop-and-wait) */

S. SANTHI PRIYA

UNIT 1

NOTES

35

typedef enum {frame_arrival} event_type; #include protocol.h void sender1(void) { frame s; /* buffer for an outbound frame */ packet buffer; /* buffer for an outbound packet*/ event_type event; /* frame_arrival is the only possibility*/ while (true) { from_network_layer(&buffer); /*go get something to send */ s.info = buffer; /*copy it into s for transmission*/ to_physical_layer(&s); /*send it on its way */ wait_for_event(&event); /* do not proceed until given the go ahead */ } } void receiver1(void) { frame r; event_type event; /* filled in by wait, but not used here */ while (true) { wait_for_event(&event); /*only possibility is frame_arrival */ from_physical_layer(&r); /* go get the inbound frame */ to_network_layer(&r.info); /*pass the data to the network layer */ to_physical_layer(&s); /*send a dummy frame to awakensender */ } } Fig. An simplex stop & wait protocol

Simplex protocol for noisy channel: In a noisy communication channel if a frame is damaged in transit, the receiver hardware will detect this when it computes the checksum. If a damaged frame is received, it will be discarded and transmitter will retransmit the same frame after receiving a proper acknowledgement. If the acknowledgement frame gets lost and data link layer on A eventually times out. Not having received an ACK, it assumes that its data frame was lost or damaged and it sends the frame containing the packet 1 again. This duplicate frame also arrives at the data link layer on B, thus part of the file will be duplicated and protocol is said to be failed.

S. SANTHI PRIYA

UNIT 1

NOTES

36

A typical approach to solve this problem is the provision for a sequence number in the header of the message. The sequence can then check for the sequence number to determine if message is a duplicate. Since message is only transmitted at a time. The sending and the receiving stations need only 1-bit alternating sequence of 0 or 1 to maintain the relationship of the transmitted message and its ACK/NAK. A modulo-2 numbering scheme is used where in the frames are alternately labeled with 0 or 1 and positive acknowledgements are of the form ACK 0 and ACK 1 . Station A Event Station B Event DATA, Seq 0 A sends data with 1 sequence of 0 DATA, Seq 0 2 B checks for errors and respond with ACK of 0

A receives ACK 0 sends data with seq no 1 Message lost or damaged

DATA, Seq 1 3 ACK Seq 1 B checks for errors and respond with ACK of 1

A performs a timeout, resends data with a sequence of 1

DATA, Seq 1 5

B expects a sequence number of 0, discards this message

DATA, Seq 0 6

B retransmits ACK of 1

In event 1,the sending station transmits a message with the sequence number 0 in the header. The receiving station responds with an ACK and a seq no. of 0 (event 2). The sender receives the ACK, examines the 0 in the header, flips the sequence number to a 1 and transmits the next message (event 3), the receiving station receives and acknowledges the message with an ACK1 in event 4. However, this message is received or garbled or lost on the line. The sending station recognizes that the message in event 3 has not been acknowledged. It performs a timeout and retransmits this message (event 5). The receiving station is looking for a message with a sequence number of 0. it discards the message, since it is a duplicate of the message

S. SANTHI PRIYA

UNIT 1

NOTES

37

transmitted in event 3. to complete the accountability, the receiving station retransmits the ACK of 1 (event 6).

sliding window protocol: Sliding Window:- In the sliding window protocol, the sender can transmit several frames before needing an acknowledgement. Frames can be sent one right after another, meaning the link can carry several frames at once and its capacity can be used efficiently. The receiver acknowledges only some frames, using a single ACK to confirm the receipt of multiple data frames. The window refers to an imaginary box that can hold frames at either end and provides the upper limit on the number of frames that can be transmitted before requiring an ACK. To keep the track of which frame has been transmitted and which received, the frames are numbered. The size of the window is n-1. When the receiver sends an ACK, it includes the number of next frame it except to receive.

Sender Window:- At the beginning of the transmission, the senders window contains n-1 frames. As the frames are sent out, the left boundary of the window moves inwards, shrinking the size of the window. Once the ACK arrives, the window expands to allow in the number of new frames equal to the numbers of frames acknowledge by that ACK.

Receiver Window:- At the beginning of the transmission, the receivers window contains n-1 spaces for the frames. Conceptually, the sliding window of the receiver shrinks from the left when frames of data are received. The receiver window therefore represents not the number of frames received but the number of frames that may still be received before an ACK must be sent. The sliding window of the receiver expands to the right when acknowledgements are received.

S. SANTHI PRIYA

UNIT 1

NOTES

38

An Example:- Figure shows sample transmission of that uses sliding window of seven frames. In this example, all frames are assumed to be received undamaged. Sliding Window ARQ:- Among the several popular mechanism for continuous transmission error control, two protocols are most popular: goback-n ARQ and selective-reject ARQ, both based on sliding window flow control. To extend sliding window to cover retransmission of lost or damaged frames, three features are added to the basic flow control mechanism: 1) The sending device keeps copies of all transmitted frames until they have been acknowledged. 2) In addition to ACK frames, the receiver has the option of returning NAK frame if the data has been received damaged. NAK frame tells the sender to retransmit the frame. Both ACK and NAK frame must be numbered for identification. 3) Sending device in the sliding window ARQ is equipped with a timer to enable it to handle lost acknowledgement. Timer starts when the frames are transmitted, and if ACK is not received within the allotted time sender retransmits all the frames again.

One bit sliding window protocol: Let us first examine a sliding window protocol with a maximum window size of 1. Such a protocol uses stop-and-wait, since the sender transmits the frame and waits for its acknowledgment before sending the next one. The starting machine fetches the first packet from its network layer, builds a frame from it and sends it. When this frame arrives, the receiving data link layer checks to see if it is a duplicate. If the frame is one excepted, it is passed to the network layer and the receivers window is slid up. The acknowledgment field contains the number of the last frame received without error. If this number agrees with the sequence number of the frame, the sender is trying to send. The sender knows it is done with the frame stored in buffer and can fetch the next packet from its network layer. If the sequence number disagrees, it must continue trying to send the same frame. Whenever the frame is received, a frame is also sent back. S. SANTHI PRIYA UNIT 1 NOTES 39

Go back n protocol: In this method, if one frame is lost or damaged, all frames are sent since the last frame acknowledge are retransmitted. Damaged Frame:- What if frames 0,1,2,3 have been transmitted, but the first acknowledgment received is NAK3? It means that frames 0, 1, 2 are in good shape. Only frame 3 must be resent. Figure gives an example where six frames have been transmitted before an error is discovered in frame 3. So NAK3In this case ACK3 has been returned, telling the sender that frames 0, 1, and 2 have been accepted. Data 3 is discovered to be damaged, so NAK3 is sent immediately and frames 4 and 5 are discarded as they come in. The sending device retransmits all 3 frames sent since the last acknowledgment, and the process continues. The receiver discards frames 4 and 5 until it receives a good data 3.

Lost Data Frame:- All the frames that are transmitted are given a sequence number which is checked by the receiver. If a frame gets lost due to noise in the channel, the next frame received by the receiver would be out of sequence. So the receiver sends NAK for the missing frames. The sending device then retransmits the frames indicated by NAK as well as the frames that it had transmitted after the lost one. In figure data 0 and 1 arrives intact but data 2 is lost. Next frame to arrive is data 3. The receiver is accepting data 2 and so considers data 3 as an error, discards it and returns NAK2.In this example, because the sender has transmitted data 4 before NAK2, data 4 arrives at the destination out of sequence and so is discarded. Once the sender receives NAK2, it retransmits all the pending frames.

S. SANTHI PRIYA

UNIT 1

NOTES

40

Lost Acknowledgment:- The sending device can send as many frames as the window allows before waiting for an acknowledgment. Once the limit has been reached or the sender has no more frames to send, it must wait for acknowledgment. If the ACK sent by the receiver has been lost, the sender could wait for ever. The sender is equipped with the timer that begins counting when ever the window capacity is reached. If the acknowledgment is not been received within the time limit, the sender retransmits all the frames transmitted since last ACK. Figure shows the situation in which ht e sender has transmitted all its frames and is waiting for an acknowledgment that has been lost along the way. The sender waits a predetermined amount of time, then retransmits the unacknowledged frames.

Selective repeat (reject) protocol: In selective-reject ARQ, only the specific damaged or lost frame is retransmitted. If a frame is corrupted in transmit, a NAK is returned and that frame is sent out of sequence. The receiving device must be able to sort the frames it has and insert retransmitted frames into its proper place in the sequence.

S. SANTHI PRIYA

UNIT 1

NOTES

41

Damaged Frames:- Figure shows a situation in which a damaged frame is received. As we can see, frame 0 and 1 are received but not acknowledged. Data 2 arrives and is found to contain an error, so a NAK2 is returned. In the figure NAK tells the sender that data 0 and 1 have been accepted, but that data 2 must be resent. The receiver continues to accept new frames while waiting for an error to be corrected. However because an ACK implies the successful receipt of not only the specific frame indicated but of all previous frames, frames received after the error frame cannot be acknowledge until the damaged frame has been retransmitted. In the figure the receiver accepts data 3, 4, and 5 while waiting for a new copy of data 2. When the new data 2 arrives, an ACK5 can be returned, acknowledging the new data 2 and the original frames 3, 4, and 5. Quite a bit of logic is required by the receiver to sort out-of-sequence retransmission and to keep track of which frames are still missing and which are yet to be acknowledged.

Lost Frames:- Although frames can be accepted out of order, they cannot be acknowledged out of order. If a frame is lost, the next frame will arrive out of sequence. When the receiver tries to reorder the existing frames to include it, it will discover the discrepancy and return a NAK. Of course, the receiver will recognize the omission only if other frames follow. If the lost frame was the last of the transmission, the receiver does nothing and the sender treats the silence as lost acknowledgment. Lost Acknowledgment:- Lost ACK and NAK are treated by selective-reject ARQ just as they are by go-back-n ARQ. HDLC (High Level Data Link Control): HDLC is the most important data link control protocol also it is the basis for many Other important data link control protocols, which use the same or similar formats and S. SANTHI PRIYA UNIT 1 NOTES 42

the same mechanisms as employed in HDLC. The HDLC protocol is an international standard that has been defined by ISO for use on both point-to-point and multipoint data links. It supports full duplex, transparent mode operation and is now extensively used in both multipoint and computer networks. Although the acronym HDCL is now widely accepted, a number of large manufacturers and other standards bodies still use their own acronyms. These include IBMs SDLC (synchronous data link control) and ADCCP (Advanced data communication control procedure), wich is used by the American National Standards Institute (ANSI) To satisfy a variety of applications, HDLC defines three types of stations. these are 1. Primary station: Primary station has the responsibility for controlling the operation of the link. Frames issued by the primary are called command. 2. Secondary station: Stationary station operates under the control of the primary station. Frames issued by a secondary are called responses. The primary maintains a separate logical links with each secondary station of the line. 3. Combined station: It combines the features of primary and secondary .A combined station may issue both commands and responses. Since HDLC has been defined as a general purpose data link control protocol. The station can be configrated in different network configuration as 1. Point to - point with single primary and secondary. 2. Multipoint with single primary and multiple secondary. 3. Point-to-point with two primaries and secondaries. Operational mode (Data Transfer) of HDLC HDLC has three data transfer modes: 1. Normal Response Mode (NRM). 2. Asynchronous Response Mode (ARM). 3. Asynchronous Balanced Mode (ABM). Frame Formats In HDLC both data and control messages are carried in a standard formats frame. Three classes of frame are used in HDLC. 1. Unnumbered frames (U-frames) : These carry the actual information or data and are normally referred to simply as I-frames.

S. SANTHI PRIYA

UNIT 1

NOTES

43

I-frames can be used to piggy back acknowledgement information relating to the flow of I-frames in the reverse direction when the link is being operated in ABM or ARM. 2. Information frames (I-frames) : These carry the actual information or data and are normally referred to simply as I-frames. I-frames can be used to piggy back acknowledgement information relating to the flow of I-frames in the reverse direction when the link is being operated in ABM or ARM. 3. Supervisory frames (S-frames) : These are used for error and flow control and hence contain send and receive sequence numbers. Frame Structure HDLC uses synchronous transmission. All transmissions are in the forms of frames.

The flag address and control bits the information or data field are known as a header. The FCS and flag fields following the data fields are referred as a trailer. Flag field: It has a unique pattern at both the end of the frame structure. It identified the start of the frame and end of frame. The length of flag field is 8-bit. Control field: control field contains frame numbers. Also it controls the acknowledge of frames. Control field is 8 or 16 bits in length. Address field: Address field states the destination address. The address field is usually 8-bit long but can be extended. Data field: Data field contain the user data received from the network layer. It can be of variable length but in integral number of octets. FCS (Frame Check Sequence): FCS is an error detecting code calculated from the remaining bits of the frame FCS can be 16 bits or 32 bits long. HDLC operation The operation of HDLC involves three phases 1. Initialization: Initialization may be requested by either side so that frames may be exchanged in an orderly fashion. During this phase, the operations that are to be used are agreed upon. 2. Data transfer: After initialization has been requested and accepted, then a logical connection is established. Two sides exchange user data and the control information to exercise flow and error control.

S. SANTHI PRIYA

UNIT 1

NOTES

44

3. Disconnect: Either HDLC module can initiate a disconnect, either on its own initiative or at the request of its higher layer user. HDLC issues a disconnect by sending a disconnect frame. Function of DATA LINK LAYER IN THE INTERNET: The Internet consists of individual machines and the communication infrastructure that connect them. LAN is connected through one or two routers to the outside world that have point-to-point leased line to distsnt routers. Internet for the single user is connected through modems and dial up lines. Here the individual user calls up internet service provider, wich is a commercial company. Then the user is connected to the route of service provider. For both router-router leased line connection and the dial-up host-router connection, same point-to-point data link protocol is used on the line for framing, error control, flow control and other functions. Two widely used internet protocols are SLIP and PPP. SLIP [SERIAL LINE INTERNET PROTOCOL] The user just sends raw IP packets over the line ,with a special flag byte at the end for framing. If the flag byte occurs inside the IP packet, a form of character stuffing is used and a two byte sequence is sent in its place. Consecutive packets have many header fields common, they can be compressed by omitting those fields. DISADVANTAGES OF SLIP: 1. It does not do any error detection or correction, so it is up to the higher layers to detect and recover from lost, damaged or merged frames. 2. SLIP supports only IP, Novell based LAN is not supporting SLIP, this restriction is increasingly serious. 3. It is impossible to give each home internet user a unique IP address. So it is not possible to for each side to know others IP address in advance. 4. SLIP does not provide any form of authentication, so neither party knows whom it is really talking to with leased lines, this is not an issue, but with dial-up lines it is. 5. SLIP is not an approved internet standard; so many different incompatible versions exist. PPP [POINT-TO-POINT] PROTOCOL PPP is an official internet standard .PPP handless error detection, supports multiple protocols, allows IP addresses to be negotiated at connection time, permits authentication. PPP provides: 1. Framing method that delineates the end of one frame and the start of next. The frame format also handles error detection. 2. A link controls protocol for bringing lines up, testing them, negotiating options.

S. SANTHI PRIYA

UNIT 1

NOTES

45

This protocol is called LCP (Link Control Protocol). 3. A way to negotiate network-layer option in a way that is independent of network layer protocol to be used. NCP is chosen for each network layer to be supported. COMPARISON OF SLIP AND PPP Sl no. SLIP PPP 1. Does not support error detection Support and error detection and Correction correction 2. SLIP support only IP PPP support IP and other protocol 3. SLIP does not provide any form PPP provide IP authentication and of authentication. Security. 4. IP address assigned statically to the user IP address assigned dynamically to the user. 5. Not an approved internet standard PPP is official internet standard DATA LINK LAYER IN ATM: In ATM the information to be transmitted is converted into small fixed- size packet is called cells. The cells are 53 byte long of which 5 bytes are of header and 48 bytes are payload. ATM network are connection oriented. Making a cell requires, first sending a message to setup the connection. When an application program produces a message to be sent, that message works its way down the ATM protocol stocks having headers and trailers added undergoing segmentation into cells. For transmission the cell reaches to TC sub layer.

S. SANTHI PRIYA

UNIT 1

NOTES

46

Cell Transmission: The first step is header check summing. The check summing covers the first four header bytes, not the payload fields. The 8-bit checksum field is called as Header Error Control (HEC). The HEC detects and corrects bit errors. Once the HEC is generated and inserted into the cell header, the cell is ready for transmission. Functions of TC Sub layer in Cell Transmission system. 1. To match the ATM output rate to the rate of underlying transmission system is an important function of TC sub layer. 2. Generating framing information for the transmission system. 3. When data cell is available TC sub layer generates idle cell. 4. Locates the cell boundaries on bit stream. 5. Verify the headers and process them up to ATM layer. Cell Reception: At receiver the job of TC layer is to take a sequence of cell add a HEC to each one convert the result to a bit stream and match the bit stream to the speed of the underlying physical transmission system.

S. SANTHI PRIYA

UNIT 1

NOTES

47

You might also like