Topics Today. Lecture 8: Physical and Link Layers. Protocol Layering. Physical layer: chips versus bits. Physical Layer (Layer 1) Protocol Layering

Similar documents
CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

Outline. Lecture 16: Wireless Networking. Physical Layer (Layer 1) Ethernet: Wireless is Different. Attenuation Over Space

CS 640 Lecture 4: 09/11/2014

Housekeeping. Fall /5 CptS/EE 555 1

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

Lecture 16: Wireless Networking

CSCI 466 Midterm Networks Fall 2011

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Data and Computer Communications

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Links. CS125 - mylinks 1 1/22/14

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Physical and Link Layers. CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham

Networking Technologies and Applications

CSE 461: Multiple Access Networks. This Lecture

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Reminder: Datalink Functions Computer Networking. Datalink Architectures

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Lecture 3: Modulation & Layering"

Link Layer Review. CS244A Winter 2008 March 7, 2008 Ben Nham

EE 122: Ethernet and

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Link Layer and Ethernet

Link Layer and Ethernet

Ethernet Basics. based on Chapter 4 of CompTIA Network+ Exam Guide, 4 th ed., Mike Meyers

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Direct Link Communication II: Wired Media. Multi-Access Communication

Lecture 05 Chapter 16 High Speed LANs

ECE 4450:427/527 - Computer Networks Spring 2017

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

Computer and Network Security

Contention Protocols and Networks

IEEE 802 LANs SECTION C

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Principles behind data link layer services

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

CS 3640: Introduction to Networks and Their Applications

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

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

Summary of MAC protocols

The Link Layer II: Ethernet

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

CSE 461 Multiple Access. David Wetherall

Medium Access Control

Extending or Interconnecting LANS. Physical LAN segment. Virtual LAN. Forwarding Algorithm 11/9/15. segments. VLAN2, Port3. VLAN1, Port1.

COS 140: Foundations of Computer Science

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

Medium Access Protocols

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

LAN Protocols. Required reading: Forouzan 13.1 to 13.5 Garcia 6.7, 6.8. CSE 3213, Fall 2015 Instructor: N. Vlajic

Physical Layer. Medium Access Links and Protocols. Point-to-Point protocols. Modems: Signaling. Modems Signaling. Srinidhi Varadarajan

Ethernet. Computer Networks. Lecture 4.

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

COS 140: Foundations of Computer Science

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Outline: Connecting Many Computers

Links, clocks, optics and radios

ECE 158A: Lecture 13. Fall 2015

Redes de Computadores. Medium Access Control

CSC 4900 Computer Networks: The Link Layer

Chapter 4. The Medium Access Control Sublayer

Link Layer and LANs. Our Goals. Link Layer

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

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

Multiple Access in Cellular and Systems

Direct Link Communication II: Wired Media. Multi-Access Communication

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

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

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

Chapter 5: Link layer

CMPE 257: Wireless and Mobile Networking

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

EE-379 Embedded Systems and Applications Introduction to Ethernet

Link Layer. (continued)

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Medium Access Control Sublayer Chapter 4

Multiple Access Links and Protocols

ECE 4450:427/527 - Computer Networks Spring 2017

EECS 122: Introduction to Communication Networks Final Exam Solutions

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

CSCI 466 Midterm Networks Fall 2011

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

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

Chapter 5 Link Layer and LANs

CSCI-1680 Wireless Rodrigo Fonseca

Goals of Today s Lecture. Adaptors Communicating

LAN Systems. Bus topology LANs

Internet Structure. network edge:

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

CSC 4900 Computer Networks: Link Layer (2)

Transcription:

Topics Today Physical layer: chips versus bits Lecture 8: Physical and Link Layers Link layer and media access control (MAC) Ethernet Hubs and Switches MPLS Protocol Layering Physical layer: chips versus bits 7 6 5 4 3 2 1 Application Presentation Session Transport Network Link Physical Protocol Layering Physical Layer (Layer 1) 7 6 5 4 3 2 1 Application Presentation Session Transport Network Link Physical Responsible for specifying the physical medium - Category 5 cable (Cat5): 8 wires, twisted pair, RJ45 jack - WiFi wireless: 2.4GHz Responsible for specifying the signal - 100BASE-T: 5-level pulse amplitude modulation (PAM-5) - 802.11b: Binary and quadrature phase shift keying (BPSK/QPSK) Responsible for specifying the bits - 100BASE-T: 4-to-6 bit-to-chip encoding, 3 chip symbols - 802.11b: Barker code (1-2Mbps), complementary code keying (5.5-11Mbps)

