CMPE 150: Introduction to Computer Networks

Similar documents
Chapter 5 Link Layer and LANs

Chapter 5: Link layer

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

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

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

CSC 4900 Computer Networks: The Link Layer

Data Link Layer: Multi Access Protocols

CSC 401 Data and Computer Communications Networks

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Lecture 8 Link Layer: functionality, error detection, media access algorithm

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

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

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

CC451 Computer Networks

1-1. Switching Networks (Fall 2010) EE 586 Communication and. November 8, Lecture 30

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Chapter 6 The Link Layer and LANs

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

Chapter 4 Network Layer

SC250 Computer Networking I. Link Layer. Prof. Matthias Grossglauser LCA/I&C.

Links. CS125 - mylinks 1 1/22/14

Chapter V: Link Layer

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

Master Course Computer Networks IN2097

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

Link Layer and LANs. CMPS 4750/6750: Computer Networks

Chapter 6: Link layer and LANs. Link layer, LANs: outline. Link layer: introduction. Link layer: context. Link layer services (more)

Broadcast Links, Addressing and Media Access Control. Link Layer B. Link and Physical Layers. MAC Addresses

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

Multiple Access Links and Protocols

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

transferring datagram from one node data-link layer has responsibility of to adjacent node over a link 5-1 TDTS06 Computer networks

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

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

MULTIPLE ACCESS PROTOCOLS 2. 1

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

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

Master Course Computer Networks IN2097

Chapter V: Link Layer

CSCD 330 Network Programming

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

Chapter 5 Link Layer and LANs

Data Link Layer: Overview, operations

CS 3516: Computer Networks

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Module 10 Data Link Layer CS655! 10-1!

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

Medium Access Control

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

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

Chapter 5 Link Layer and LANs

CSCD 330 Network Programming Fall 2012

Link Layer and LANs. Our Goals. Link Layer

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

Chapter 5: DataLink Layer

Lecture 6 - Link layer. Lecture 5 Review. Link Layer. Introduction, Services. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

Goals of Today s Lecture. Adaptors Communicating

Module 4 Data Link Layer CS655! 4-1!

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Internet protocol stack

CSCI Computer Networks Spring 2017

CSCI Computer Networks Fall 2016

Chapter 6 The Link Layer and LANs

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

Redes de Computadores. Medium Access Control

DATA COMMUNICATOIN NETWORKING

CSC 8560 Computer Networks: Link Layer

Chapter 4 roadmap. CS555, Spring /14/2005. WMU-CS, Dr. Gupta 1. Multicast Routing: Problem Statement. Approaches for building mcast trees

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

Chapter 5: The Data Link Layer

Chapter 5 Link Layer. Link Layer 5-1

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Link Layer and Ethernet

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Link Layer and Ethernet

Links Reading: Chapter 2

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

Chapter 5: Link layer

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 5 Link Layer and LANs

COMP 3331/9331: Computer Networks and Applications. Data Link layer. Link layer, LANs: outline. Data Link Layer

Chapter 4: Network Layer, partb

Review. Some slides are in courtesy of J. Kurose and K. Ross

CSC 4900 Computer Networks: Routing Algorithms

Chapter 6 The Data Link layer

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

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

Review is pretty much complete! Please help formatting review (indenting). - Jorden

Principles behind data link layer services

Chapter 6 The Link Layer and LANs

COMP211 Chapter 6/7 Link Layer

CMPE 257: Wireless and Mobile Networking

Topic 2a. Ch 6: The Link Layer and LANs. Computer Networking: A Top Down Approach

Transcription:

CMPE 150: Introduction to Computer Networks Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 18

Project Deliverables: Project demo. Code (documented). Demo schedule: Judith: Monday 03.18 12-2pm Tuesday 03.19 10-12pm Marc: Thursday 03.21 7-9pm and Friday 03.22 9am-11am

Final Exam Friday, March 22 nd, 12pm. Review sessions: Judith: Saturday, 03.16 4pm. Marc: Thursday, 03.21 5pm-7pm. Friday, 03.22, 9am-11am (in the lab). Location TBA.

Homeworks Homework 4 has been posted. Due 03.20.2013. For the grading, we will drop the lowest grades among all homeworks.

Course Evaluation Instructor evaluation on line. TA evaluation on paper.

Last Class Network layer (cont d). IPv6. Routing.

Today Routing (distance vector). Data link layer (Chapter 5).

Distance Vector Routing

Distance Vector Algorithm Bellman-Ford Equation Define d x (y) := cost of least-cost path from x to y Then d x (y) = min {c(x,v) + d v (y) } v where min is taken over all neighbors v of x

