Lecture 6 Datalink Framing, Switching. From Signals to Packets

Similar documents
1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

From Signals to Packets Computer Networking. Link Layer: Implementation. Datalink Functions. Lecture 5 - Coding and Error Control

From Signals to Packets Computer Networking. Link Layer: Implementation. Network Delay. 06-datalink.ppt, , Fall

Computer Networking. Lecture 4 - Coding and Error Control

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Introduction to Computer Networks. 03 Data Link Layer Introduction

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

Links. CS125 - mylinks 1 1/22/14

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Part 5: Link Layer Technologies. CSE 3461: Introduction to Computer Networking Reading: Chapter 5, Kurose and Ross

CSCI-1680 Link Layer I Rodrigo Fonseca

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

CS 4453 Computer Networks Winter

Summary of MAC protocols

Internetworking Part 1

Computer Networking Lecture 5 Data link Layer Access Control. Based on slides by Peter Steenkiste Copyright, Carnegie Mellon

Data Link Layer: Overview, operations

Medium Access Protocols

Physical and Data Link layers

Outline: Connecting Many Computers

Link Layer and Ethernet

Link Layer and Ethernet

CCNA Exploration1 Chapter 7: OSI Data Link Layer

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Layer 2 functionality bridging and switching

Computer and Network Security

Chapter 3. The Data Link Layer

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Design Technologies. Lecture 17: Prof. Shervin Shirmohammadi CEG

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

Overview of Networks

Informal Quiz #01: SOLUTIONS

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

Chapter 8: Multiplexing

CS 455/555 Intro to Networks and Communications. Link Layer

Introductory to Computer Networks Local Area Networks. Lecture 16 Fall Isfahan University of technology Dr.

Synchronous Optical Networks (SONET) Advanced Computer Networks

Networks 15.2 Multiplexing Technologies Access Networks 15.5 Common Peripheral Interfaces

Principles behind data link layer services

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

M242 COMPUTER NETWORS AND SECURITY

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Network Superhighway CSCD 330. Network Programming Winter Lecture 13 Network Layer. Reading: Chapter 4

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

ET4254 Communications and Networking 1

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

Lecture 2 Physical Layer - Multiplexing

Data Link Layer, Part 5. Medium Access Control

Principles behind data link layer services:

Principles behind data link layer services:

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

CSC 4900 Computer Networks: The Link Layer

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

Network Architecture

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

ELEC 691X/498X Broadcast Signal Transmission Winter 2018

Special expressions, phrases, abbreviations and terms of Computer Networks

Housekeeping. Fall /5 CptS/EE 555 1

Chapter 5 Link Layer and LANs

Token Ring and. Fiber Distributed Data Interface (FDDI) Networks: Token Ring and FDDI 1

Review of Network Technologies

Raj Jain. The Ohio State University Columbus, OH

Direct Link Networks. Framing. Lecture - Encoding & Framing 1. Problems. Areas for Discussion

CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

Ethernet Switches (more)

SAE6A/SAZ6B DATA COMMUNICATION AND NETWORKING UNIT : I To V

Networking Link Layer

QUESTION BANK EVEN SEMESTER

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

Introduction to Ethernet. Guy Hutchison 8/30/2006

Lecture 15: Multiplexing (2)

Networks 15.2 Multiplexing Technologies Access Networks 15.5 Common Peripheral Interfaces

Communication Networks

CompSci 356: Computer Network Architectures. Lecture 4: Link layer: Encoding, Framing, and Error Detection Ref. Chap 2.2, 2.3,2.4

Goals of Today s Lecture. Adaptors Communicating

(a) Client server model (b) MAN (c) Interfaces and services. [4+6+6] FirstRanker

COMPUTER NETWORK Model Test Paper

POS on ONS Ethernet Cards

CS1302 / Computer Networks

Chapter 4 Transmission Systems and the Telephone Network. School of Info. Sci. & Eng. Shandong Univ.

Principles behind data link layer services:

Goals. Fundamentals of Network Media. More topics. Topics. Multiple access communication. Multiple access solutions

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

Chapter 5 Link Layer and LANs

Lecture 4b. Local Area Networks and Bridges

Electromagnetic Spectrum

Module 1. Introduction. Version 2, CSE IIT, Kharagpur

CSCD 330 Network Programming

The Link Layer and LANs. Chapter 6: Link layer and LANs

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

2. LAN Topologies Gilbert Ndjatou Page 1

INTRODUCTORY COMPUTER

