1 The Data Link Layer  introduction  point-to-point data link protocols  the multiple access problem  local area networks  required reading:  Tannenbaum.

Slides:



Advertisements
Similar presentations
Channel Allocation Protocols. Dynamic Channel Allocation Parameters Station Model. –N independent stations, each acting as a Poisson Process for the purpose.
Advertisements

The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
EECC694 - Shaaban #1 lec #5 Spring Data Link In Broadcast Networks: The Media Access Sublayer Broadcast networks with multi-access (or random.
Ethernet – CSMA/CD Review
Multiple access What if multiple machines are sharing the same link?
Lecture 9: Multiple Access Protocols
The Data Link Layer introduction point-to-point data link protocols
1 K. Salah Module 4.2: Media Access Control The Media Access Control (MAC) sublayer –Random Access (CSMA), IEEE –Token Passing, IEEE Ch 13-
1 Pertemuan 13 Teknik Akses Jaringan - Random Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
MAC Protocols Media Access Control (who gets the use the channel) zContention-based yALOHA and Slotted ALOHA. yCSMA. yCSMA/CD. TDM and FDM are inefficient.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
EE 122: Ethernet and Ion Stoica September 18, 2002 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 Link Layer Message M A B Problem: Given a message M at a node A consisting of several packets, how do you send the packets to a “neighbor” node B –Neighbor:
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 16 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
Networks: Local Area Networks1 LANs Studying Local Area Networks Via Media Access Control (MAC) SubLayer.
Medium Access Control Sublayer
1 Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
1 ECE453 – Introduction to Computer Networks Lecture 7 – Multiple Access Control (I)
9/11/2015 5:55 AM1 Ethernet and CSMA/CD CSE 6590 Fall 2010.
1 Computer Communication & Networks Lecture 12 Datalink Layer: Multiple Access Waleed Ejaz
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
4-1 Last time □ Link layer overview ♦ Services ♦ Adapters □ Error detection and correction ♦ Parity check ♦ Internet checksum ♦ CRC □ PPP ♦ Byte stuffing.
Chapter 4: Medium Access Control (MAC) Sublayer
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking LANs 2: MAC protocols.
جلسه دهم شبکه های کامپیوتری به نــــــــــــام خدا.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 16.
Medium Access Control NWEN302 Computer Network Design.
LAN technologies and network topology LANs and shared media Locality of reference Star, bus and ring topologies Medium access control protocols.
Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
Layer 2 Technologies At layer 2 we create and transmit frames over communications channels Format of frames and layer 2 transmission protocols are dependent.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
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 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices.
Medium Access Control Sub Layer
Data Communications, Kwangwoon University12-1 Chapter 12. Multiple Access 1.Random Access 2.Controlled Access 3.Channelization.
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Ch 12. Multiple Access. Multiple Access for Shared Link Dedicated link – Point-to-point connection is sufficient Shared link – Link is not dedicated –
Ch 5. The Link Layer and Local Area Networks Myungchul Kim
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 Ethernet CSE 3213 Fall February Introduction Rapid changes in technology designs Broader use of LANs New schemes for high-speed LANs High-speed.
Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:
Example DLL Protocols 1. High-Level Data Link Control (HDLC).
Data Link Layer Lower Layers Local Area Network Standards
Week3 The Medium Access Sublayer
Part III Datalink Layer 10.
Computer Communication Networks
CS 457 – Lecture 6 Ethernet Spring 2012.
Services of DLL Framing Link access Reliable delivery
Overview Jaringan Komputer (3)
The Medium Access Control Sublayer
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
7- chapter Seven Local Area Networks (LAN)
Computer Interfacing and Protocols
Chapter 6 Multiple Radio Access.
Part III Datalink Layer 10.
Presentation transcript:

1 The Data Link Layer  introduction  point-to-point data link protocols  the multiple access problem  local area networks  required reading:  Tannenbaum ch 3, 4  Kurose, Ross ch 5

2 Data Link Layer : Introduction Services: reliably deliver a data link packet between two physically connected machines  two link types: point-to-point, broadcast Point-to-point links: one sender, one receiver  framing: recognizing bits on the wire as packets  reliable communications

3 Data Link Layer : Introduction broadcast links: many senders, potentially many receivers  framing  reliable communication  accessing a shared medium  addressing  many senders many receivers

