unit ii data link layer 10.1. data link layer purpose: provides basic connection between two...

Download UNIT II DATA LINK LAYER 10.1. Data link layer Purpose: Provides basic connection between two logically connected machines. Think: I stuff packets down

If you can't read please download the document

Upload: thomas-stanley

Post on 18-Jan-2018

219 views

Category:

Documents


0 download

DESCRIPTION

Data Link Layer Provides a well-defined service interface to the network layer. Determines how the bits of the physical layer are grouped into frames (framing). Deals with transmission errors (CRC and ARQ). Regulates the flow of frames. Performs general link layer management. Data Link Layer3

TRANSCRIPT

UNIT II DATA LINK LAYER 10.1 Data link layer Purpose: Provides basic connection between two logically connected machines. Think: I stuff packets down a wire to my neighbour Send raw packets between hosts. Basic error checking for lost data. In TCP/IP the "Physical layer" and the "Data Link" layer are grouped together and called the host-to- network layer. Data Link Layer Provides a well-defined service interface to the network layer. Determines how the bits of the physical layer are grouped into frames (framing). Deals with transmission errors (CRC and ARQ). Regulates the flow of frames. Performs general link layer management. Data Link Layer3 Functions of the Data Link Layer Provide service interface to the network layer Dealing with transmission errors Regulating data flow Slow receivers not swamped by fast senders Functions of DL..conti. Physical addressing, Network topology,Error notification Access to the physical medium,Flow control Different data link layer specifications define different network and protocol characteristics, including physical addressing, network topology, error notification, sequencing of frames, and flow control. Physical addressing, is not to be confused with network or IP addressing. The physical address defines how devices are labeled in the data link layer. This physical address is most commonly called the Media Access Control (MAC) address. The MAC address is a unique number assigned by the manufacturer. This numbering system is actually administered by one of the networking governing bodies. protocol data unit (PDU) Information that is delivered as a unit among peer entities of a network and that may contain control information, address information, or data. Informationnetworkaddressdata PDUs are relevant in relation to each of the first 4 layers of the OSI model as follows:OSI model The Layer 1 (Physical Layer) PDU is the bitLayer 1bit The Layer 2 (Data Link Layer) PDU is the frameLayer 2frame The Layer 3 (Network Layer) PDU is the packetLayer 3packet The Layer 4 (Transport Layer) PDU is the segment (e.g. TCP segment)Layer 4 TCP segment (Layer 5 and above are referred to as data.)Layer 5data Functions of the Data Link Layer (2) Relationship between packets and frames. Services Provided to Network Layer (a) Virtual communication. (b) Actual communication. Connecting Networks Repeater: physical layer Bridge: data link layer Router: network layer Gateway: network layer and above. Netprog: OSI Reference Model Repeater Copies bits from one network to another Does not look at any bits Allows the extension of a network beyond physical length limitations Netprog: OSI Reference Model REPEATER Bridge Copies frames from one network to another Can operate selectively - does not copy all frames (must look at data-link headers). Extends the network beyond physical length limitations. Netprog: OSI Reference Model BRIDGE Router Copies packets from one network to another. Makes decisions about what route a packet should take (looks at network headers). Netprog: OSI Reference Model ROUTER Gateway Operates as a router Data conversions above the network layer. Conversions: encapsulation - use an intermediate network translation - connect different application protocols encrpyption - could be done by a gateway Netprog: OSI Reference Model Hubs An Ethernet hub, active hub, network hub, repeater hub or hub is a device for connecting multiple twisted pair or fiber optic Ethernet devices together and making them act as a single network segment. Hubs work at the physical layer (layer 1) of the OSI model. The device is a form of multiport repeater.twisted pairfiber opticEthernetnetwork segmentphysical layerOSI modelmultiport repeater Switch A network switch or switching hub is a computer networking device that connects network segments.computer networking devicenetwork segments The term commonly refers to a network bridge that processes and routes data at the data link layer (layer 2) of the OSI model. Switches that additionally process data at the network layer (layer 3 and above) are often referred to as Layer 3 switches or multilayer switches.network bridgedata link layerOSI modelnetwork layermultilayer switches The term network switch does not generally encompass unintelligent or passive network devices such as hubs and repeaters.hubsrepeaters Errors in Networks There are two types of errors associated with networks. Human errors Network errors There are two categories of network errors. Corrupted data (that have been changed) Lost data 5-19 What are Network Errors? Network errors are a fact of life in data communications networks. Normally errors occur in bursts. In a burst error, more than one data bit is changed by the error-causing condition. Errors are not uniformly distributed, regardless of error rate statistics. Dial-up lines are more prone to errors because they have less stable parameters. 5-20 What Causes Errors? Line noise and Distortion cause errors Source of Error What Causes It How to Prevent It. Line Outages White Noise Impulse Noise Cross-Talk Echo Attenuation Intermodulation Noise Jitter Harmonic Distortion Storms, Accidents Movement of electrons Sudden increases in electricity (e.g. lightening) Multiplexer guardbands too small, or wires too close together Poor connections Graduate decrease in signal over distance Signals from several circuits combine Analog signals change phase Amplifier changes phase Increase signal strength Shield or move the wires Increase the guardbands, or move or shield the wires Fix the connections, or tune equipment Use repeaters or amps Move or shield the wires Tune equipment Error Prevention There are many ways to prevent errors: Shielding (adding insulation) Moving cables away from noise sources Changing multiplexing type (FDM TDM) Tuning transmission equipment and improving connection quality Using amplifiers and repeaters Equalization Leasing conditioned circuits 5-22 Error Detection It is possible to develop data transmission methodologies that vibe very high error detection and correction performance. The only way to do error detection and correction is to send extra data with each message. In general, the larger the amount of error detection data sent, the greater the ability to detect an error. 5-23 Summary :Error correction and Detection Error detection and correction or error control are techniques that enable reliable delivery of digital data over unreliable communication channels.digital datacommunication channels Many communication channels are subject to channel noise, and thus errors may be introduced during transmission from the source to a receiver.channel noise Error detection techniques allow detecting such errors, while error correction enables reconstruction of the original data Summary :Error correction and Detection Add control information to the original data being transmitted. Error detection: enough info to detect error. Need retransmissions. Error correction: enough info to detect and correct error Errors Data transmission can contain errors Single-bit Burst errors of length n (n: distance between the first and last errors in data block) How to detect errors If only data is transmitted, errors cannot be detected Send more information with data that satisfies a special relationship Add redundancy 10.26 Error detection methods 10.27 Error Detection There are three common error detection methods. Parity Checking Longitudinal redundancy checking Polynomial checking Checksum Cyclic Redundancy 5-28 Parity Checking One of the oldest and simplest method, parity checking adds 1 additional bit to each byte in the message. The value of this parity bit is dependent on the number of 1s in each byte transmitted. Even parity causes the sum of all bits (including the parity bit) to be even. Odd parity causes the sum to be odd. Unfortunately if two bits are erroneous, the parity checking will fail. Parity checking results in about a 50% reliability rate. 5-29 Parity Checking Assume we are using even parity with 7-bit ASCII. The letter V in 7-bit ASCII is encoded as Because there are four 1s (an even number), parity is set to zero. This would be transmitted as: Assume we are using odd parity with 7-bit ASCII. The letter W in 7-bit ASCII is encoded as Because there are three 1s (an odd number), parity is set to one. This would be transmitted as: Error Detection Methods Vertical Redundancy Check (VRC) Append a single bit at the end of data block such that the number of ones is even Even Parity (odd parity is similar) VRC is also known as Parity Check Performance: Detects all odd-number errors in a data block 10.31 10.32 Encoder and decoder for simple parity-check code Longitudinal Redundancy Checking 5-33 ASCII Letter D A T A BCC Parity bit For example, suppose we were to send the message DATA using odd parity and LRC with 7-bit ASCII: (Note that the parity bit in the BCC is determined by parity, not LRC.) Error Detection Methods Longitudinal Redundancy Check (LRC) Organize data into a table and create a parity for each column Original Data LRC 10.35 Figure Two-dimensional parity-check code 10.36 Figure Two-dimensional parity-check code 10.37 Figure Two-dimensional parity-check code 10.38 Points Data can be corrupted during transmission. Some applications require that errors be detected and corrected. 10.39 Points In a single-bit error, only 1 bit in the data unit has changed. 10.40 Points - Single-bit error 10.41 Points A burst error means that 2 or more bits in the data unit have changed. 10.42 Burst error of length 8 10.43 Points To detect or correct errors, we need to send extra (redundant) bits with data. 10.44 The structure of encoder and decoder Polynomial Checking Like LRC, polynomial checking adds 1 or more characters to the end of the message based on a mathematical algorithm. With checksum, 1 byte is added to the end of the message. It is obtained by summing the message values,and dividing by 255. The remainder is the checksum. (95% effective) With CRC, 8, 16, 24 or 32 bits are added, computed by calculating a remainder to a division problem. (99.969% with 8-bit, 99.99% with 16 bit). 5-45 Cyclic Redundancy Check Powerful error detection scheme Rather than addition, binary division is used Finite Algebra Theory (Galois Fields) Can be easily implemented with small amount of hardware Shift registers XOR (for addition and subtraction) 10.46 10.47 CRC encoder and decoder CRC 10.49 Division in CRC encoder 10.50 Division in the CRC decoder for two cases 10.51 A polynomial to represent a binary word 10.52 CRC division using polynomials Cyclic Redundancy Check Let us assume k message bits and n bits of redundancy Associate bits with coefficients of a polynomial x 6 +0x 5 +1x 4 +1x 3 +0x 2 +1x+1 = x 6 +x 4 +x 3 +x xxxxxxxxxx yyyy k bitsn bits Block of length k+n Cyclic Redundancy Check Let M(x) be the message polynomial Let P(x) be the generator polynomial P(x) is fixed for a given CRC scheme P(x) is known both by sender and receiver Create a block polynomial F(x) based on M(x) and P(x) such that F(x) is divisible by P(x) 10.54 Cyclic Redundancy Check Sending 1. Multiply M(x) by x n 2. Divide x n M(x) by P(x) 3. Ignore the quotient and keep the reminder C(x) 4. Form and send F(x) = x n M(x)+C(x) Receiving 1. Receive F(x) 2. Divide F(x) by P(x) 3. Accept if remainder is 0, reject otherwise 10.55 Example Send M(x) = x 5 +x 4 +x+1 (6 bits) P(x) = x 4 +x 3 +1 (5 bits, n = 4) 4 bits of redundancy Form x n M(x) x 9 +x 8 +x 5 +x 4 Divide x n M(x) by P(x) to find C(x) = C(x) Send the block Receive No remainder Accept CRC(Cyclic redundancy check) CRC is based on binary division instead of addition bits as in parity check. In CRC a sequence of redundant bits is appended to the data unit. So that is exactly divisible by a second number. At the destination the received data is divided by same number. Cyclic Redundancy Check Powerful error detection scheme Rather than addition, binary division is used Finite Algebra Theory (Galois Fields) Can be easily implemented with small amount of hardware Shift registers XOR (for addition and subtraction) Winter 2005 ECE ECE 766 Computer Interfacing and Protocols58 Error Detection Methods Performance: Detects all burst errors up to length n (number of columns) Misses burst errors of length n+1 if there are n-1 uninverted bits between the first and last bit If the block is badly garbled, the probability of acceptance is Checksum Used by upper layer protocols Similar to LRC, uses ones complement arithmetic 10.59 10.60 CHECKSUM The last error detection method we discuss here is called the checksum. The checksum is used in the Internet by several protocols although not at the data link layer. However, we briefly discuss it here to complete our discussion on error checking Idea Ones Complement Internet Checksum Topics discussed in this section: 10.61 Suppose our data is a list of five 4-bit numbers that we want to send to a destination. In addition to sending these numbers, we send the sum of the numbers. For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0, 6, 36), where 36 is the sum of the original numbers. The receiver adds the five numbers and compares the result with the sum. If the two are the same, the receiver assumes no error, accepts the five numbers, and discards the sum. Otherwise, there is an error somewhere and the data are not accepted. Exampe 1 10.62 We can make the job of the receiver easier if we send the negative (complement) of the sum, called the checksum. In this case, we send (7, 11, 12, 0, 6, 36). The receiver can add all the numbers received (including the checksum). If the result is 0, it assumes no error; otherwise, there is an error. Example 10.19 10.63 How can we represent the number 21 in ones complement arithmetic using only four bits? Solution The number 21 in binary is (it needs five bits). We can wrap the leftmost bit and add it to the four rightmost bits. We have ( ) = 0110 or 6. Example 10.20 10.64 How can we represent the number 6 in ones complement arithmetic using only four bits? Solution In ones complement arithmetic, the negative or complement of a number is found by inverting all bits. Positive 6 is 0110; negative 6 is If we consider only unsigned numbers, this is 9. In other words, the complement of 6 is 9. Another way to find the complement of a number in ones complement arithmetic is to subtract the number from 2 n 1 (16 1 in this case). 10.65 Let us redo Exercise using ones complement arithmetic. Figure shows the process at the sender and at the receiver. The sender initializes the checksum to 0 and adds all data items and the checksum (the checksum is considered as one data item and is shown in color). The result is 36. However, 36 cannot be expressed in 4 bits. The extra two bits are wrapped and added with the sum to create the wrapped sum value 6. In the figure, we have shown the details in binary. The sum is then complemented, resulting in the checksum value 9 (15 6 = 9). The sender now sends six data items to the receiver including the checksum 9. Example 10.22 10.66 The receiver follows the same procedure as the sender. It adds all data items (including the checksum); the result is 45. The sum is wrapped and becomes 15. The wrapped sum is complemented and becomes 0. Since the value of the checksum is 0, this means that the data is not corrupted. The receiver drops the checksum and keeps the other data items. If the checksum is not zero, the entire packet is dropped. Example (continued) 10.67 Figure Example 10.22 Error Detection: Checksums Let: message = Hello, world == 12 bytes == 128 bits (including parity bit) Hello, world *assuming: parity bit = 0 Sum = = 1128 Checksum [16-bits] = 1128 Checksum [8-bits] = 1128 mod 256 = 104 Message: checksum/12 bytes too much overhead typical use: 1 checksum byte per 128 Bytes of data 10.69 Sender site: 1. The message is divided into 16-bit words. 2. The value of the checksum word is set to All words including the checksum are added using ones complement addition. 4. The sum is complemented and becomes the checksum. 5. The checksum is sent with the data. Note 10.70 Receiver site: 1. The message (including checksum) is divided into 16-bit words. 2. All words are added using ones complement addition. 3. The sum is complemented and becomes the new checksum. 4. If the value of checksum is 0, the message is accepted; otherwise, it is rejected. Note 10.71 Let us calculate the checksum for a text of 8 characters (Forouzan). The text needs to be divided into 2-byte (16- bit) words. We use ASCII (see Appendix A) to change each byte to a 2-digit hexadecimal number. For example, F is represented as 0x46 and o is represented as 0x6F. Figure shows how the checksum is calculated at the sender and receiver sites. In part a of the figure, the value of partial sum for the first column is 0x36. We keep the rightmost digit (6) and insert the leftmost digit (3) as the carry in the second column. The process is repeated for each column. Note that if there is any corruption, the checksum recalculated by the receiver is not all 0s. We leave this an exercise. Example 10.23 10.72 Figure Example 10.23 Hamming Code Hamming Code is a error-detection-and- correction scheme for single-bit errors Generates several parity bits that are interspersed with data in a specific pattern One data bit affects more than one parity bit, so the bad bit can be detected Its error correction capability eliminates the need for retransmission It uses forward-error-correction Error corrected by the receiving device 73 Hamming Codes Hamming code is a linear error-correcting code named after its inventor, Richard Hamming. Hamming codes can detect up to two simultaneous bit errors, and correct single-bit errorslinearerror-correcting codeRichard Hamming The Hamming distance between two words is the number of differences between corresponding bits. The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words Positions of redundancy bits in Hamming code Redundancy bits calculation Example of redundancy bit calculation Error detection using Hamming code 10.79 The Hamming distance between two words is the number of differences between corresponding bits. Note 10.80 Let us find the Hamming distance between two pairs of words. 1. The Hamming distance d(000, 011) is 2 because Example The Hamming distance d(10101, 11110) is 3 because 10.81 The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words. Note 10.82 Find the minimum Hamming distance of the coding scheme in Table Solution We first find all Hamming distances. Example 10.5 The d min in this case is 2. 11.83 FLOW AND ERROR CONTROL The most important responsibilities of the data link layer are flow control and error control. Collectively, these functions are known as data link control. Flow Control Error Control Topics discussed 11.84 Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. 11.85 Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Note 11.86 PROTOCOLS Now let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages. 11.87 Taxonomy of protocols 11.88 NOISELESS CHANNELS Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. Simplest Protocol Stop-and-Wait Protocol Topics discussed in this section: 11.89 The design of the simplest protocol with no flow or error control 11.90 Algorithm 11.1 Sender-site algorithm for the simplest protocol 11.91 Algorithm 11.2 Receiver-site algorithm for the simplest protocol 11.92 shows an example of communication using this protocol. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame. Points 11.93 Flow diagram 11.94 Design of Stop-and-Wait Protocol 11.95 Algorithm 11.3 Sender-site algorithm for Stop-and-Wait Protocol 11.96 Algorithm 11.4 Receiver-site algorithm for Stop-and-Wait Protocol 11.97 example of communication using this protocol. It is still very simple. The sender sends one frame and waits for feedback from the receiver. When the ACK arrives, the sender sends the next frame. Note that sending two frames in the protocol involves the sender in four events and the receiver in two events. 11.98 Flow diagram 11.99 NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols in this section that use error control. Stop-and-Wait Automatic Repeat Request Go-Back-N Automatic Repeat Request Selective Repeat Automatic Repeat Request Protocols discussed in this section: Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires. Note In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic. Note In Stop-and-Wait ARQ, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected. Note Design of the Stop-and-Wait ARQ Protocol Automatic repeat request(ARQ) Automatic Repeat reQuest (ARQ), also known as Automatic Repeat Query, is an error-control method for data transmission that uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service.error-controldata transmission acknowledgementstimeouts If the sender does not receive an acknowledgment before the timeout, it usually re-transmits the frame/packet until the sender receives an acknowledgment or exceeds a predefined number of re-transmissions.re-transmits 11.1 Normal operation 11.2 Stop-and-Wait ARQ, lost frame 11.3 Stop-and-Wait ARQ, lost ACK frame Numbered acknowledgments are needed if an acknowledgment is delayed and the next frame is lost. Note: 11.4 Stop-and-Wait ARQ, delayed ACK Numbered acknowledgments are needed if an acknowledgment is delayed and the next frame is lost. Note: 11.5 Piggybacking Flow diagram for Stop-and-wait ARQ Disadvantages of Stop-and-wait- ARQ Go-Back-N ARQ Selective Repeat ARQ Go-Back-N ARQ Sequence Number Sender and Receiver Sliding Window Control Variables and Timers Acknowledgment Resending Frames Operation Sender sliding window 0 to 2 m -1 bits of window size 11.7 Receiver sliding window Control variables 11.9 Go-Back-N ARQ, normal operation 11.10 Go-Back-N ARQ, lost frame 11.11 Go-Back-N ARQ: sender window size Selective-Repeat ARQ Sender and Receiver Windows Operation Sender Window Size Bidirectional Transmission Pipelining 11.12 Selective Repeat ARQ, sender and receiver windows 11.13 Selective Repeat ARQ, lost frame Selective Repeat ARQ, sender window size Bandwidth delay Product (ARQ system) : E = bandwidth in bits/se X Round-trip delay Pipelining : Task is often begun before previous task has ended No pipelining in Stop-and-wait ARQ Pipelining does apply to Go-back-N ARQ, and selective repeat ARQ Example 1 In a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What is the bandwidth-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link? Solution The bandwidth-delay product is 1 10 6 20 = 20,000 bits The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and then back again. However, the system sends only 1000 bits. We can say that the link utilization is only 1000/20,000, or 5%. For this reason, for a link with high bandwidth or long delay, use of Stop-and-Wait ARQ wastes the capacity of the link. Example 2 What is the utilization percentage of the link in Example 1 if the link uses Go- Back-N ARQ with a 15-frame sequence? Solution The bandwidth-delay product is still 20,000. The system can send up to 15 frames or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged frames, the utilization percentage is much less because frames have to be resent. 11.5 HDLC Configurations and Transfer Modes Frames Frame Format Examples Data Transparency High-Level Data Link Control High-Level Data Link Control (HDLC) is a bit-oriented synchronous data link layer protocol developed by the International Organization for Standardization (ISO).bit-oriented synchronousdata link layerprotocol International Organization for Standardization HDLC can be used for point to multipoint connections, but is now used almost exclusively to connect one device to another, using what is known as Asynchronous Balanced Mode (ABM). The original master-slave modes Normal Response Mode (NRM) and Asynchronous Response Mode (ARM) are rarely used.point to multipoint connectionsone device to anotherAsynchronous Balanced ModeNormal Response ModeAsynchronous Response Mode HDLC stations Primary Station Secondary station Combined station Primary station: Controlling the operation of link. Frames also issued Secondary station: It operate under the control of primary station. Combined station: It is the features of primary and secondary station. HDLC Operations, and Frame Types There are three fundamental types of HDLC frames. Information frames, or I-frames, transport user data from the network layer. In addition they can also include flow and error control information piggybacked on data. Supervisory Frames, or S-frames, are used for flow and error control whenever piggybacking is impossible or inappropriate, such as when a station does not have data to send. S-frames do not have information fields. Unnumbered frames, or U-frames, are used for various miscellaneous purposes, including link management. Some U-frames contain an information field, depending on the type. 11.15 NRM (Normal Response Mode) 11.16 ABM (Asynchronous Balanced Mode) 11.17 HDLC frame 11.18 HDLC frame types 11.19 I-frame 11.20 S-frame control field in HDLC 11.21 U-frame control field in HDLC Data Transparency HDLC data frames carry text as well as non-text Data field contains a patterns reserved for the flag, lack of data transparency exists Bit stuffing is used. Bit stuffing is the process of adding one extra 0 whenever there are five consecutive 1s in the data so that the receiver does not mistake the data for a flag. Note: Bit stuffing and removal Bit stuffing in HDLC Data Transparency HDLC data frames carry text as well as non-text Data field contains a patterns reserved for the flag, lack of data transparency exists Bit stuffing is used. SONET/SDH Introduction SONET is a newly adopted standard for interfaces in optical networks Physical layer transmission format SONET defines a fiber based transmission scheme for ATM SONET(Synchronous Optical Networks) was developed by ANSI; SDH (Synchronous Digital Hierarchy) was developed by ITU-T. Note ARCHITECTURE Let us first introduce the architecture of a SONET system: signals, devices, and connections. Signals SONET Devices Connections Topics discussed SONET LAYERS The SONET standard includes four functional layers: the photonic, the section, the line, and the path layer. They correspond to both the physical and the data link layers. Path Layer Line Layer Section Layer Photonic Layer DeviceLayer Relationships Topics discussed in this section: SONET defines four layers: path, line, section, and photonic. Note SONET layers compared with OSI or the Internet layers Devicelayer relationship in SONET Fiber-Distributed Data Interface (FDDI) Fiber-Distributed Data Interface (FDDI) provides a standard for data transmission in a local area network that can extend in range up to 200 kilometers (124 miles). The FDDI protocol uses as its basis the token ring protocol. In addition to covering large geographical areas, FDDI local area networks can support thousands of users. As a standard underlying medium it uses optical fiber (though it can use copper cable, in which case one can refer to CDDI). FDDI uses a dual-attached, counter-rotating token-ring topology. 153 Fiber-Distributed Data Interface (FDDI) An FDDI network contains two token rings, one for possible backup in case the primary ring fails. FDDI has a larger maximum-frame size than standard 100 Mbit/s ethernet, allowing better throughput. A small number of devices (typically infrastructure devices such as routers and concentrators rather than host computers) connect to both rings - hence the term "dual- attached". Host computers then connect as single-attached devices to the routers or concentrators. 154 FDDI TOKEN RING NETWORK FDDI BASIC PRINCIPLE TOKEN RING NETWORK LIKE IEEE TOKEN: A SPECIAL SEQUENCE OF BITS TOKEN CIRCULATES AROUND THE RING A STATION REMOVES THE TOKEN FROM RING BEFORE TRANSMISSION AFTER TRANSMISSION, THE STATION RETURNS THE TOKEN TO THE RING COLLISIONS ARE PREVENTED AS THERE IS ONLY ONE TOKEN IN THE RING FDDI FDDI PHYSICAL PROPERTIES DUAL-COUNTER-ROTATING TOKEN RING ARCHITECTURE ONE RING IS PRIMARY AND THE OTHER SECONDARY UP TO 500 STATIONS WITH A MAXIMUM DISTANCE OF 2 KM BETWEEN ANY PAIR OF STATIONS FOR MULTIMODE FIBER WITH SINGLE-MODE FIBER THE DISTANCE CAN BE UP TO 40 KM MAXIMUM RING LENGTH IS 100 KM (TOTAL FIBER LENGTH IS 200 KM FOR TWO RINGS) USES 4B/5B ENCODING FDDI FDDI ARCHITECTURAL MODEL ACCORDING TO THE OSI-RM, FDDI SPECIFIES LAYER 1 (PHYSICAL LAYER) AND PART OF LAYER 2 (DATA LINK CONTROL LAYER) THE PHYSICAL LAYER HANDLES THE TRANSMISSION OF RAW BITS OVER A COMMUNICATIONS LINK THE DATA LINK CONTROL (DLC) LAYER IS RESPONSIBLE FOR MAINTAINING THE INTEGRITY OF INFORMATION EXCHANGED BETWEEN TWO POINTS MARCH 6, 2003FDDI159 FDDI RELATIONSHIP BETWEEN FDDI AND OSI-RM THE PMD(Physical media dependent layer) LAYER PMD LAYER DEFINES THE TYPE OF MEDIA INTERCONNECTION AND ITS CHARACTERISTICS SUCH AS TRANSMITTER POWER, FREQUENCIES, RECEIVER SENSITIVITIES, BIT ERROR RATES (BER), OPTICAL COMPONENTS ETC. PMD-MMF: MULTIMODE (62.5 MICRON CORE DIAMETER) FIBER PMD-SMF: SINGLE-MODE (8-10 MICRON CORE DIAMETER) FIBER ALSO DEFINES STP, UTP AS MEDIA AND FDDI ON SONET MARCH 6, 2003FDDI161 IEEE STANDARDS The Computer Society of the IEEE started a project, called Project 802, to set standards to enable intercommunication among equipment from a variety of manufacturers. Project 802 is a way of specifying functions of the physical layer and the data link layer of major LAN protocols. OSI Application Presentation Session Transport Network Data Link Physical Framing Error control Flow control Transmission/reception of frames MEDIA ACCESS sublayer LOGICAL LINK sublayer ISO-OSI Seven Layer Model Layer 7Application Layer 6Presentation Layer 5Session Layer 4Transport Layer 3Network Layer 2Data Link Layer 1Physical Source:Focus of IEEE 802 The IEEE LAN Standards See also IEEE LAN/MAN Standards Committee Web siteIEEE Carrier Sense IEEE Token Bus IEEE Token Ring IEEE Wireless IEEE Logical Link Control (LLC) MAC PHY OSI Layer 2 (data link) OSI Layer 1 (physical) bus star ring abg IEEE 802 Subgroups and their Responsibilities Internetworking Logical Link Control (LLC) CSMA/CD Token Bus LAN Continued IEEE 802 Subgroups and their Responsibilities (Cont.) Token Ring LAN Metropolitan Area Network Broadband Technical Advisory Group Fiber-Optic Technical Advisory Group Continued IEEE 802 Subgroups and their Responsibilities (Cont.) Integrated Voice/Data Networks Network Security Wireless Networks Demand Priority Access LANs Ex: 100BaseVG-AnyLAN Wireless LAN Protocols Mbps, 2.4 GHz, FHSS and DSSS IEEE a 54 Mbps, 5 GHz, Orthogonal Frequency Division Multiplexing IEEE b 11 Mbps, 2.4 GHz, DSSS IEEE g 20+ Mbps, 2.4 GHZ 108 Mbps, 2.4 GHz (Extreme G) Single communication channel that is shared by all the machines on the network Broadcast Networks computer cable Packets Short messages sent by any machine are received by all others Fields Address General Rule: Smaller, geographically localized networks Quick Review Packets ALL machines receive it, but one processes it Also possible to address a packet to ALL machines (special code in the address field) Mode of operation: Broadcasting Also possible to address a packet to a SUBSET of machines (group number code in the address field) Mode of operation: Multicasting Quick Review 3 Dynamic Channel Allocation Technologies 1. Pure ALOHA 2. Slotted ALOHA 3. CSMA 4. CSMA/CD (old ETHERNET) 5. Switching (Fast ETHERNET) 6. Token passing (Token Ring ) ALOHA Protocols Anyone may transmit whenever they want. (Continuous time model.) Each radio detects collisions by listening to its own signal. A collision is detected when a sender doesn't receive the signal that it just sent. After a collision, wait a random amount of time and transmit the same frame again. This technique is known as backoff. Back in 1970, the University of Hawaii built a network out of radios that broadcast signals. Basic idea: Slotted ALOHA Time is divided into slots can only transmit at start of slot Vulnerable period halved => max. eff is doubled Requires sync of clocks Still poor at hi-loads Carrier Sense, Multiple Access (CSMA) We can improve the performance of our simple network greatly if we introduce carrier sensing (CS). With carrier sensing, each host listens to the data being transmitted over the cable. A host will only transmit its own frames when it cannot hear any data being transmitted by other hosts. When a frame finishes, an interframe gap of about 9.6 sec is allowed to pass before another host starts transmitting its frame. Communication Link Carrier Sense Multiple Access (CSMA) Improves performance when higher medium utilisation When a node has data to transmit, the node first listens to the cable (using a transceiver) to see if a carrier (signal) is being transmitted by another node. IEEE Ethernet Carrier-sense multiple access with collision detection (CSMA/CD). CS = carrier sense MA = multiple access CD = collision detection Base Ethernet standard is 10 Mbps. 100Mbps, 1Gbps, 10Gbps standards came later IEEE 802.3: CSMA/CD Bus LAN The standard describes the operation of the MAC sub- layer in a bus LAN that uses carrier sense, multiple access with collision detection (CSMA/CD). Beside carrier sensing, collision detection and the binary exponential back-off algorithm, the standard also describes the format of the frames and the type of encoding used for transmitting frames. The minimum length of frames can be varied from network to network. This is important because, depending on the size of the network, the frames must be of a suitable minimum length. The standard also makes some suggestions about the type of cabling that should be used for CSMA/CD bus LANs. The CSMA/CD Bus LAN is also widely called Ethernet. Ethernet CSMA/CD CSMA/CD (carrier sense multiple access with collision detection) media access protocol is used. Data is transmitted in the form of packets. Sense channel prior to actual packet transmission. Transmit packet only if channel is sensed idle; else, defer the transmission until channel becomes idle. After packet transmission is started, the node monitors its own transmission to see if the packet has experienced a collision. If the packet is observed to be undergoing a collision, the transmission is aborted and the packet is retransmitted after a random interval of time using Binary Exponential Backoff algorithm. State Diagram for CSMA/CD CS Packet? Sense Carrier Discard Packet Send Detect Collision Jam channel b=CalcBackoff(); wait(b); attempts++; No Yes attempts < 16 attempts == 16 Collisions CS AB AB Collisions are caused when two adaptors transmit at the same time (adaptors sense collision based on voltage differences ) Both found line to be idle Both had been waiting to for a busy line to become idle A starts at time 0 Message almost there at time T when B starts collision! How can we be sure A knows about the collision? 13.7 CSMA/CD procedure MAC frame Minimum and maximum lengths Frame length: Minimum: 64 bytes (512 bits) Maximum: 1518 bytes (12,144 bits) Note Figure 13.6 Example of an Ethernet address in hexadecimal notation Unicast and multicast addresses The least significant bit of the first byte defines the type of address. If the bit is 0, the address is unicast; otherwise, it is multicast. Note The broadcast destination address is a special case of the multicast address in which all bits are 1s. Note Define the type of the following destination addresses: a. 4A:30:10:21:10:1A b. 47:20:1B:2E:08:EE c. FF:FF:FF:FF:FF:FF Solution To find the type of the address, we need to look at the second hexadecimal digit from the left. If it is even, the address is unicast. If it is odd, the address is multicast. If all digits are Fs, the address is broadcast. Therefore, we have the following: a. This is a unicast address because A in binary is b. This is a multicast address because 7 in binary is c. This is a broadcast address because all digits are Fs. Example 13.1 Show how the address 47:20:1B:2E:08:EE is sent out on line. Solution The address is sent left-to-right, byte by byte; for each byte, it is sent right-to-left, bit by bit, as shown below: Example 13.2 10 Base 5 (Thicknet) (Bus Topology) 10 Base 2 (Thinnet) (Bus Topology) 10 Base T (UTP) (Star/Tree Topology) 10 Base FL (Fiber) (Star/Tree Topology) Ethernet evolution through four generations Categories of Standard Ethernet Base5 implementation Base2 implementation Base-T implementation Base-F implementation Ethernet Physical Media :- 10 Base5 - Thick Co-axial Cable with Bus Topology 10 Base2 - Thin Co-axial Cable with Bus Topology 10 BaseT - UTP Cat 3/5 with Tree Topology 10 BaseFL - Multimode/Singlemode Fiber with Tree Topology Maximum Segment Length 10 Base m with at most 4 repeaters (Use Bridge to extend the network) 10 Base m with at most 4 repeaters (Use Bridge to extend the network) 10 BaseT m with at most 4 hubs (Use Switch to extend the network Fast Ethernet 100 Mbps bandwidth Uses same CSMA/CD media access protocol and packet format as in Ethernet. 100BaseTX (UTP) and 100BaseFX (Fiber) standards Physical media :- 100 BaseTX - UTP Cat 5e 100 BaseFX - Multimode / Singlemode Fiber Full Duplex/Half Duplex operations. IEEE The IEEE Protocol is a Token Bus Protocol It was inspired by the IBM Token Bus Protocol It has a worst-case upperbound for predicting the worst-case delay in delivery. It is a Physical Bus but Logical Ring architecture. IEEE 802.4: Token Bus LAN Lower Layer Protocol: IEEE Token Bus Protocol Token bus is a network implementing the token ring protocol over a "virtual ring" on a coaxial cable. A token is passed around the network nodes and only the node possessing the token may transmit. If a node doesn't have anything to send, the token is passed on to the next node on the virtual ring. Each node must know the address of its neighbour in the ring, so a special protocol is needed to notify the other nodes of connections to, and disconnections from, the ring.token ringcoaxial cable Token Bus Server Client Token A token is distributed to each client in turn. Token Bus Data Pickup A token is sent from one node to the other The client wanting to transmit grabs an empty token Data is attached Token leaves for the next node and its travel on the bus until it reaches the address to which the data is destined Cont. Token Bus Data Delivery Token delivers the data to the addressee Acknowledgement is returned to the sender Token is passed to the next node The process continues If there is an error in delivering the information, a request for retransmission attached to the token and it is sent to the sender Token Bus Standard and Applications IEEE It can be used in both broadband and baseband transmission The Token Ring MAC Sublayer Protocol LAN Lower Layer Protocol: IEEE Token Passing Protocol Token Passing Protocol in Operation D A B C Circulating Token Server Workstation No collisions Comparison with CSMA/CD Absence of collision Offers a systematic method of transmitting information In theory, it is superior to CSMA/CD More sophisticated to implement Protocols used in the newer and most popular networks are, however, based on CSMA/CD The Token Token Data packet that could carry data Circulates around the ring Offers an opportunity for each workstation and server to transmit data The Transmitting Workstation Waits for a free token in order to be able to attach the data to be transmitted to the token On finding a free token, attach the following: Senders address Receivers address Data block to be transmitted Error checking details etc. At the Receiving End Data is received and checked for errors Outcomes at the receiving end Data received without errors Date received with errors Error-free Delivery of Data An acknowledgment is attached to the token Acknowledgment is passed to the sender Token is set free for other nodes to transmit information At this time, the next workstation on the ring will receive an opportunity Correcting Errors in Delivery A request for retransmission is attached to the token Token carries the message for retransmission to the sender The data is thus retransmitted Token Regeneration The token is regenerated at regular intervals to sustain the timing of circulation of the token Usage of Token Passing Used extensively in ring LANs Especially in the IBM token-ring LAN A version of this protocol is also used on certain types of bus LANs Token-bus networks Used in large fiber-optics backbones Used for the construction of very large networks Usage in Practice Used in backbones Uses in a number of IBM shops Overall, the usage of Ethernet surpasses the usage of Token-Ring networks that are based on the Token- Passing protocol Token Passing Standards IEEE For the token-ring LANs IEEE For the token-bus LANs A FDDI protocol is used on large fiber-optic ring backbones IEEE Adopted in Defines; MAC sublayer MAC management protocols and services Physical (PHY) layers IR FHSS DSSS IEEE Components Station BSS - Basic Service Set IBSS : Infrastructure BSS : QBSS ESS - Extended Service Set A set of infrastrucute BSSs. Connection of APs Tracking of mobility DS Distribution System AP communicates with another Services Station services: authentication, de-authentication, privacy, delivery of data Distribution Services ( A thin layer between MAC and LLC sublayer) association disassociation reassociation distribution Integration Frame Types Protocol Version Frame Type and Sub Type To DS and From DS More Fragments Retry Power Management More Data WEP Order FC Duration /ID Address 1 Address 2 Address 3 Sequence Control Address 4 DATAFCS bytes NAV information Or Short Id for PS-Poll BSSID BSS Identifier TA - Transmitter RA - Receiver SA - Source DA - Destination IEEE 48 bit address Individual/Group Universal/Local 46 bit address MSDU Sequence Number Fragment Number CCIT CRC-32 Polynomial Upper layer data 2048 byte max 256 upper layer header IEEE Protocols IEEE a PHY Standard : 8 channels : 54 Mbps : Products are available. IEEE b PHY Standard : 3 channels : 11 Mbps : Products are available. IEEE d MAC Standard : operate in variable power levels : ongoing IEEE e MAC Standard : QoS support : Second half of IEEE f Inter-Access Point Protocol : 2 nd half 2002 IEEE g PHY Standard: 3 channels : OFDM and PBCC : 2 nd half 2002 IEEE h Supplementary MAC Standard: TPC and DFS : 2 nd half 2002 IEEE i Supplementary MAC Standard: Alternative WEP : 2 nd half 2002 Bridges A network bridge connects multiple network segments at the data link layer (Layer 2) of the OSI model. In Ethernet networks, the term bridge formally means a device that behaves according to the IEEE 802.1D standard. A bridge and switch are very much alike; a switch being a bridge with numerous ports. Switch or Layer 2 switch is often used interchangeably with bridge.network segmentsdata link layerOSI modelIEEE 802.1Dbridge and switch Bridges Bridges are similar to repeaters or network hubs, devices that connect network segments at the physical layer (Layer 1) of the OSI model; however, with bridging, traffic from one network is managed rather than simply rebroadcast to adjacent network segments. Bridges are more complex than hubs or repeaters. Bridges can analyze incoming data packets to determine if the bridge is able to send the given packet to another segment of the network.repeatersnetwork hubsphysical layerOSI model Advantages of network bridges Self-configuring Simple bridges are inexpensive Isolate collision domain Reduce the size of collision domain by microsegmentation in non-switched networksmicrosegmentation Transparent to protocols above the MAC layer Allows the introduction of management/performance information and access control LANs interconnected are separate, and physical constraints such as number of stations, repeaters and segment length don't apply Helps minimize bandwidth usage Disadvantages of network bridges Does not limit the scope of broadcasts [broadcast domain cannot be controlled] Does not scale to extremely large networks Buffering and processing introduces delays Bridges are more expensive than repeaters or hubs A complex network topology can pose a problem for transparent bridges. For example, multiple paths between transparent bridges and LANs can result in bridge loops. The spanning tree protocol helps to reduce problems with complex topologiesLANsspanning tree protocol