5: DataLink Layer5a-1 Chapter 5 outline r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 LAN addresses.

Slides:



Advertisements
Similar presentations
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r Homework 3 out r Project 3 out, link state only. Some slides are.
Advertisements

5: DataLink Layer5-1 Mac Addressing, Ethernet, and Interconnections.
Comp 361, Spring 20056:Basic Wireless 1 Chapter 6: Basic Wireless (last updated 02/05/05) r A quick intro to CDMA r Basic
5: Link Layer and Local Area Networks5c-1 Hubs, Bridges, and Switches r Used for extending LANs in terms of geographical coverage, number of nodes, administration.
5/31/05CS118/Spring051 twisted pair hub 10BaseT, 100BaseT, hub r T= Twisted pair (copper wire) r Nodes connected to a hub, 100m max distance r Hub: physical.
15 – Data link layer Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
11/11/ /13/2003 DLL, Error Detection, MAC, ARP November 11-13, 2003.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
VLANs Port-based VLAN: switch ports grouped (by switch management software) so that single physical switch …… Switch(es) supporting VLAN capabilities can.
20 – Collision Avoidance, : Wireless and Mobile Networks6-1.
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
Lecture 3#1#1 Hubs, Bridges and Switches Lecture 3.
5: DataLink Layer – Ethernet, Hubs and Switches.
Review r Multicast Routing m Three options m source-based tree: one tree per source shortest path trees reverse path forwarding m group-shared tree: group.
1 Interconnection ECS 152A. 2 Interconnecting with hubs r Backbone hub interconnects LAN segments r Extends max distance between nodes r But individual.
1 Introduction to Wireless Networks Michalis Faloutsos.
6: Wireless and Mobile Networks6-1 Chapter 6: Wireless and Mobile Networks Background: r # wireless (mobile) phone subscribers now exceeds # wired phone.
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
16 – CSMA/CD - ARP Network Layer4-1. 5: DataLink Layer5-2 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Chapter 5: The Data Link.
11/18/ /20/2003 Ethernet, Hubs/Bridges/Switches, Wireless November 19-20, 2003.
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r LAN addresses and ARP r Ethernet Some slides are in courtesy of J.
5-1 Data Link Layer r What is Data Link Layer? r Wireless Networks m Wi-Fi (Wireless LAN) r Comparison with Ethernet.
LAN Technologies. LAN technologies Data link layer so far: –services, error detection/correction, multiple access Next: LAN technologies –addressing –Ethernet.
DataLink Layer1 Ethernet Technologies: 10Base2 10: 10Mbps; 2: 200 meters (actual is 185m) max distance between any two nodes without repeaters thin coaxial.
HDLC and PPP. The Data Link Layer in the Internet A home personal computer acting as an internet host. Technology like Ethernet cannot provide “high-level”
6: Wireless and Mobile Networks6-1 Elements of a wireless network network infrastructure wireless hosts r laptop, PDA, IP phone r run applications r may.
3-1 Last time □ Finished introduction and overview: ♦ Network access and physical media ♦ Internet structure and ISPs ♦ Delay & loss in packet-switched.
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 1: Overview of the Data Link layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
Chapter 5 outline 5.1 Introduction and services
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
CS640: Introduction to Computer Networks Aditya Akella Lecture 22 - Wireless Networking.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
5: DataLink Layer5-1 Ethernet “dominant” wired LAN technology: r cheap $20 for 100Mbs! r first widely used LAN technology r Simpler, cheaper than token.
Computer Networking Bridges/Switches, , PPP.
Chapter 5: The Data Link Layer
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
4: DataLink Layer1 Chapter 4: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer introduction,
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
1 Week 5 Lecture 3 Data Link Layer. 2 Data Link Layer location application: supporting network applications –FTP, SMTP, STTP transport: host-host data.
5: DataLink Layer5-1 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame r If channel sensed.
5: DataLink Layer5c-1 Today r Assign Homework m Ch5 #1,4,5,7,11,12 Due Wednesday October 22 m Ch5 #13-16,18,20 Due Monday, October 27 r Project #2 due.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
Ch 5. Link layer and Local Area Networks Myungchul Kim
5: DataLink Layer5-1 Hubs Hubs are essentially physical-layer repeaters: m bits coming from one link go out all other links m at the same rate m no frame.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
CPSC 441: Link Layer1 Link Layer Addressing Slides originally from Carey Williamson Notes derived from “ Computer Networking: A Top Down Approach”, by.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
LAN Technologies.
Link Layer 5.1 Introduction and services
Chapter 5 Link Layer and LANs
Computer Communication Networks
Hubs Hubs are essentially physical-layer repeaters:
Point to Point Data Link Control
Mac Addressing, Ethernet, and Interconnections
Hubs Hubs are essentially physical-layer repeaters:
Computer Communication & Networks
IEEE Wireless LAN wireless LANs: untethered (often mobile) networking
EEC-484/584 Computer Networks
Link Layer and LANs Its not about how hard you hit... It's about how hard you can get hit and keep moving forward 5: DataLink Layer.
EEC-484/584 Computer Networks
ECSE-4730: Computer Communication Networks (CCN)
Presentation transcript:

5: DataLink Layer5a-1 Chapter 5 outline r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 LAN addresses and ARP r 5.5 Ethernet r 5.6 Hubs, bridges, and switches r 5.7 Wireless links and LANs r 5.8 PPP r 5.9 ATM r 5.10 Frame Relay

5: DataLink Layer5a-2 IEEE Wireless LAN r b m GHz unlicensed radio spectrum m up to 11 Mbps m direct sequence spread spectrum (DSSS) in physical layer all hosts use same chipping code m widely deployed, using base stations r a m 5-6 GHz range m up to 54 Mbps r g m GHz range m up to 54 Mbps r All use CSMA/CA for multiple access r All have base-station and ad-hoc network versions

5: DataLink Layer5a-3 Base station approch r Wireless host communicates with a base station m base station = access point (AP) r Basic Service Set (BSS) (a.k.a. “cell”) contains: m wireless hosts m access point (AP): base station r BSS’s combined to form distribution system (DS)

5: DataLink Layer5a-4 Ad Hoc Network approach r No AP (i.e., base station) r wireless hosts communicate with each other m to get packet from wireless host A to B may need to route through wireless hosts X,Y,Z r Applications: m “laptop” meeting in conference room, car m interconnection of “personal” devices m battlefield r IETF MANET (Mobile Ad hoc Networks) working group

5: DataLink Layer5a-5 IEEE : multiple access r Collision if 2 or more nodes transmit at same time r CSMA makes sense: m get all the bandwidth if you’re the only one transmitting m shouldn’t cause a collision if you sense another transmission r Collision detection doesn’t work: hidden terminal problem

5: DataLink Layer5a-6 IEEE MAC Protocol: CSMA/CA CSMA: sender - if sense channel idle for DISF sec. then transmit entire frame (no collision detection) -if sense channel busy then binary backoff CSMA receiver - if received OK return ACK after SIFS (ACK is needed due to hidden terminal problem)

5: DataLink Layer5a-7 Collision avoidance mechanisms r Problem: m two nodes, hidden from each other, transmit complete frames to base station m wasted bandwidth for long duration ! r Solution: m small reservation packets m nodes track reservation interval with internal “network allocation vector” (NAV)

5: DataLink Layer5a-8 Collision Avoidance: RTS-CTS exchange r sender transmits short RTS (request to send) packet: indicates duration of transmission r receiver replies with short CTS (clear to send) packet m notifying (possibly hidden) nodes r hidden nodes will not transmit for specified duration: NAV

5: DataLink Layer5a-9 Collision Avoidance: RTS-CTS exchange r RTS and CTS short: m collisions less likely, of shorter duration m end result similar to collision detection r IEEE allows: m CSMA m CSMA/CA: reservations m polling from AP

5: DataLink Layer5a-10 Chapter 5 outline r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 LAN addresses and ARP r 5.5 Ethernet r 5.6 Hubs, bridges, and switches r 5.7 Wireless links and LANs r 5.8 PPP r 5.9 ATM r 5.10 Frame Relay

5: DataLink Layer5a-11 Point to Point Data Link Control r one sender, one receiver, one link: easier than broadcast link: m no Media Access Control m no need for explicit MAC addressing m e.g., dialup link, ISDN line r popular point-to-point DLC protocols: m PPP (point-to-point protocol) m HDLC: High level data link control (Data link used to be considered “high layer” in protocol stack!

5: DataLink Layer5a-12 PPP Design Requirements [RFC 1557] r packet framing: encapsulation of network-layer datagram in data link frame m carry network layer data of any network layer protocol (not just IP) at same time m ability to demultiplex upwards r bit transparency: must carry any bit pattern in the data field r error detection (no correction) r connection liveness: detect, signal link failure to network layer r network layer address negotiation: endpoint can learn/configure each other’s network address

5: DataLink Layer5a-13 PPP non-requirements r no error correction/recovery r no flow control r out of order delivery OK r no need to support multipoint links (e.g., polling) Error recovery, flow control, data re-ordering all relegated to higher layers!

5: DataLink Layer5a-14 PPP Data Frame r Flag: delimiter (framing) r Address: does nothing (only one option) r Control: does nothing; in the future possible multiple control fields r Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc)