4 Data Link Layer: Introduction  reliable communication: ARQ, checksum, timers, sequence numbers  addressing  data link level addresses different from network layer addresses!  why do we need different data link address?

5 Data Link Layer Services  Three possible services provided to network layer  Unacknowledged connectionless service –no error recovery, suitable for low error rate channels  Acknowledged connectionless service –suitable for unreliable channels  Acknowledged connection-oriented service –suitable for WAN subnets connected by point-to-point leases lines

6 ARQ-based Protocols  Automatic repeat request (ARQ)  detect transmission errors and request retransmission  Stop-and-wait ARQ  ensure each packet has been received correctly before sending next; uses acks/nacks  need to use sequence numbers  Go back n ARQ  send packets numbered sequentially  receiver sends ack with the largest in-order packet received  n determines how many packets can be sent before waiting

7 Error detection and Correction  Parity checks  one bit parity for every n bits  two dimensional parity  Checksums  Cyclic redundancy checks  add r bits to a d bit string such that (d+r) bits are divisible by a generator G  Homework: read KR sec 5.2

8 Point-to-point Data Link Control  HDLC: high level data link protocol (it's old - data link was "high-level" way back when)  HDLC frame format:  flag pattern ( ) is used to mark beginning/end of frame  bit stuffing: if five consecutive 1's in data, sender adds a 0, receiver removes  address of receiving node (for broadcast links)

9 HDLC: control field  control field format for "data" frames:  3-bit seq number  3-bit ack number  1 bit P/F to indicate sender-to-receiver to vice-versa  control field format for "supervisory" frames:

10 Broadcast links: Multiple Access Protocols Single shared communication channel  two or more simultaneous transmissions by nodes: interference  only one node can send successfully at a time  question: how to share this broadcast channel examples of multiple access environments :

11 Examples

12 Multiple Access Protocols Distributed algorithm which determines how stations share channel, i.e., determine when station can transmit Communication about channel sharing must use channel itself! What to look for in multiple access protocols:  synchronous or asynchronous  information needed about other stations  robustness (e.g., to channel errors)  performance

13 Some Multiple Access Protocols Claim: humans use multiple access protocols all the time  class can "guess" multiple access protocols multiaccess protocol 1: multiaccess protocol 2: multiaccess protocol 3: multiaccess protocol 4:

14 Human MAPs  Give everyone a chance to speak  Don’t speak until you are spoken to  Don’t monopolize the conversation  Raise your hand if you have a question  Don’t interrupt when someone is speaking  Don’t fall asleep when someone is talking

15 A taxonomy of multiple access protocols Random access protocols: stations contend for channel, collisions (overlapping transmissions can occur):  aloha  slotted aloha  carrier sense multiple access: Ethernet  group random access

16 Taxonomy of MAPs (cont.) Controlled access protocols: stations reserve or are assigned channel, no collisions  predetermined channel allocation: time division multiple access  demand adaptive channel allocation  reservation protocols  token passing (token bus, token ring)

17 The Aloha Protocol simple: if you have pkt to send, "just do it"  if pkt suffers collision, will try resending later

18 Analyzing the Aloha Protocol Goal: quantitative understanding of performance of Aloha protocol  fixed length pkts  pkt transmission time is unit of time  throughput S - number of pkts successfully (without collision) transmitted per unit time  in previous example, S = 0.2 pkt/unit time

19  offered load G - number pkt transmissions attempted per unit time  note: S<G, but S depends on G  Poisson model: probability of k pkt transmission attempts in t time units Prob[k trans in t ] = ((Gt)^k )(e^{-Gt})/k! Prob[k trans in t ] = ((Gt)^k )(e^{-Gt})/k!  infinite population model  capacity of multiple access protocol: maximum value of S over all values of G

20 Analyzing Aloha (cont) Focus on a given attempted packet transmission S = rate attempted pkt trans * Prob[successful trans] = G*Prob[no other pkt's overlap with attempted trans] = G*Prob[no other pkt's overlap with attempted trans] = G*Prob[0 other attempted trans in 2 time units] = G*Prob[0 other attempted trans in 2 time units] = Ge^{-2G} = Ge^{-2G}

21 Aloha throughput Note: maximum throughput is 18% of physical channel capacity  you buy 1 Mb link, thoughput will never be more than 180Kb!

22 Slotted Aloha  synchronous system: time divided into slots  slot size equals fixed packet transmission time  when pkt ready for transmission, wait until start of next slot  packets overlap completely or not at all

23

24 Slotted Aloha performance S = G*Prob[no other transmissions overlap] = G*Prob[0 other attempted transmissions] = G*Prob[0 other attempted transmissions] = G*Prob[0 other arrivals in previous slot] = G*Prob[0 other arrivals in previous slot] = Ge^{-G} = Ge^{-G}

25 Carrier Sensing Protocols  Aloha is inefficient (and rude!): doesn't listen before talking!  Carrier Sense Multiple Access: CSMA non-persistent CSMA: 1. sense (listen to) channel 1. sense (listen to) channel 2. if {channel sensed busy} 2. if {channel sensed busy} then wait random time; go to 1 else transmit packet

26 Carrier Sensing Protocols (cont) p-persistent CSMA: 1. sense (listen to) channel 1. sense (listen to) channel 2. when {channel sensed idle} 2. when {channel sensed idle} transmit with probability p else wait random time, go to 1

27 Carrier sensing protocols (cont)  channel sensing will not avoid all collisions:

28 Carrier Sensing (cont.)  performance will depend on channel length  large propagation delays: poor performance  length of CSMA networks must be limited Can we do better?

29 CSMA/CD  CSMA with collision detection(CD):  listen while talking!  stop transmitting when another pkt has collided with your pkt  wait random time before attempting to resend  worst case time to detect a collision?  performance depends (as in CSMA) on channel length

30 Case Study: Ethernet  CSMA/CD, 1-persistent  IEEE standard  channel: coaxial cable (typically)  T: minimum randomization interval

31 Collision resolution: binary backoff: pkt arrives (from upper layer) for transmission. 1. Set L=1, mark pkt as "ready" 1. Set L=1, mark pkt as "ready" 2. after successful transmission, all hosts with "ready" pkt can send 2. after successful transmission, all hosts with "ready" pkt can send 3. if {collision} 3. if {collision} L=L*2, up to 1024 L=L*2, up to 1024 wait random amt of time over next L*T wait random amt of time over next L*T time units time units after waiting, pkt is again "ready" after waiting, pkt is again "ready" go to 2 go to 2

32 Note: backoff interval dynamically adjusts to load  different hosts will have different values of L  light load: small values of L (typically)  heavy load: larger L

33 Ethernet: example

34 More on ethernet  10 Mb/sec, 100 Mb/sec standards  packet format:  preamble: 7 bytes to allow sender/receiver clock synch  start-of-frame: 1 byte, denotes start of from (like HDLC)  destination address:  48 bit address "physical address"  different from IP address!!!!  each Ethernet board in world has own unique address hard-wired (IEEE and vendor assigned)  dest. address all 1's for broadcast pkt: will be received by all hosts attached to LAN

35 More on ethernet  source address: 48-bit physical address  length: 2 bytes, max packet length is 1500 bytes  data: contains packet (e.g., IP packet) handed down from upper layer  padding: used to insure data plus padding > 46 bytes  checksum

36 Group Random Access Protocols  rather than random backoff to separate colliding stations, structured "search for exactly one station  enable group of stations  if collisions occur, divide group until only one ready station is enabled  tree traversal: think of stations at leaves on logical binary tree:

37 1. all stations rooted at rootnode enabled 1. all stations rooted at rootnode enabled 2. if {no stations send) 2. if {no stations send) return return else if (one station sends) else if (one station sends) return return else /* collision */ else /* collision */ resolve(leftchild(rootnode)) resolve(leftchild(rootnode)) resolve(rightchild(rootnode)) resolve(rightchild(rootnode))

38 Group Random Access: example

39 suppose stations 2,3,7,8 ready with pkt A enabled, collisions B enabled collisions D enabled, SUCCESS by 2 E enabled SUCCESS by 3 C enabled, collisions F enabled, idle G enabled, collisions (could have avoided!) 7 enabled, SUCCESS 8 enabled, SUCCESS

40 Token Passing Protocols  token circulates among stations  media:  token ring connection: IEEE802.5, FDDI  token bus, IEEE802.4  to transmit  station must seize token  transmit packet while holding token  release (send out) token

41