Chips versus bits Specifying the signal - Chips: data (in bits) at the physical layer - Bits: data above the physical layer Physical layer specifies Analog signal chip mapping - On-off keying (OOK): voltage of 0 is 0, +V is 1 - PAM-5: 000 is 0, 001 is +1, 010 is -1, 011 is -2, 100 is +2 - Frequency shift keying (FSK) - Phase shift keying (PSK) - Don t worry about this too much now: we ll cover it in greater depth when we look at wireless How fast can you transmit information? Depends on bandwidth and Signal/Noise ration Shannon: Channel capacityc = Blog 2 (1+S/N) - B is bandwidth of line - S andn are average signal & noise power For any transmission rater < C, can have arbitrarily low error rate Example: Telephone line - 3 KHz b/w, 30 db S/N = 10 30/10 = 1000 - C 30 Kbps (so 56 Kbps modems need better S/N ratio) Crude intuition for Shannon - Sample rate B - V voltage levels encodelog 2 V bits, so bits/sample log 2 (1+S/N) Straw man: On-off keying Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 NRZ To transmit 0 bit, sent0v, to transmit 1, sent+5v - A bit is a chip in this scheme OOK a form of Amplitude Shift Keying (ASK) - Bits are encoded in amplitude of the signal - Can also have frequency shift keying (FSK) - And phase shift keying (PSK) Also an example of non-return to zero (NRZ) - E.g., four 1 bits transmitted by asserting+5v for 4 clock ticks NRZ drawbacks Consecutive 1s or 0s are problematic Non signal could be interpreted as 0s (or vice versa) Baseline wander problem - Where is threshold between low and high? - Could compare signal to average value, but avg. will drift Sender and receiver need synchronized clocks - Otherwise, can experience bit slip Non-return to Zero Inverted (NRZI) Encode 1 with transition from current signal Encode 0 by staying at same level At least solves problem of consecutive 1s Encoding Goals DC balancing (same number of 0 and 1 chips) Clock synchronization Can recover from some chip errors Can constrain analog signal patterns to make signal more robust Want near-chanel capacity with negligible errors - But Shannon only says it s possible, doesn t tell us how - Codes could also get computationally expensive In practice: - Higher encoding fewer bps, more robust - Lower encoding more bps, less robust

Manchester Encoding Map bit 0 chips 01, bit 1 chips 10 - Transmission rate now 1 bit per two clock cycles - Like XORing an NRZ encoding with the clock Bit stream Binary encoding Manchester encoding 1 0 0 0 1 0 0 1 1 1 1 Solves clock synchronization & baseline wander But cuts transmission rate in half Time 4B/5B Every 4 bits of data encoded in 5 chips 5-bit codes selected to have no more than one leading 0 and no more than two trailing 0s - thus, never get more than three consecutive 0s 16 codes used for all 4-bit sequences Resulting 5bit codes are transmitted using NRZI Remaining codes used for other purposes - E.g., 11111 line idle, 00000 line dead,... Achieves 80% bit/chip efficiency 802.15.4 Standard for low-rate wireless personal networks - Must tolerate high chip error rates Uses a 32-to-4 chip-to-bit encoding Bits Chips Physical Layer Frames Usually minimalist: here s N bytes - Start symbol/preamble - Length field - Payload (link layer frame) Symbols 0000 0001 0010 0011 1111 11011001110000110101001000101110 11101101100111000011010100100010 00101110110110011100001101010010 00100010111011011001110000110101 11001001011000000111011110111000 Pre L Data Link Layer Responsibilities Link layer and media access control (MAC) Single-hop addressing (e.g., Ethernet addresses) Media access control - Link-layer congestion control - Collision detection/collision avoidance Single-hop acknowledgements

Ethernet: 802.3 Dominant wired LAN technology - 10BASE5 (vampire taps) - 10BASE-T, 100BASE-TX, 1000BASE-T Frame format: Preamble Physical Link Layer 3 Link SFD Src Dest Type/ Len Payload 7 x 10101010 10101011 6 bytes 6 bytes 2 bytes 46-1500 bytes CRC 4 bytes Gap 96 ns, 960 ns, 9600 ns Ethernet Addressing Each Ethernet card has a unique 48-bit ID - Example: www.scs.stanford.edu has 00:07:e9:0f:1f:3e - Example: myth15 has 00:1e:c9:2f:a2:9c 24-bit organizationally unique identifier, 24-bit ID - 0x000000 0x000009: Xerox - 0x0007e9: Intel (www.scs) - 0x001ec9: Dell (myth15) - http://standards.ieee.org/regauth/oui/oui.txt Media Access Control (MAC) Control access to shared physical medium - E.g., who can use coax/radio when? - If everyone talks at once, no-one hears anything - This job falls to the link layer Prevent collisions by controlling when nodes send Variety of approaches - Time Division Multiple Access (TDMA) - Carrier Sense Multiple Access, Collision Detection (CSMA/CD) - Carrier Sense Multiple Access, Collision Avoidance (CSMA/CA) - Request-to-send, clear-to-send (RTS/CTS) Channel Partitioning MAC Approaches - Divide channel into smaller pieces, allocate pieces to nodes Random Access - Don t divide channel, allow conflicts - Recover from errors caused by conflicts Taking turns - Nodes take turns, but nodes with more to send can take longer turns Conflicting goals: maximize use of capacity - One node should get 100% in absence of competition - Multiple nodes can each get a share, not collide Conceptual Model of Wired Media Access Network A TDMA Divide time into slots - Each device is allowed to transmit in some number of slots No collisions Link is fully utilized when everyone transmits: 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Single node cannot use all of the capacity ( 1 n ): Network B 1 1 1 1 Can t get full link utilization unless everyone transmits: 1 4 1 4 1 2 4 1 2