5: DataLink Layer5a-15 PPP Data Frame r info: upper layer data being carried r check: cyclic redundancy check for error detection

5: DataLink Layer5a-16 Byte Stuffing r “data transparency” requirement: data field must be allowed to include flag pattern m Q: is received data or flag? r Sender: adds (“stuffs”) extra byte after each data byte r Receiver: m two bytes in a row: discard first byte, continue data reception m single : flag byte

5: DataLink Layer5a-17 Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed byte in transmitted data

5: DataLink Layer5a-18 PPP Data Control Protocol Before exchanging network- layer data, data link peers must r configure PPP link (max. frame length, authentication) r learn/configure network layer information m for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address

5: DataLink Layer5a-19 Final Exam Review Topics r Chapters 4 and 5 (plus some global knowledge of Chapter 3)

5: DataLink Layer5a-20 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.6 What’s Inside a Router

5: DataLink Layer5a-21 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles m Link state routing m Distance vector routing 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.6 What’s Inside a Router

5: DataLink Layer5a-22 Routing Graph abstraction for routing algorithms: r graph nodes are routers r graph edges are physical links m link cost: delay, $ cost, or congestion level Goal: determine “good” path (sequence of routers) thru network from source to dest. Routing protocol A E D CB F r “good” path: m typically means minimum cost path m other def’s possible

5: DataLink Layer5a-23 A Link-State Routing Algorithm Dijkstra’s algorithm r net topology, link costs known to all nodes m accomplished via “link state broadcast” m all nodes have same info r computes least cost paths from one node (‘source”) to all other nodes m gives routing table for that node r iterative: after k iterations, know least cost path to k dest.’s Notation:  c(i,j): link cost from node i to j. cost infinite if not direct neighbors  D(v): current value of cost of path from source to dest. V  p(v): predecessor node along path from source to v, that is next v  N: set of nodes whose least cost path definitively known

5: DataLink Layer5a-24 Distance Vector Routing: overview Iterative, asynchronous: each local iteration caused by: r local link cost change r message from neighbor: its least cost path change from neighbor Distributed: r each node notifies neighbors only when its least cost path to any destination changes m neighbors then notify their neighbors if necessary wait for (change in local link cost of msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node:

5: DataLink Layer5a-25 Hierarchical Routing r aggregate routers into regions, “autonomous systems” (AS) r routers in same AS run same routing protocol m “intra-AS” routing protocol m routers in different AS can run different intra- AS routing protocol r special routers in AS r run intra-AS routing protocol with all other routers in AS r also responsible for routing to destinations outside AS m run inter-AS routing protocol with other gateway routers gateway routers

5: DataLink Layer5a-26 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol m IPv4 addressing m Moving a datagram from source to destination m Datagram format m IP fragmentation m ICMP: Internet Control Message Protocol m DHCP: Dynamic Host Configuration Protocol m NAT: Network Address Translation 4.5 Routing in the Internet 4.6 What’s Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility

5: DataLink Layer5a-27 Internet AS Hierarchy Intra-AS border (exterior gateway) routers Inter-AS interior (gateway) routers

5: DataLink Layer5a-28 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information Protocol m OSPF: Open Shortest Path First m IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

5: DataLink Layer5a-29 Internet inter-AS routing: BGP r BGP (Border Gateway Protocol): the de facto standard r Path Vector protocol: m similar to Distance Vector protocol m each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS’s) to destination m BGP routes to networks (ASs), not individual hosts m E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z

5: DataLink Layer5a-30 Router Architecture Overview Two key router functions: r run routing algorithms/protocol (RIP, OSPF, BGP) r switching datagrams from incoming to outgoing link

5: DataLink Layer5a-31 Chapter 5 outline r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 LAN addresses and ARP r 5.5 Ethernet r 5.6 Hubs, bridges, and switches r 5.7 Wireless links and LANs r 5.8 PPP

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