ECE 4450:427/527 - Computer Networks Spring 2017

Computer Networks

Transcription:

Lecture 6 Datalink Framing, Switching David Andersen Department of Computer Science Carnegie Mellon University 15-441 Networking, Spring 2005 http://www.cs.cmu.edu/~srini/15-441/s05/ 1 From Signals to Packets Analog Signal Digital Signal Bit Stream 0 0 1 0 1 1 1 0 0 0 1 Packets 0100010101011100101010101011101110000001111010101110101010101101011010111001 Header/Body Header/Body Header/Body Packet Transmission Sender Receiver 2

Datalink Functions Framing: encapsulating a network layer datagram into a bit stream.» Add header, mark and detect frame boundaries, Media access: controlling which frame should be sent over the link next.» Easy for point-to-point links; half versus full duplex» Harder for multi-access links: who gets to send? Error control: error detection and correction to deal with bit errors.» May also include other reliability support, e.g. retransmission Flow control: avoid that the sender outruns the receiver. 3 Datalink Lectures Framing and error coding. Datalink architectures. Switch-based networks.» Packet forwarding» Flow and error control Taking turn protocols. Contention-based networks: basic Ethernet. Ethernet bridging and switching. Connectivity to the home. Circuit-based communication 4

Framing A link layer function, defining which bits have which function. Minimal functionality: mark the beginning and end of packets (or frames). Some techniques:» out of band delimiters (e.g. FDDI 4B/5B control symbols)» frame delimiter characters with character stuffing» frame delimiter codes with bit stuffing» synchronous transmission (e.g. SONET) 5 Character and Bit Stuffing Mark frames with special character.» What happens when the user sends this character?» Use escape character when controls appear in data: *abc*def -> *abc\*def» Very common on serial lines, in editors, etc. Mark frames with special bit sequence» must ensure data containing this sequence can be transmitted» example: suppose 11111111 is a special sequence.» transmitter inserts a 0 when this appears in the data:» 11111111 -> 111111101» must stuff a zero any time seven 1s appear:» 11111110 -> 111111100» receiver unstuffs. 6

Example: Ethernet Framing preamble datagram length more stuff Preamble is 7 bytes of 10101010 (5 MHz square wave) followed by one byte of 10101011 Allows receivers to recognize start of transmission after idle channel 7 SONET SONET is the Synchronous Optical Network standard for data transport over optical fiber. One of the design goals was to be backwards compatible with many older telco standards. Beside minimal framing functionality, it provides many other functions:» operation, administration and maintenance (OAM) communications» synchronization» multiplexing of lower rate signals» multiplexing for higher rates 8

Standardization History Process was started by divestiture in 1984.» Multiple telephone companies building their own infrastructure SONET concepts originally developed by Bellcore. First standardized by ANSI T1X1 group for the US. Later picked up by CCITT and developed its own version. SONET/SDH standards approved in 1988. 9 A Word about Data Rates Bandwidth of telephone channel is under 4KHz, so when digitizing: 8000 samples/sec * 8 bits = 64Kbits/second Common data rates supported by telcos in North America:» Modem: rate improved over the years» T1/DS1: 24 voice channels plus 1 bit per sample (24 * 8 + 1) * 8000 = 1.544 Mbits/second» T3/DS3: 28 T1 channels: 7 * 4 * 1.544 = 44.736 Mbits/second 10

Synchronous Data Transfer Sender and receiver are always synchronized.» Frame boundaries are recognized based on the clock» No need to continuously look for special bit sequences SONET frames contain room for control and data.» Data frame multiplexes bytes from many users» Control provides information on data, management, 3 cols transport overhead 87 cols payload capacity 9 rows 11 SONET Framing Base channel is STS-1 (Synchronous Transport System).» Takes 125 µsec and corresponds to 51.84 Mbps» 1 byte/frame corresponds to a 64 Kbs channel (voice)» Also called OC-1 = optical carrier Standard ways of supporting slower and faster channels.» Support both old standards and future (higher) data rates Actual payload frame floats in the synchronous frame.» Clocks on individual links do not have to be synchronized 3 cols transport overhead 87 cols payload capacity, including 1 col path overhead 9 rows 12