Bellman-Ford example u 1 2 5 v x 2 3 1 3 w y 1 5 2 z d v (z) = 5, d x (z) = 3, d w (z) = 3 B-F equation says: d u (z) = min { c(u,v) + d v (z), c(u,x) + d x (z), c(u,w) + d w (z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 Node that achieves minimum is next hop in shortest path forwarding table

Distance Vector Algorithm At node x, D x (y) = estimate of least cost from x to y. x maintains distance vector D x = [D x (y): y є N ] Node x: knows cost to each neighbor v: c(x,v) maintains its neighbors distance vectors. For each neighbor v, x maintains D v = [D v (y): y є N ]

Distance vector algorithm Basic idea: from time-to-time, each node sends its own distance vector estimate to neighbors when x receives new DV estimate from neighbor (v), it updates its own DV using B-F equation: D x (y) min v {c(x,v) + D v (y)} for each node y N

Distance Vector Algorithm Iterative, asynchronous: each local iteration caused by: local link cost change, or DV update message from neighbor. Distributed: each node notifies neighbors when its DV changes. Each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors

node x table D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 cost to x y z cost to x y z D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 from x 0 2 7 y z node y table cost to from x y x y z 2 0 1 z node z table cost to x y z from x y z 0 2 3 2 0 1 7 1 0 x 2 y 7 1 z from x y z 7 1 0 Distance vector z sends to neighbors time

node x table from x cost to x y z 0 2 7 y z node y table cost to from from x y x y z 2 0 1 z node z table cost to x y z D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 x y z 7 1 0 from from from x y z x y z x y z cost to x y z 0 2 3 2 0 1 7 1 0 cost to x y z 0 2 7 2 0 1 7 1 0 cost to x y z 0 2 7 2 0 1 3 1 0 from from from x y z x y x y z z cost to x y z 0 2 3 2 0 1 3 1 0 cost to x y z 0 2 3 2 0 1 3 1 0 cost to x y z 0 2 3 2 0 1 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 x 3 1 0 time 2 y 7 1 z

Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies Speed of Convergence LS: O(n 2 ) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: DV: node can advertise incorrect link cost each node computes only its own table DV node can advertise incorrect path cost each node s table used by others error propagate thru network

Hierarchical Routing

Hierarchical Routing Internet routing is hierarchical! Why??? scale: with 200 million destinations: can t store all dest s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network

Hierarchical Routing aggregate routers into regions, autonomous systems (AS) routers in same AS run same routing protocol intra-as or intradomain routing protocol routers in different AS can run different intra- AS routing protocol gateway router at edge of its own AS has link to router in another AS Border gateways.

Interconnected ASes 3c 3a 3b AS3 1a 1c 1d 1b Intra-AS Routing algorithm AS1 Forwarding table Inter-AS Routing algorithm 2a 2c AS2 2b forwarding table configured by both intra- and inter-as routing algorithm intra-as sets entries for internal dests inter-as & intra-as sets entries for external dests

Inter-AS tasks suppose router in AS1 receives datagram destined outside of AS1: router should forward packet to gateway router, but which one? other networks 3b 3c AS3 3a 1a AS1 1c 1d 1b AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 job of inter-as routing! 2a 2c AS2 2b other networks

Example: Setting forwarding table in router 1d suppose AS1 learns (via inter-as protocol) that subnet x reachable via AS3 (gateway 1c) but not via AS2. inter-as protocol propagates reachability info to all internal routers router 1d determines from intra-as routing info that its interface I is on the least cost path to 1c. installs forwarding table entry (x,i) other networks 3c 3a 3b AS3 1a AS1 1c 1d x 1b 2a 2c AS2 2b other networks

Example: Choosing among multiple ASes now suppose AS1 learns from inter-as protocol that subnet x is reachable from AS3 and from AS2. to configure forwarding table, router 1d must determine which gateway it should forward packets towards for dest x this is also job of inter-as routing protocol! other networks 3c 3a 3b AS3 1a AS1 1c 1d? x 1b 2a 2c AS2 2b other networks

Data Link Layer Chapter 5

Our Goal Understand basic principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access Instantiation and implementation of link layer technologies

Link Layer: Introduction Terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 PDU is a frame, encapsulates packet/datagram data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link

Link layer: context datagram transferred by different link protocols over different links: e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link each link protocol provides different services e.g., may or may not provide rdt over link transportation analogy trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transport segment = communication link transportation mode = link layer protocol travel agent = routing algorithm

Link Layer Services framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium MAC addresses used in frame headers to identify source, destination different from IP address! reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! seldom used on low bit-error link (fiber, some twisted pair) wireless links: high error rates Q: why both link-level and end-end reliability?

Link Layer Services (more) flow control: pacing between adjacent sending and receiving nodes error detection: errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame error correction: receiver identifies and corrects bit error(s) without resorting to retransmission half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit, but not at same time

Where is the link layer implemented? in each and every host link layer implemented in adaptor (aka network interface card NIC) Ethernet card, PCMCI card, 802.11 card implements link, physical layer attaches into host s system buses combination of hardware, software, firmware application transport network link link physical cpu controller physical transmission host schematic memory host bus (e.g., PCI) network adapter card

Adaptors Communicating datagram datagram controller controller sending host frame datagram receiving host sending side: encapsulates datagram in frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to upper layer at receiving side

Error Detection and Correction

Error Detection D EDC= Error Detection and Correction bits (redundancy) = Data protected by error checking, may include header fields Error detection not 100% reliable! Larger EDC field yields better detection and correction otherwise

Parity Checking Odd versus even parity Two Dimensional Bit Parity: Detect and correct single bit errors Single Bit Parity: Detect single bit errors 0 0

Multiple Access Protocols

Multiple Access Links Two types of links : point-to-point PPP for dial-up access point-to-point link between Ethernet switch and host broadcast (shared wire or medium) old-fashioned Ethernet upstream HFC 802.11 wireless LAN shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical)

Multiple Access Protocols single shared broadcast channel two or more simultaneous transmissions by nodes: interference collision if node receives two or more signals at the same time multiple access protocol Determines how nodes share channel, i.e., determine when node can transmit communication about channel sharing must use channel itself! no out-of-band channel for coordination

Multiple Access Control (MAC) Protocols Application Transport Network DLL MAC Physical Layer

MAC Protocols: a taxonomy Three broad classes: Channel Partitioning divide channel into smaller pieces (time slots, frequency, code) allocate piece to node for exclusive use Random Access channel not divided, allow collisions recover from collisions Taking turns nodes take turns, but nodes with more to send can take longer turns

Channel Partitioning MAC protocols: TDMA TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle 6-slot frame 1 3 4 1 3 4

Channel Partitioning MAC protocols: FDMA FDMA: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle time FDM cable frequency bands

Random Access Protocols When node has packet to send transmit at full channel data rate R. no a priori coordination among nodes two or more transmitting nodes collision, random access MAC protocol specifies: how to detect collisions how to recover from collisions (e.g., via delayed retransmissions) Examples of random access MAC protocols: ALOHA Slotted ALOHA CSMA, CSMA/CD, CSMA/CA

ALOHA Simple, no synchronization When frame first arrives transmit immediately Collision probability increases: frame sent at t 0 collides with other frames sent in [t 0-1,t 0 +1]

Pure Aloha efficiency P(success by given node) = P(node transmits). P(no other node transmits in [p 0-1,p 0 ]. P(no other node transmits in [p 0-1,p 0 ] = p. (1-p) N-1. (1-p) N-1 = p. (1-p) 2(N-1) choosing optimum p and then letting n -> infty... = 1/(2e) =.18!!!

Slotted ALOHA Assumptions: all frames same size time divided into equal size slots (time to transmit 1 frame) nodes start to transmit only at beginning of slot nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision Operation: when node obtains fresh frame, transmits in next slot if no collision: node can send new frame in next slot if collision: node retransmits frame in each subsequent slot with prob. p until success

Slotted ALOHA Pros single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple Cons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization

Slotted Aloha efficiency Efficiency : fraction of successful slots (many nodes, all with many frames to send) suppose: N nodes with many frames to send, each transmits in slot with probability p prob that given node has success in a slot = p(1- p) N-1 prob that any node has a success = Np(1-p) N-1 max efficiency: find p* that maximizes Np(1-p) N-1 for many nodes, take limit of Np*(1-p*) N-1 as N goes to infinity, gives: Max efficiency = 1/e =.37 At best: channel used for useful transmissions 37% of time!!

CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission human analogy: don t interrupt others!

CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other s transmission collision: entire packet transmission time wasted note: role of distance & propagation delay in determining collision probability

CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA collisions detected within short time colliding transmissions aborted, reducing channel wastage collision detection: easy in wired LANs: measure signal strengths, compare transmitted, received signals difficult in wireless LANs: received signal strength overwhelmed by local transmission strength human analogy: the polite conversationalist

CSMA/CD

Taking Turns MAC protocols channel partitioning MAC protocols: share channel efficiently and fairly at high load inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! random access MAC protocols efficient at low load: single node can fully utilize channel high load: collision overhead taking turns protocols look for best of both worlds!

Taking Turns MAC protocols Polling: master node invites slave nodes to transmit in turn typically used with dumb slave devices concerns: polling overhead latency single point of failure (master) slaves data data poll master

Taking Turns MAC protocols Token passing: control token passed from one node to next sequentially. token message concerns: token overhead latency single point of failure (token) (nothing to send) T T data

Summary of MAC protocols channel partitioning, by time, frequency or code Time Division, Frequency Division random access (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD carrier sensing: easy in some technologies (wire), hard in others (wireless) CSMA/CD used in Ethernet CSMA/CA used in 802.11 taking turns polling from central site, token passing Bluetooth, FDDI, IBM Token Ring