5: DataLink Layer5a-33 Link Layer Services (more) r Flow Control: m pacing between adjacent sending and receiving nodes r Error Detection: m errors caused by signal attenuation, noise. m receiver detects presence of errors: signals sender for retransmission or drops frame r Error Correction: m receiver identifies and corrects bit error(s) without resorting to retransmission r Half-duplex and full-duplex m with half duplex, nodes at both ends of link can transmit, but not at same time

5: DataLink Layer5a-34 Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors 0 0

5: DataLink Layer5a-35 Checksumming: Cyclic Redundancy Check r view data bits, D, as a binary number r choose r+1 bit pattern (generator), G r goal: choose r CRC bits, R, such that m exactly divisible by G (modulo 2) m receiver knows G, divides by G. If non-zero remainder: error detected! m can detect all burst errors less than r+1 bits r widely used in practice (ATM, HDCL)

5: DataLink Layer5a-36 Multiple Access Links and Protocols Two types of “links”: r point-to-point m PPP for dial-up access m point-to-point link between Ethernet switch and host r broadcast (shared wire or medium) m traditional Ethernet m upstream HFC m wireless LAN

5: DataLink Layer5a-37 MAC Protocols: a taxonomy Three broad classes: r Channel Partitioning m divide channel into smaller “pieces” (time slots, frequency, code) m allocate piece to node for exclusive use r Random Access m channel not divided, allow collisions m “recover” from collisions r “Taking turns” m tightly coordinate shared access to avoid collisions

5: DataLink Layer5a-38 Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code Time Division,Code Division, Frequency Division m Random partitioning (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD carrier sensing: easy in some technologies (wire), hard in others (wireless) CSMA/CD used in Ethernet m Taking Turns polling from a central site, token passing

5: DataLink Layer5a-39 LAN Addresses and ARP 32-bit IP address: r network-layer address r used to get datagram to destination IP network (recall IP network definition) LAN (or MAC or physical or Ethernet) address: r used to get datagram from one interface to another physically-connected interface (same network) r 48 bit MAC address (for most LANs) burned in the adapter ROM

5: DataLink Layer5a-40 LAN Addresses and ARP Each adapter on LAN has unique LAN address

5: DataLink Layer5a-41 ARP: Address Resolution Protocol r Each IP node (Host, Router) on LAN has ARP table r ARP Table: IP/MAC address mappings for some LAN nodes m TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Question: how to determine MAC address of B knowing B’s IP address?

5: DataLink Layer5a-42 Routing to another LAN walkthrough: send datagram from A to B via R assume A know’s B IP address r Two ARP tables in router R, one for each IP network (LAN) r In routing table at source Host, find router r In ARP table at source, find MAC address E6-E BB-4B, etc A R B

5: DataLink Layer5a-43 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: r 7 bytes with pattern followed by one byte with pattern r used to synchronize receiver, sender clock rates

5: DataLink Layer5a-44 Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Bit time:.1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec Exponential Backoff: r Goal: adapt retransmission attempts to estimated current load m heavy load: random wait will be longer r first collision: choose K from {0,1}; delay is K x 512 bit transmission times r after second collision: choose K from {0,1,2,3}… r after ten collisions, choose K from {0,1,2,3,4,…,1023} See/interact with Java applet on AWL Web site: highly recommended !

5: DataLink Layer5a-45 Interconnecting LAN segments r Hubs r Bridges r Switches m Remark: switches are essentially multi-port bridges. m What we say about bridges also holds for switches!

5: DataLink Layer5a-46 Interconnecting with hubs r Backbone hub interconnects LAN segments r Extends max distance between nodes r But individual segment collision domains become one large collision domian m if a node in CS and a node EE transmit at same time: collision r Can’t interconnect 10BaseT & 100BaseT

5: DataLink Layer5a-47 Bridges r Link layer device m stores and forwards Ethernet frames m examines frame header and selectively forwards frame based on MAC dest address m when frame is to be forwarded on segment, uses CSMA/CD to access segment r transparent m hosts are unaware of presence of bridges r plug-and-play, self-learning m bridges do not need to be configured

5: DataLink Layer5a-48 Ethernet Switches r Essentially a multi- interface bridge r layer 2 (frame) forwarding, filtering using LAN addresses r Switching: A-to-A’ and B- to-B’ simultaneously, no collisions r large number of interfaces r often: individual hosts, star-connected into switch m Ethernet, but no collisions!