How Do We Support Lower Rates? 1 Byte in every consecutive frame corresponds to a 64 Kbit/second channel.» 1 voice call. Higher bandwidth channels hold more bytes per frame.» Multiples of 64 Kbit/second Channels have a telecom flavor.» Fixed bandwidth» Just data no headers» SONET multiplexers remember how bytes on one link should be mapped to bytes on the next link 125 µsec 125 µsec 125 µsec 13 How Do We Support Higher Rates? Send multiple frames in a 125 µsec time slot. The properties of a channel using a single byte/st-1 frame are maintained!» Constant 64 Kbit/second rate» Nice spacing of the byte samples Rates typically go up by a factor of 4. Two ways of doing interleaving.» Frame interleaving» Column interleaving concatenated version, i.e. OC-3c 125 µsec 125 µsec 125 µsec 14

The SONET Signal Hierarchy Signal Type line rate # of DS0 DS0 (POTS) 64 Kbs 1 DS1 1.544 Mbs 24 DS3 44.736 Mbs 672 OC-1 51.84 Mbs 672 OC-3 155 Mbs 2,016 OC-12 622 Mbs 8,064 STS-48 2.49 Gbs 32,256 STS-192 9.95 Gbs 129,024 STS-768 39.8 Gbs 516,096 15 Using SONET in Networks Add-drop capability allows soft configuration of networks, usually managed manually. OC-48 mux DS1 OC-3c mux OC-12c mux 16

Self-Healing SONET Rings OC-48 mux mux DS1 OC-3c OC-12c mux mux 17 SONET as Physical Layer OC3/12 Access CO OC3/12 Access OC12/48 Metro CO POP OC3/12 Access WDM Backbone OC48/192 CO POP OC12/48 Metro OC3/12 Access CO CO OC12/48 Metro POP OC3/12 Access CO CO OC3/12 Access OC3/12 Access 18

Error Coding Transmission process may introduce errors into a message.» Single bit errors versus burst errors Detection:» Requires a convention that some messages are invalid» Hence requires extra bits» An (n,k) code has codewords of n bits with k data bits and r = (n-k) redundant check bits Correction» Forward error correction: many related code words map to the same data word» Detect errors and retry transmission 19 Basic Concept: Hamming Distance Hamming distance of two bit strings = number of bit positions in which they differ. If the valid words of a code have minimum Hamming distance D, then D-1 bit errors can be detected. If the valid words of a code have minimum Hamming distance D, then [(D-1)/2] bit errors can be corrected. 1 0 1 1 0 1 1 0 1 0 HD=2 HD=3 20

Examples A (4,3) parity code has D=2: 0001 0010 0100 0111 1000 1011 1101 1110 A (7,4) code with D=3: 0000000 0001101 0010111 0011010 0100011 0101110 0110100 0111001 1000110 1001011 1010001 1011100 1100101 1101000 1110010 1111111 1001111 corrects to 1001011 Note the inherent risk in correction; consider a 2-bit error resulting in 1001011 -> 1111011. There are formulas to calculate the number of extra bits that are needed for a certain D. 21 Cyclic Redundancy Codes (CRC) Commonly used codes that have good error detection properties.» Can catch many error combinations with a small number or redundant bits Based on division of polynomials.» Errors can be viewed as adding terms to the polynomial» Should be unlikely that the division will still work Can be implemented very efficiently in hardware. Examples:» CRC-32: Ethernet» CRC-8, CRC-10, CRC-32: ATM 22

Datalink Architectures Packet forwarding. Error and flow control. Media access control. Scalability. 23 Media Access Control How do we transfer packets between two hosts connected to the same network? Switches connected by point-to-point links -- store-and-forward.» Used in WAN, LAN, and for home connections» Conceptually similar to routing But at the datalink layer instead of the network layer» Today Multiple access networks -- contention based.» Multiple hosts are sharing the same transmission medium» Used in LANs and wireless» Need to control access to the medium» Mostly Thursday lecture 24

A Switch-based Network Switches are connected by point-point links. Packets are forwarded hop-by-hop by the switches towards the destination.» Forwarding is based on the address How does a switch work? How do nodes exchange packets over a link? How is the destination addressed? PCs at Work Switch Point-Point link PC at Home 25 Switching Introduction Idea: forward units of data based on address in header. Many datalink technologies use switching.» Virtual circuits: Framerelay, ATM, X.25,..» Packets: Ethernet, MPLS, Switching also happens at the network layer.» Layer 3: Internet protocol» In this case, address is an IP address» IP over SONET, IP over ATM,..» Otherwise, operation is very similar Switching is different from SONET mux/demux.» Statically preconfigured channels - no addresses 26