CSMA Node senses the channel for activity Transmits if it thinks the channel is idle CSMA/CD: can detect if there is a collision, and back off - Randomized backoff time, grows exponentially - AfterC consecutive collisions, waitrand(0,2 C ) 512 - Drop whenc grows large (in practice) Layer 2 Acknowledgements Common in wireless (more on this in wireless lecture) If layer 2 successfully receives a frame, it immediately sends an ACK Assumes t prop << t trans Hypothetical situation: - Let s say a router won t send an ACK if it drops the packet - Let s say a router will keep on retrying a packet until it is ACKed - Do we still need end-to-end ACKs? 2-minute stretch Ethernet Collision Detect (10base2 Ethernet) Detect collision when average voltage spikes - 10base2 uses Manchester encoding - Has constant average voltage unless multiple transmitters When a node detects a collision - Broadcasts jam signal to ensure other nodes drop packet Collision detection constrains protocol - Imposes min. packet size (64 bytes) - Imposes maximum network diameter (2800 m) - Ensure transmission time twice propagation time why? Violating Timing Constraints Time No Collision Detect! Collision Detect Without min packet size, might miss collision

Ethernet Efficiency One node can use full link capacity Assuming RX/TX turnaround time of zero 1 - Asn,use = 1+5tprop/ttrans - Ift prop 0, efficiency approaches 1 - Ift trans, efficiency approaches 1 - ift prop = t trans, efficiency approaches 16%. Ethernet Capture Effect Exponential backoff leads to self-adaptive use of channel When a node succeeds, it transmits the next packet immediately Result: bursts of packets from single nodes Hubs and Switches Ethernet Speeds Network diameter limits: - 10Mbps: 2800m - 100Mbps: 205m - Gigabit: 205m! Gigabit Ethernet - Uses more of the CAT5 wires (125 MHz 8signals) - Pad with dummy data (signal extension) for CD (so min packet size is now 512 bytes, not bits) -1 Hubs vs. Switches Bridges and extended LANs A B C Hub: connects multiple Ethernet segments to act like a single segment (shared collision domain, physical layer connectivity) Bridge Port 1 Port 2 Switch: store and forward between segments (single collision domains, link layer connectivity) Very little Ethernet today is shared - Means collision detection never triggered (duplex, separate RX and TX wires) - 10Gbps Ethernet standard does not allow shared medium X Y Z LANs have physical limitations (e.g., 208 m) Connect two or more LANs with a bridge - Operates on Ethernet addresses - No encapsulation required Ethernet switch like a multi-way bridge

Learning bridges A B C Port 1 Bridge Port 2 X Y Z Idea: Don t forward packet if not useful - If you know recipient is not on that port Learn host s location based on source address - Switch builds a table when it receives packets MPLS A B C X Y Z 1 1 1 2 2 2 Table says when not to forward packet - Does not need to be complete for correct behavior - Spanning tree algorithm avoids loops MPLS MLPS packet format Multiprotocol Label Switching Sits between layer 2 and 3 ( layer 2.5 ) Prepend a label to frame Switch in terms of label, rather than destination address - Two packets to the same destination can take different paths - Separating addressing from forwarding enables traffic engineering - Label changes from input to output 20-bit label 3 experimental bits 1 bottom of stack bit - Allows multiple MPLS headers to be stacked in a packet 5-bit TTL (since network-level TTL not used) Example MPLS (from textbook) MLPS Architecture Label Edge Routers (LERs) - Talks to regular IP routers and MPLS-enabled ones Label Switch Routers (LSRs) - E.g., The core routers in a large backbone provider Label Distribution Protocol (LDP) Label Forwarding Information Base (LFIB)