An Inter-network Wireless Ethernet Framerelay Ethernet ATM IP/SONET Ethernet 802.X 27 Internetworking Options 7 6 5 4 3 2 1 physical 1 repeater 7 6 5 4 3 2 1 7 6 5 4 3 2 1 data link 2 1 1 7 6 5 4 3 2 1 Switching/bridging (e.g. 802 MAC) 7 6 5 4 3 2 1 7 7 6 6 5 5 network... 4 4 3 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 router gateway 7 6 5 4 3 2 1 28

Switch Architecture Takes in packets in one interface and has to forward them to an output interface based on the address.» A big intersection» Same idea for bridges, switches, routers: address look up differs Control processor manages the switch and executes higher level protocols.» E.g. routing, management,.. The switch fabric directs the traffic to the right output port. The input and output ports deal with transmission and reception of packets. Input Port Output Port Output Port Input Port Control Processor Switch Fabric Output Port Input Port Output Port Input Port 29 Packet Forwarding: Address Lookup Switch Address Next Hop B31123812508 3 38913C3C2137 3 A21023C90590 0 128.2.15.3 1 Info 13 - - (2,34) Address from header.» Absolute address (e.g. Ethernet)» (IP address for routers)» (VC identifier, e.g. ATM)) Next hop: output port for packet. Info: priority, VC id,.. Table is filled in by routing protocol. 30

Link Flow Control and Error Control Naïve protocol. Dealing with receiver overflow: flow control. Dealing with packet loss and corruption: error control. Meta-comment: these issues are relevant at many layers.» Link layer: sender and receiver attached to the same wire» End-to-end: transmission control protocol (TCP) - sender and receiver are the end points of a connection How can we implement flow control?» You may send (windows, stop-and-wait, etc.)» Please shut up (source quench, 802.3x pause frames, etc.)» Where are each of these appropriate? 31 A Naïve Protocol Sender simply sends to the receiver whenever it has packets. Potential problem: sender can outrun the receiver.» Receiver too slow, buffer overflow,.. Not always a problem: receiver might be fast enough. Sender Receiver 32

Adding Flow Control Stop and wait flow control: sender waits to send the next packet until the previous packet has been acknowledged by the receiver.» Receiver can pace the receiver Drawbacks: adds overheads, slowdown for long links. Sender Receiver 33 Window Flow Control Stop and wait flow control results in poor throughput for long-delay paths: packet size/ roundtrip-time. Solution: receiver provides sender with a window that it can fill with packets.» The window is backed up by buffer space on receiver» Receiver acknowledges the a packet every time a packet is consumed and a buffer is freed Sender Receiver 34

Bandwidth-Delay Product Sender RTT Receiver Time Max Throughput = Window Size Roundtrip Time 35 Dealing with Errors Stop and Wait Case Packets can get lost, corrupted, or duplicated.» Error detection or correction turns corrupted packet in lost or correct packet Duplicate packet: use sequence numbers. Lost packet: time outs and acknowledgements.» Positive versus negative acknowledgements» Sender side versus receiver side timeouts Window based flow control: more aggressive use of sequence numbers (see transport lectures). Sender Receiver 36

What is Used in Practice? No flow or error control.» E.g. regular Ethernet, just uses CRC for error detection Flow control only.» E.g. Gigabit Ethernet Flow and error control.» E.g. X.25 (older connection-based service at 64 Kbs that guarantees reliable in order delivery of data) 37 Datalink Layer Architectures Packet forwarding. Error and flow control. Media access control. Scalability. 38

Multiple Access Protocols Prevent two or more nodes from transmitting at the same time over a broadcast channel.» If they do, we have a collision, and receivers will not be able to interpret the signal Several classes of multiple access protocols.» Partitioning the channel, e.g. frequency-division or time division multiplexing With fixed partitioning of bandwidth not flexible» Taking turns, e.g. token-based, reservation-based protocols, polling based» Contention based protocols, e.g. Aloha, Ethernet 39 Fiber Distributed Data Interface (FDDI) One token holder may send, with a time limit.» known upper bound on delay. Optical version of 802.5 token ring, but multiple packets may travel in train: token released at end of frame. 100 Mbps, 100km. Optional dual ring for fault tolerance. CDDI: FDDI over unshielded twisted pair, shorter range 40

Other Taking Turn Protocols Central entity polls stations, inviting them to transmit.» Simple design no conflicts» Not very efficient overhead of polling operation Stations reserve a slot for transmission.» For example, break up the transmission time in contention-based and reservation based slots Contention based slots can be used for short messages or to reserve time Communication in reservation based slots only allowed after a reservation is made» Issues: fairness, efficiency 41