Chap 5 Data Link Layer
Transcript of Chap 5 Data Link Layer
-
8/3/2019 Chap 5 Data Link Layer
1/143
5: DataLink Layer 5a-1
Chapter 5Data Link Layer
Computer Networking: A Top Down Approach Featuring the Internet ,
2nd edition.Jim Kurose, Keith RossAddison-Wesley, July2002.
A note on the use of these ppt slides:Were making these slides freely available to all (faculty, students, readers).Theyre in PowerPoint form so you can add, modify, and delete slides(including this one) and slide content to suit your needs. They obviouslyrepresent a lot of work on our part. In return for use, we only ask thefollowing:
If you use these slides (e.g., in a class) in substantially unaltered form,that you mention their source (after all, wed like people to use our book!) If you post any slides in substantially unaltered form on a www site, that
you note that they are adapted from (or perhaps identical to) our slides, andnote our copyright of this material.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2002
J.F Kurose and K.W. Ross, All Rights Reserved
-
8/3/2019 Chap 5 Data Link Layer
2/143
5: DataLink Layer 5a-2
Chapter 5: The Data Link LayerOur goals:
understand principles behind data link layerservices:
error detection, correction
sharing a broadcast channel: multiple accesslink layer addressingreliable data transfer, flow control: done!
instantiation and implementation of various link
layer technologies
-
8/3/2019 Chap 5 Data Link Layer
3/143
5: DataLink Layer 5a-3
Chapter 5 outline
5.1 Introduction andservices 5.2 Error detectionand correction5.3Multiple accessprotocols5.4 LAN addressesand ARP5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs5.8 PPP5.9 ATM5.10 Frame Relay
-
8/3/2019 Chap 5 Data Link Layer
4/143
5: DataLink Layer 5a-4
Link Layer: IntroductionSome terminology: hosts and routers are nodes
(bridges and switches too)communication channels thatconnect adjacent nodes alongcommunication path are links
wired linkswireless linksLANs
2-PDU is a frame , encapsulates datagram
link
data-link layer has responsibility oftransferring datagram from one node
to adjacent node over a link
-
8/3/2019 Chap 5 Data Link Layer
5/143
5: DataLink Layer 5a-5
Link layer: context
Datagram transferred bydifferent link protocolsover different links:
e.g., Ethernet on first link,frame relay onintermediate links, 802.11on last link
Each link protocolprovides different
servicese.g., may or may notprovide rdt over link
transportation analogytrip from Princeton toLausanne
limo: Princeton to JFKplane: JFK to Geneva
train: Geneva to Lausannetourist = datagram transport segment =communication link
transportation mode =link layer protocol travel agent = routingalgorithm
-
8/3/2019 Chap 5 Data Link Layer
6/143
5: DataLink Layer 5a-6
Link Layer ServicesFraming, link access:
encapsulate datagram into frame, adding header, trailerchannel access if shared mediumphysical addresses used in frame headers to identify
source, dest 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 twistedpair)wireless links: high error rates
Q: why both link-level and end-end reliability?
-
8/3/2019 Chap 5 Data Link Layer
7/143
5: DataLink Layer 5a-7
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) withoutresorting to retransmission
Half-duplex and full-duplex with half duplex, nodes at both ends of link can transmit,but not at same time
-
8/3/2019 Chap 5 Data Link Layer
8/143
5: DataLink Layer 5a-8
Adaptors Communicating
link layer implemented inadaptor (aka NIC)
Ethernet card, PCMCIcard, 802.11 card
sending side:encapsulates datagram ina frameadds error checking bits,rdt, flow control, etc.
receiving sidelooks for errors, rdt, flowcontrol, etcextracts datagram, passes
to rcving nodeadapter is semi-autonomouslink & physical layers
sendingnode
frame
rcvingnode
datagram
frame adapter adapter
link layer protocol
-
8/3/2019 Chap 5 Data Link Layer
9/143
5: DataLink Layer 5a-9
Chapter 5 outline
5.1 Introduction andservices5.2 Error detectionand correction 5.3Multiple accessprotocols5.4 LAN addressesand ARP5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs5.8 PPP5.9 ATM5.10 Frame Relay
-
8/3/2019 Chap 5 Data Link Layer
10/143
5: DataLink Layer 5a-10
Error DetectionEDC= Error Detection and Correction bits (redundancy)D = Data protected by error checking, may include header fields
Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction
-
8/3/2019 Chap 5 Data Link Layer
11/143
5: DataLink Layer 5a-11
Parity CheckingSingle Bit Parity: Detect single bit errors
Two Dimensional Bit Parity: Detect and correct single bit errors
0 0
-
8/3/2019 Chap 5 Data Link Layer
12/143
5: DataLink Layer 5a-12
Internet checksum
Sender: treat segment contentsas sequence of 16-bitintegerschecksum: addition (1scomplement sum) ofsegment contentssender puts checksumvalue into UDP checksumfield
Receiver:
compute checksum of receivedsegmentcheck if computed checksumequals checksum field value:
NO - error detectedYES - no error detected. But maybe errors nonetheless? More later .
Goal: detect errors (e.g., flipped bits) in transmittedsegment (note: used at transport layer only )
-
8/3/2019 Chap 5 Data Link Layer
13/143
5: DataLink Layer 5a-13
Checksumming: Cyclic Redundancy Check
view data bits, D, as a binary numberchoose r+1 bit pattern (generator), G goal: choose r CRC bits,R, such that
exactly divisible by G (modulo 2)receiver knows G, divides by G. If non-zero remainder:error detected!can detect all burst errors less than r+1 bits
widely used in practice (ATM, HDCL)
-
8/3/2019 Chap 5 Data Link Layer
14/143
5: DataLink Layer 5a-14
CRC Example
Want: D.2r XOR R = nGequivalently:
D.2r = nG XOR Requivalently:
if we divide D.2r byG, want remainder R
R= remainder[ ]D.2rG
-
8/3/2019 Chap 5 Data Link Layer
15/143
5: DataLink Layer 5a-15
Chapter 5 outline
5.1 Introduction andservices5.2 Error detectionand correction5.3Multiple accessprotocols 5.4 LAN addressesand ARP5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs5.8 PPP5.9 ATM5.10 Frame Relay
-
8/3/2019 Chap 5 Data Link Layer
16/143
5: DataLink Layer 5a-16
Multiple Access Links and ProtocolsTwo types of links:
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC802.11 wireless LAN
-
8/3/2019 Chap 5 Data Link Layer
17/143
5: DataLink Layer 5a-17
Multiple Access protocolssingle shared broadcast channeltwo or more simultaneous transmissions by nodes:interference
only one node can send successfully at a time
multiple access protocol distributed algorithm that determines how nodesshare channel, i.e., determine when node can transmitcommunication about channel sharing must use channelitself!what to look for in multiple access protocols:
-
8/3/2019 Chap 5 Data Link Layer
18/143
5: DataLink Layer 5a-18
Ideal Mulitple Access Protocol
Broadcast channel of rate R bps 1. When one node wants to transmit, it can send at
rate R.
2. When M nodes want to transmit, each can send ataverage rate R/M3. Fully decentralized:
no special node to coordinate transmissionsno synchronization of clocks, slots
4. Simple
-
8/3/2019 Chap 5 Data Link Layer
19/143
5: DataLink Layer 5a-19
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 collisionsrecover from collisions
Taking turns tightly coordinate shared access to avoid collisions
-
8/3/2019 Chap 5 Data Link Layer
20/143
5: DataLink Layer 5a-20
Channel Partitioning MAC protocols: TDMA
TDMA: time division multiple access access to channel in "rounds"each station gets fixed length slot (length = pkttrans time) in each roundunused slots go idleexample: 6-station LAN, 1,3,4 have pkt, slots 2,5,6idle
-
8/3/2019 Chap 5 Data Link Layer
21/143
5: DataLink Layer 5a-21
Channel Partitioning MAC protocols: FDMA
FDMA: frequency division multiple access channel spectrum divided into frequency bandseach station assigned fixed frequency bandunused transmission time in frequency bands go idleexample: 6-station LAN, 1,3,4 have pkt, frequencybands 2,5,6 idle
f r e q u e n c y
b a n
d s
-
8/3/2019 Chap 5 Data Link Layer
22/143
5: DataLink Layer 5a-22
Channel Partitioning (CDMA)
CDMA (Code Division Multiple Access) unique code assigned to each user; i.e., code set partitioning used mostly in wireless broadcast channels (cellular, satellite,etc)all users share same frequency, but each user has ownchipping sequence (i.e., code) to encode data encoded signal = (original data) X (chipping sequence)decoding: inner-product of encoded signal and chippingsequenceallows multiple users to coexist and transmit simultaneouslywith minimal interference (if codes are orthogonal)
-
8/3/2019 Chap 5 Data Link Layer
23/143
5: DataLink Layer 5a-23
CDMA Encode/Decode
-
8/3/2019 Chap 5 Data Link Layer
24/143
5: DataLink Layer 5a-24
CDMA: two-sender interference
-
8/3/2019 Chap 5 Data Link Layer
25/143
5: DataLink Layer 5a-25
Random Access Protocols
When node has packet to sendtransmit 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 collisionshow to recover from collisions (e.g., via delayedretransmissions)
Examples of random access MAC protocols:slotted ALOHAALOHACSMA, CSMA/CD, CSMA/CA
-
8/3/2019 Chap 5 Data Link Layer
26/143
5: DataLink Layer 5a-26
Slotted ALOHA
Assumptions all frames same sizetime is divided into
equal size slots, time totransmit 1 framenodes start to transmitframes only atbeginning of slotsnodes are synchronizedif 2 or more nodestransmit in slot, allnodes detect collision
Operation when node obtains freshframe, it transmits in nextslotno collision, node can sendnew frame in next slotif collision, noderetransmits frame in eachsubsequent slot with prob.p until success
-
8/3/2019 Chap 5 Data Link Layer
27/143
5: DataLink Layer 5a-27
Slotted ALOHA
Pros single active node cancontinuously transmitat full rate of channelhighly decentralized:only slots in nodesneed to be in syncsimple
Cons collisions, wasting slotsidle slots
nodes may be able todetect collision in lessthan time to transmitpacket
-
8/3/2019 Chap 5 Data Link Layer
28/143
5: DataLink Layer 5a-28
Slotted Aloha efficiency
Suppose N nodes withmany frames to send,each transmits in slotwith probability p
prob that 1st node hassuccess in a slot = p(1-p)N-1
prob that any node hasa success = Np(1-p)N-1
For max efficiencywith N nodes, find p*that maximizesNp(1-p)N-1For many nodes, takelimit of Np*(1-p*)N-1as N goes to infinity,gives 1/e = .37
Efficiency is the long-runfraction of successful slotswhen theres many nodes, eachwith many frames to send
At best: channelused for usefultransmissions 37%of time!
-
8/3/2019 Chap 5 Data Link Layer
29/143
5: DataLink Layer 5a-29
Pure (unslotted) ALOHAunslotted Aloha: simpler, no synchronizationwhen frame first arrives
transmit immediatelycollision probability increases:
frame sent at t 0 collides with other frames sent in [t 0-1,t0+1]
-
8/3/2019 Chap 5 Data Link Layer
30/143
5: DataLink Layer 5a-30
Pure Aloha efficiency
P(success by given node) = P(node transmits) . P(no other node transmits in [p 0-1,p0] . P(no other node transmits in [p 0,p0+1]
= 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) = .18Even worse !
-
8/3/2019 Chap 5 Data Link Layer
31/143
5: DataLink Layer 5a-31
CSMA (Carrier Sense Multiple Access)
CSMA: listen before transmit:If channel sensed idle: transmit entire frameIf channel sensed busy, defer transmission
Human analogy: dont interrupt others!
-
8/3/2019 Chap 5 Data Link Layer
32/143
5: DataLink Layer 5a-32
CSMA collisionscollisionscan still occur: propagation delay meanstwo nodes may not heareach others transmission
collision: entire packet transmissiontime wasted
spatial layout of nodes
note: role of distance & propagationdelay in determining collisionprobability
-
8/3/2019 Chap 5 Data Link Layer
33/143
5: DataLink Layer 5a-33
CSMA/CD (Collision Detection)
CSMA/CD:carrier sensing, deferral as in CSMAcollisionsdetected within short timecolliding transmissions aborted, reducing channelwastage
collision detection: easy in wired LANs: measure signal strengths,compare transmitted, received signals
difficult in wireless LANs: receiver shut off whiletransmitting human analogy: the polite conversationalist
-
8/3/2019 Chap 5 Data Link Layer
34/143
5: DataLink Layer 5a-34
CSMA/CD collision detection
CSMA (C i l i l
-
8/3/2019 Chap 5 Data Link Layer
35/143
5: DataLink Layer 5a-35
CSMA (Carrier-sense multipleaccess)
If propagation time is much less than transmission time - allstations know that a transmission has started almostimmediatelyFirst listen for clear medium (carrier sense)
If medium idle, transmit
Collision occurs if another user starts transmitting withinthe time it takes for the first bit to reach this user(propagation delay)Collision detected by waiting round trip plus ACK contention
No ACK then retransmit
Max utilization depends on propagation time (medium length)and frame lengthLonger frame and shorter propagation gives better utilization
-
8/3/2019 Chap 5 Data Link Layer
36/143
5: DataLink Layer 5a-36
CSMA/CDWith CSMA, collision occupies medium forduration of transmission
Even if the station next to transmitting station collided,collision will be detected after >= RTT
Instead CD= collision detect: Stations listen whilst transmittingIf medium idle, transmitIf busy, listen for idle, then transmit (and listen)If collision detected, jam (send noise) then ceasetransmission
After jam, wait random time then start againBinary exponential back off
-
8/3/2019 Chap 5 Data Link Layer
37/143
5: DataLink Layer 5a-37
Collision Detection
Collision produces much higher signal voltage thansignalCollision detected if cable signal greater than
single station signalSignal attenuated over distanceLimit distance to 500m (10Base5) or 200m(10Base2)
For twisted pair (star-topology) activity on morethan one port is collisionFrames repeated, for CD to work
-
8/3/2019 Chap 5 Data Link Layer
38/143
5: DataLink Layer 5a-38
Why Jam? Tanenbaum: to make sure the sender does not miss thecollision (48 bits) Halsall: Ensure that the collision is detected by all stationsinvolved Stallings: Assure all staitons know that there has been acollision Keshav: Sequence of 512 bits to ensure that every activestation on the network knows that a collision happened andincrements its backoff counter; to ensure that all collidingstations agree that a collision has happened
-
8/3/2019 Chap 5 Data Link Layer
39/143
5: DataLink Layer 5a-39
CSMA/CDOperation
-
8/3/2019 Chap 5 Data Link Layer
40/143
5: DataLink Layer 5a-40
Collision detection
Collision detection can still take as long as
-
8/3/2019 Chap 5 Data Link Layer
41/143
5: DataLink Layer 5a-41
Collision detection
Transmitting stations may detect collisions almostimmediately, and stop transmission
Saves time and bandwidth
Will improve upon just CSMA only if collision isdetected during frame transmissionThis is possible if frames are long enough (andprop. Delay is short enough) so that collision isdetected while transmission
Guideline used in IEEE 802.3Frame transmission time >= 2*prop + delta
-
8/3/2019 Chap 5 Data Link Layer
42/143
5: DataLink Layer 5a-42
CSMA/CD efficiency
T prop = max prop between 2 nodes in LANt trans = time to transmit max-size frame
Efficiency goes to 1 as t prop goes to 0Goes to 1 as t
transgoes to infinity
Much better than ALOHA, but still decentralized,simple, and cheap
trans prop t t / 511
efficiency
-
8/3/2019 Chap 5 Data Link Layer
43/143
5: DataLink Layer 5a-43
Taking Turns MAC protocols
channel partitioning MAC protocols: share channel efficiently and fairly at high loadinefficient at low load: delay in channel access,1/N bandwidth allocated even if only 1 activenode!
Random access MAC protocols efficient at low load: single node can fullyutilize channelhigh load: collision overhead
taking turns protocols look for best of both worlds!
-
8/3/2019 Chap 5 Data Link Layer
44/143
5: DataLink Layer 5a-44
Taking Turns MAC protocols
Polling: master nodeinvites slave nodesto transmit in turn
concerns:polling overheadlatencysingle point of
failure (master)
Token passing: control token passed fromone node to nextsequentially.
token messageconcerns:token overheadlatency
single point of failure (token)
-
8/3/2019 Chap 5 Data Link Layer
45/143
5: DataLink Layer 5a-45
Summary of MAC protocols
What do you do with a shared media?Channel Partitioning, by time, frequency or code
Time Division,Code Division, Frequency Division
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
Taking Turns polling from a central site, token passing
-
8/3/2019 Chap 5 Data Link Layer
46/143
5: DataLink Layer 5a-46
LAN technologies
Data link layer so far:services, error detection/correction, multipleaccess
Next: LAN technologiesaddressingEthernethubs, bridges, switches
802.11PPPATM
-
8/3/2019 Chap 5 Data Link Layer
47/143
5: DataLink Layer 5a-47
Ethernet
dominant LAN technology:cheap $20 for 100Mbs!first widely used LAN technologySimpler, cheaper than token LANs and ATM
Kept up with speed race: 10, 100, 1000 Mbps
Metcalfes Ethernet sketch
-
8/3/2019 Chap 5 Data Link Layer
48/143
5: DataLink Layer 5a-48
Ethernet Frame Structure
Sending adapter encapsulates IP datagram (or othernetwork layer protocol packet) in Ethernet frame
Preamble: 7 bytes with pattern 10101010 followed by onebyte with pattern 10101011
used to synchronize receiver, sender clock rates
E h F S
-
8/3/2019 Chap 5 Data Link Layer
49/143
5: DataLink Layer 5a-49
Ethernet Frame Structure(more)
Addresses: 6 bytesif adapter receives frame with matching destinationaddress, or with broadcast address, it passes data inframe to net-layer protocol
otherwise, adapter discards frameType: indicates the higher layer protocol, mostlyIP but others may be supported such as NovellIPX and AppleTalk)
CRC:checked at receiver, if error is detected, theframe is simply dropped
-
8/3/2019 Chap 5 Data Link Layer
50/143
5: DataLink Layer 5a-50
Ethernet min frame lengthMin length needed for CD: for 2500m distancespecification, RT prop delay is determined to be50 sec
Frame transmission time >= 50 secAt 10Mbps, bits transmitted in 50 sec is 500
-
8/3/2019 Chap 5 Data Link Layer
51/143
5: DataLink Layer 5a-51
Unreliable, connectionless service
Connectionless: No handshaking between sendingand receiving adapter.Unreliable: receiving adapter doesnt send acks ornacks to sending adapter
stream of datagrams passed to network layer can havegapsgaps will be filled if app is using TCPotherwise, app will see the gaps
-
8/3/2019 Chap 5 Data Link Layer
52/143
5: DataLink Layer 5a-52
Ethernet uses CSMA/CD
No slotsadapter doesnt transmitif it senses that someother adapter istransmitting, that is,carrier sense transmitting adapteraborts when it sensesthat another adapter istransmitting, that is,collision detection
Before attempting aretransmission,adapter waits arandom time, that is,random access
E h CSMA/CD l i h
-
8/3/2019 Chap 5 Data Link Layer
53/143
5: DataLink Layer 5a-53
Ethernet CSMA/CD algorithm
1. Adaptor gets datagramfrom and creates frame2. If adapter senses channel
idle, it starts to transmitframe. If it senseschannel busy, waits untilchannel idle and thentransmits
3. If adapter transmitsentire frame withoutdetecting anothertransmission, the adapteris done with frame !
4. If adapter detectsanother transmission whiletransmitting, aborts andsends jam signal
5. After aborting, adapterenters exponentialbackoff : after the mthcollision, adapter choosesa K at random from{0,1,2,,2m-1}. Adapterwaits K*512 bit times andreturns to Step 2
-
8/3/2019 Chap 5 Data Link Layer
54/143
5: DataLink Layer 5a-54
Ethernets CSMA/CD (more)
Jam Signal: make sure allother transmitters areaware of collision; 48 bits;
Bit time: .1 microsec for 10Mbps Ethernet ;
for K=1023, wait time isabout 50 msec
Exponential Backoff: Goal : adapt retransmissionattempts to estimatedcurrent load
heavy load: random waitwill be longer
first collision: choose Kfrom {0,1}; delay is K x 512bit transmission timesafter second collision:
choose K from {0,1,2,3} after ten collisions, chooseK from {0,1,2,3,4,,1023}
See/interact with Javaapplet on AWL Web site:highly recommended !
-
8/3/2019 Chap 5 Data Link Layer
55/143
5: DataLink Layer 5a-55
Ethernet Technologies: 10Base210: 10Mbps;2: under 200 meters max cable lengththin coaxial cable in a bus topology
repeaters used to connect up to multiple segmentsrepeater repeats bits it hears on one interface toits other interfaces: physical layer device only!has become a legacy technology
10B T d 100B T
-
8/3/2019 Chap 5 Data Link Layer
56/143
5: DataLink Layer 5a-56
10BaseT and 100BaseT 10/100 Mbps rate; latter called fast ethernet
T stands for Twisted PairNodes connect to a hub: star topology; 100 mmax distance between nodes and hub
Hubs are essentially physical-layer repeaters:bits coming in one link go out all other linksno frame bufferingno CSMA/CD at hub: adapters detect collisionsprovides net management functionality
hub
nodes
-
8/3/2019 Chap 5 Data Link Layer
57/143
5: DataLink Layer 5a-57
Fast EthernetHigher bit rate media (100 Mbps) is available.Can it be used for Ethernet?Recall minimum frame length?
Set=512 bits by calculating time needed to detect collisions inEthernets of upto 2.5km length, of 10Mbps bit rate
Can higher bit rates be used without changing protocolspecs, and still make it work?Frame transmission time for 512 bit frame @100Mbps ~ 5 sec5 sec >= twice prop. delayShould be ~200m
This is what was Fast Ethernet: transmission media wasavailable, Ethernet wires were anyway not stretching very faraway - > perfect solution say, for e.g. server room LAN
-
8/3/2019 Chap 5 Data Link Layer
58/143
5: DataLink Layer 5a-58
Gbit Ethernet
use standard Ethernet frame formatallows for point-to-point links and sharedbroadcast channelsin shared mode, CSMA/CD is used; short distancesbetween nodes to be efficientuses hubs, called here Buffered Distributors Full-Duplex at 1 Gbps for point-to-point links
10 Gbps now !
-
8/3/2019 Chap 5 Data Link Layer
59/143
5: DataLink Layer 5a-59
Gigabit Ethernet1000 Mbps transmission media available.
Cannot continue reducing max lengthTwo enhancements to basic CSMA/CD
Carrier extension: Pad MAC frames to be atleast 4096 bits This means ~4 sec frame transmission time 2*Prop delay < 4 sec : Length restrictions
-
8/3/2019 Chap 5 Data Link Layer
60/143
5: DataLink Layer 5a-60
LAN Addresses and ARP
32-bit IP address: network-layer addressused to get datagram to destination IP network
(recall IP network definition)
LAN (or MAC or physical or Ethernet) address:used to get datagram from one interface to anotherphysically-connected interface (same network)
48 bit MAC address (for most LANs)burned in the adapter ROM
-
8/3/2019 Chap 5 Data Link Layer
61/143
5: DataLink Layer 5a-61
LAN Addresses and ARPEach adapter on LAN has unique LAN address
-
8/3/2019 Chap 5 Data Link Layer
62/143
5: DataLink Layer 5a-62
LAN Address (more)
MAC address allocation administered by IEEEmanufacturer buys portion of MAC address space(to assure uniqueness)Analogy:
(a) MAC address: like Social Security Number(b) IP address: like postal address
MAC flat address => portability
can move LAN card from one LAN to anotherIP hierarchical address NOT portabledepends on IP network to which node is attached
-
8/3/2019 Chap 5 Data Link Layer
63/143
5: DataLink Layer 5a-63
Recall earlier routing discussion
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2 223.1.3.1
223.1.3.27
A
B
E
Starting at A, given IPdatagram addressed to B:look up net. address of B, find Bon same net. as Alink layer send datagram to Binside link-layer frame
Bs MAC addr
As MAC addr
As IP addr
Bs IP addr IP payload
datagramframe
frame source,dest address
datagram source,dest address
-
8/3/2019 Chap 5 Data Link Layer
64/143
5: DataLink Layer 5a-64
ARP: Address Resolution Protocol
Each IP node (Host,Router) on LAN hasARPtableARP Table: IP/MAC
address mappings forsome LAN nodes< IP address; MAC address; TTL>
TTL (Time To Live): timeafter which addressmapping will be forgotten(typically 20 min)
Question: how to determineMAC address of Bknowing Bs IP address?
-
8/3/2019 Chap 5 Data Link Layer
65/143
5: DataLink Layer 5a-65
ARP protocol
A wants to send datagramto B, and A knows Bs IPaddress.Suppose Bs MAC addressis not in As ARP table. A broadcasts ARP querypacket, containing B's IPaddress
all machines on LANreceive ARP query
B receives ARP packet,replies to A with its (B's)MAC address
frame sent to As MACaddress (unicast)
A caches (saves) IP-to-MAC address pair in itsARP table until informationbecomes old (times out)
soft state: informationthat times out (goesaway) unless refreshed
ARP is plug-and-play: nodes create their ARP
tables withoutintervention from netadministrator
Routing to another LAN
-
8/3/2019 Chap 5 Data Link Layer
66/143
5: DataLink Layer 5a-66
Routing to another LANwalkthrough: send datagram from A to B via R
assume A knows B IP address
Two ARP tables in router R, one for each IPnetwork (LAN)
A
R B
-
8/3/2019 Chap 5 Data Link Layer
67/143
-
8/3/2019 Chap 5 Data Link Layer
68/143
5: DataLink Layer 5a-68
Chapter 5 outline
5.1 Introduction andservices5.2 Error detectionand correction5.3Multiple accessprotocols5.4 LAN addressesand ARP5.5 Ethernet
5.6 Hubs, bridges, andswitches 5.7 Wireless links andLANs5.8 PPP5.9 ATM5.10 Frame Relay
-
8/3/2019 Chap 5 Data Link Layer
69/143
5: DataLink Layer 5a-69
Interconnecting LAN segments
HubsBridgesSwitches
Remark: switches are essentially multi-portbridges.What we say about bridges also holds forswitches!
Interconnecting with hubs
-
8/3/2019 Chap 5 Data Link Layer
70/143
5: DataLink Layer 5a-70
Interconnecting with hubsBackbone hub interconnects LAN segmentsExtends max distance between nodesBut individual segment collision domains become onelarge collision domain
if a node in CS and a node EE transmit at same time: collision
Cant interconnect 10BaseT & 100BaseT
Bridges
-
8/3/2019 Chap 5 Data Link Layer
71/143
5: DataLink Layer 5a-71
BridgesLink layer device
stores and forwards Ethernet framesexamines frame header and selectively forwards frame based on MAC dest addresswhen frame is to be forwarded on segment,uses CSMA/CD to access segment
transparenthosts are unaware of presence of bridges
plug-and-play, self-learningbridges do not need to be configured
Bridges: traffic isolation
-
8/3/2019 Chap 5 Data Link Layer
72/143
5: DataLink Layer 5a-72
Bridges: traffic isolationBridge installation breaks LAN into LAN segmentsbridges filter packets:
same-LAN-segment frames not usuallyforwarded onto other LAN segments
segments become separate collision domains
bridge collisiondomaincollisiondomain
= hub= host
LAN (IP network)
LAN segment LAN segment
-
8/3/2019 Chap 5 Data Link Layer
73/143
5: DataLink Layer 5a-73
Forwarding
How do determine to which LAN segment toforward frame? Looks like a routing problem...
-
8/3/2019 Chap 5 Data Link Layer
74/143
5: DataLink Layer 5a-74
Self learning
A bridge has a bridge table entry in bridge table:
(Node LAN Address, Bridge Interface, Time Stamp)stale entries in table dropped (TTL can be 60 min)
bridges learn which hosts can be reached throughwhich interfaces
when frame received, bridge learns location ofsender: incoming LAN segmentrecords sender/location pair in bridge table
Filtering/Forwarding
-
8/3/2019 Chap 5 Data Link Layer
75/143
5: DataLink Layer 5a-75
Filtering/ForwardingWhen bridge receives a frame:
index bridge table using MAC dest address if entry found for destination
then{if dest on segment from which frame arrived
then drop the frameelse forward the frame on interface indicated
} else flood
forward on all but the interface on which the frame arrived
-
8/3/2019 Chap 5 Data Link Layer
76/143
5: DataLink Layer 5a-76
Bridge exampleSuppose C sends frame to D and D replies back with
frame to C.
Bridge receives frame from from Cnotes in bridge table that C is on interface 1because D is not in table, bridge sends frame intointerfaces 2 and 3
frame received by D
-
8/3/2019 Chap 5 Data Link Layer
77/143
5: DataLink Layer 5a-77
Bridge Learning: example
D generates frame for C, sendsbridge receives frame
notes in bridge table that D is on interface 2 bridge knows C is on interface 1, so selectively forwardsframe to interface 1
h b kb
-
8/3/2019 Chap 5 Data Link Layer
78/143
5: DataLink Layer 5a-78
Interconnection without backbone
Not recommended for two reasons:
- single point of failure at Computer Science hub- all traffic between EE and SE must path overCS segment
B kb fi i
-
8/3/2019 Chap 5 Data Link Layer
79/143
5: DataLink Layer 5a-79
Backbone configuration
Recommended !
B id S i T
-
8/3/2019 Chap 5 Data Link Layer
80/143
5: DataLink Layer 5a-80
Bridges Spanning Tree
for increased reliability, desirable to haveredundant, alternative paths from source to destwith multiple paths, cycles result - bridges maymultiply and forward frame forever
solution: organize bridges in a spanning tree bydisabling subset of interfaces
Disabled
-
8/3/2019 Chap 5 Data Link Layer
81/143
5: DataLink Layer 5a-81
Multiple LANs
-
8/3/2019 Chap 5 Data Link Layer
82/143
5: DataLink Layer 5a-82
Needed: Routing
Complex large LANs need alternative routesLoad balancingFault tolerance
Bridge must decide whether to forward frameBridge must decide which LAN to forward frame onRouting selected for each source-destination pairof LANs
Done in configurationUsually least hop routeOnly changed when topology changes
-
8/3/2019 Chap 5 Data Link Layer
83/143
5: DataLink Layer 5a-83
Spanning TreeBridge automatically develops routing tableAutomatically update in response tochanges
Frame forwardingAddress learningLoop resolution
-
8/3/2019 Chap 5 Data Link Layer
84/143
5: DataLink Layer 5a-84
Frame forwardingMaintain forwarding database for each port
List station addresses reached through each portFor a frame arriving on port X:
Search forwarding database to see if MAC address is
listed for any port except XIf address not found, forward to all ports except XIf address listed for port Y, check port Y for blocking orforwarding state
Blocking prevents port from receiving or transmitting
If not blocked, transmit frame through port Y
-
8/3/2019 Chap 5 Data Link Layer
85/143
5: DataLink Layer 5a-85
Address Learning
When frame arrives at port X, it has come formthe LAN attached to port XUse the source address to update forwarding
database for port X to include that addressTimer on each entry in database (reset wheneverframe received)Each time frame arrives, source address checkedagainst forwarding database
-
8/3/2019 Chap 5 Data Link Layer
86/143
5: DataLink Layer 5a-86
Loop of Bridges
-
8/3/2019 Chap 5 Data Link Layer
87/143
5: DataLink Layer 5a-87
Spanning Tree AlgorithmCreates a logical, or active topology thatbehaves like a spanning tree
Makes alternate bridges redundant
Is run periodically, so will discover failures anduse alternate bridges if necessary
Reference: Fred Halsall: Data Communications, Computer Networks and Open Systems, 4 th Edition.
-
8/3/2019 Chap 5 Data Link Layer
88/143
5: DataLink Layer 5a-88
Spanning Tree AlgorithmVariables:
1. Each bridge has a Priority Value and a unique Identifier2. Each LAN segment has a Designated Cost (DC) inversely
proportional to the bit rate3. Each port of a bridge has a Path Cost (PC) = DC of the LAN
segment to which it is attached
-
8/3/2019 Chap 5 Data Link Layer
89/143
5: DataLink Layer 5a-89
Spanning Tree AlgorithmWorking: Bridges regularly exchange frames known as Bridge ProtocolData Units (BPDUs). This exchange does the following:
1. Bridge with highest priority and smallest ID is selected as root bridge.2. Each bridge determines for each port, the least cost path from root bridge
to this port. This is the Root Path Cost (RPC) for this port.a) Select the port which has the least RPC and designate it as the Root Port (RP).
This is the port which will be used for communicating with the root.3. Once root port is determined, one bridge port is selected for each LAN
segment as the designated bridge port (DP) to which frames will be sent forthat LAN segment.
a) This is a port (which is NOT a root port) which has the least path cost to the rootb) The ports of the root bridge are always DPs for the LAN segments connected to
the root bridge
4. The state of the bridge ports can be set either to forwarding or blocking.a) All ports that are either RPs or DPs are forwarding, the rest are blocking.
-
8/3/2019 Chap 5 Data Link Layer
90/143
5: DataLink Layer 5a-90
Topology InitializationBPDUs are sent to a broadcast MAC address of all bridges on the LANAll bridges initially assume they are the root bridgeEach BPDU contains (self ID, root ID, transmitting port ID, RPC of thisport)If necessary,
Update root ID based on received BPDUsAdd path cost of the port on which frame was received to the RPC in theframeSends out this new info on all other ports with all updated IdsProcedure repeated by all bridges
Will determine RPCs of each port Will select Root Ports based on this
Two or more bridges on the same segment will exchange BPDUs so thatdesignated bridge-port can be seleted
-
8/3/2019 Chap 5 Data Link Layer
91/143
5: DataLink Layer 5a-91
Topology ChangeRoot bridge regularly transmits BPDUs, forwarded by allbridges on all portsBridges will keep timers associated with each of itsforwarding portsWhen timers expire, procedure similar to topologyinitialization is done
Details
Some bridge features
-
8/3/2019 Chap 5 Data Link Layer
92/143
5: DataLink Layer 5a-92
Some bridge featuresIsolates collision domains resulting in higher totalmax throughputlimitless number of nodes and geographicalcoverageCan connect different Ethernet typesTransparent (plug -and-play): no configurationnecessary
Bridges vs Routers
-
8/3/2019 Chap 5 Data Link Layer
93/143
5: DataLink Layer 5a-93
Bridges vs. Routersboth store-and-forward devices
routers: network layer devices (examine network layerheaders)bridges are link layer devices
routers maintain routing tables, implement routing
algorithmsbridges maintain bridge tables, implement filtering,learning and spanning tree algorithms
Routers vs Bridges
-
8/3/2019 Chap 5 Data Link Layer
94/143
5: DataLink Layer 5a-94
Routers vs. Bridges
Bridges + and - + Bridge operation is simpler requiring less packet
processing+ Bridge tables are self learning- All traffic confined to spanning tree, even when
alternative bandwidth is available- Bridges do not offer protection from broadcast
storms
Routers vs Bridges
-
8/3/2019 Chap 5 Data Link Layer
95/143
5: DataLink Layer 5a-95
Routers vs. Bridges
Routers + and - + arbitrary topologies can be supported, cycling is
limited by TTL counters (and good routing protocols)
+ provide protection against broadcast storms- require IP address configuration (not plug and play)- require higher packet processing
bridges do well in small (few hundred hosts) whilerouters used in large networks (thousands of hosts)
Ethernet Switches
-
8/3/2019 Chap 5 Data Link Layer
96/143
5: DataLink Layer 5a-96
t e et Sw tc esEssentially a multi-
interface bridgelayer 2 (frame) forwarding,filtering using LANaddresses
Switching: A-to-A and B-to- B simultaneously, nocollisionslarge number of interfaces
often: individual hosts,star-connected into switchEthernet, but nocollisions!
Ethernet Switches
-
8/3/2019 Chap 5 Data Link Layer
97/143
5: DataLink Layer 5a-97
Ethernet Switches
cut-through switching: frame forwardedfrom input to output port without awaitingfor assembly of entire frame
slight reduction in latencycombinations of shared/dedicated,10/100/1000 Mbps interfaces
Not an atypical LAN (IP network)
-
8/3/2019 Chap 5 Data Link Layer
98/143
5: DataLink Layer 5a-98
Not an atypical LAN (IP network)
Dedicated
Shared
Summary comparison
-
8/3/2019 Chap 5 Data Link Layer
99/143
5: DataLink Layer 5a-99
Summary comparison
hubs bridges routers switches
traffic
isolation
no yes yes yes
plug & play yes yes no yes
optimalrouting
no no yes no
cutthrough
yes no no yes
Chapter 5 outline
-
8/3/2019 Chap 5 Data Link Layer
100/143
5: DataLink Layer 5a-100
Chapter 5 outline
5.1 Introduction andservices5.2 Error detectionand correction
5.3Multiple accessprotocols5.4 LAN addressesand ARP5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs
5.8 PPP5.9 ATM5.10 Frame Relay
IEEE 802 11 Wireless LAN
-
8/3/2019 Chap 5 Data Link Layer
101/143
5: DataLink Layer 5a-101
IEEE 802.11 Wireless LAN
802.11b 2.4-5 GHz unlicensedradio spectrumup to 11 Mbps
direct sequence spreadspectrum (DSSS) inphysical layer
all hosts use samechipping code
widely deployed, usingbase stations
802.11a 5-6 GHz rangeup to 54 Mbps
802.11g 2.4-5 GHz rangeup to 54 Mbps
All use CSMA/CA formultiple access
All have base-stationand ad-hoc networkversions
Base station approach
-
8/3/2019 Chap 5 Data Link Layer
102/143
5: DataLink Layer 5a-102
ppWireless host communicates with a base station
base station = access point (AP)Basic Service Set (BSS) (a.k.a. cell) contains:
wireless hostsaccess point (AP): base station
BSSs combined to form distribution system (DS)
Ad Hoc Network approach
-
8/3/2019 Chap 5 Data Link Layer
103/143
5: DataLink Layer 5a-103
ppNo AP (i.e., base station)wireless hosts communicate with each other
to get packet from wireless host A to B mayneed to route through wireless hosts X,Y,Z
Applications:laptop meeting in conference room, car interconnection of personal devices battlefield
IETF MANET (Mobile Ad hoc Networks)working group
IEEE 802.11: multiple access
-
8/3/2019 Chap 5 Data Link Layer
104/143
5: DataLink Layer 5a-104
pCollision if 2 or more nodes transmit at same time
CSMA makes sense:get all the bandwidth if youre the only one transmitting shouldnt cause a collision if you sense another transmission
Collision detection doesnt work: hidden terminal
problem
IEEE 802 11 MAC Protocol: CSMA/CA
-
8/3/2019 Chap 5 Data Link Layer
105/143
5: DataLink Layer 5a-105
IEEE 802.11 MAC Protocol: CSMA/CA802.11 CSMA: sender- if sense channel idle for
DISF sec.then transmit entire frame(no collision detection)
-if sense channel busythen binary backoff
802.11 CSMA receiver
- if received OK return ACK after SIFS(ACK is needed due tohidden terminal problem)
Collision avoidance mechanisms
-
8/3/2019 Chap 5 Data Link Layer
106/143
5: DataLink Layer 5a-106
Problem: two nodes, hidden from each other, transmit completeframes to base stationwasted bandwidth for long duration !
Solution:
small reservation packetsnodes track reservation interval with internalnetwork allocation vector (NAV)
Collision Avoidance: RTS-CTS
-
8/3/2019 Chap 5 Data Link Layer
107/143
5: DataLink Layer 5a-107
exchangesender transmits shortRTS (request to send)packet: indicatesduration of transmission
receiver replies withshort CTS (clear to send)packet
notifying (possibly hidden)nodes
hidden nodes will nottransmit for specifiedduration: NAV
Collision Avoidance: RTS-CTS
-
8/3/2019 Chap 5 Data Link Layer
108/143
5: DataLink Layer 5a-108
exchangeRTS and CTS short:collisions less likely, of
shorter durationend result similar to
collision detectionIEEE 802.11 allows:CSMACSMA/CA: reservationspolling from AP
A word about Bluetooth
-
8/3/2019 Chap 5 Data Link Layer
109/143
5: DataLink Layer 5a-109
A word about Bluetooth
Low-power, small radius,wireless networkingtechnology
10-100 meters
omnidirectionalnot line-of-sight infraredInterconnects gadgets2.4-2.5 GHz unlicensed
radio bandup to 721 kbps
Interference fromwireless LANs, digitalcordless phones,microwave ovens:
frequency hopping helpsMAC protocol supports:error correctionARQ
Each node has a 12-bitaddress
Chapter 5 outline
-
8/3/2019 Chap 5 Data Link Layer
110/143
5: DataLink Layer 5a-110
Chapter 5 outline
5.1 Introduction andservices5.2 Error detectionand correction
5.3Multiple accessprotocols5.4 LAN addressesand ARP
5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs
5.8 PPP 5.9 ATM5.10 Frame Relay
Point to Point Data Link Control
-
8/3/2019 Chap 5 Data Link Layer
111/143
5: DataLink Layer 5a-111
Point to Point Data Link Control
one sender, one receiver, one link: easier thanbroadcast link:no Media Access Controlno need for explicit MAC addressing
e.g., dialup link, ISDN linepopular point-to-point DLC protocols:PPP (point-to-point protocol)HDLC: High level data link control (Data linkused to be considered high layer in protocolstack!
PPP Design Requirements [RFC 1557]
-
8/3/2019 Chap 5 Data Link Layer
112/143
5: DataLink Layer 5a-112
packet framing: encapsulation of network-layerdatagram in data link frame
carry network layer data of any network layerprotocol (not just IP) at same time ability to demultiplex upwards
bit transparency: must carry any bit pattern in thedata fielderror detection (no correction)
connection liveness: detect, signal link failure tonetwork layernetwork layer address negotiation: endpoint canlearn/configure each others network address
PPP non-requirements
-
8/3/2019 Chap 5 Data Link Layer
113/143
5: DataLink Layer 5a-113
PPP non requirements
no error correction/recoveryno flow controlout of order delivery OKno need to support multipoint links (e.g., polling)
Error recovery, flow control, data re-orderingall relegated to higher layers!
PPP Data Frame
-
8/3/2019 Chap 5 Data Link Layer
114/143
5: DataLink Layer 5a-114
PPP Data Frame
Flag: delimiter (framing)Address: does nothing (only one option)Control: does nothing; in the future possiblemultiple control fieldsProtocol: upper layer protocol to which framedelivered (eg, PPP-LCP, IP, IPCP, etc)
PPP Data Frame
-
8/3/2019 Chap 5 Data Link Layer
115/143
5: DataLink Layer 5a-115
PPP Data Frame
info: upper layer data being carriedcheck: cyclic redundancy check for errordetection
Byte Stuffing
-
8/3/2019 Chap 5 Data Link Layer
116/143
5: DataLink Layer 5a-116
Byte Stuffing data transparency requirement: data field mustbe allowed to include flag pattern
Q: is received data or flag?
Sender: adds (stuffs) extra < 01111110> byteafter each < 01111110>data byteReceiver:
two 01111110 bytes in a row: discard first byte,continue data receptionsingle 01111110: flag byte
Byte Stuffing
-
8/3/2019 Chap 5 Data Link Layer
117/143
5: DataLink Layer 5a-117
Byte Stuffing
flag bytepatternin datato send
flag byte pattern plusstuffed byte intransmitted data
PPP Data Control Protocol
-
8/3/2019 Chap 5 Data Link Layer
118/143
5: DataLink Layer 5a-118
PPP Data Control ProtocolBefore exchanging network-
layer data, data link peersmustconfigure PPP link(max.frame length,authentication)learn/configure network layer information
for IP: carry IP ControlProtocol (IPCP) msgs(protocol field: 8021) toconfigure/learn IPaddress
Chapter 5 outline
-
8/3/2019 Chap 5 Data Link Layer
119/143
5: DataLink Layer 5a-119
Chapter 5 outline
5.1 Introduction andservices5.2 Error detectionand correction
5.3Multiple accessprotocols5.4 LAN addressesand ARP
5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs
5.8 PPP5.9 ATM 5.10 Frame Relay
Asynchronous Transfer Mode: ATM
-
8/3/2019 Chap 5 Data Link Layer
120/143
5: DataLink Layer 5a-
120
y1990s/00 standard for high -speed (155Mbps to622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal: integrated, end-end transport of carry voice,video, data
meeting timing/QoS requirements of voice, video(versus Internet best-effort model)next generation telephony: technical roots intelephone worldpacket-switching (fixed length packets, calledcells) using virtual circuits
ATM architecture
-
8/3/2019 Chap 5 Data Link Layer
121/143
5: DataLink Layer 5a-
121
adaptation layer: only at edge of ATM network data segmentation/reassembly
roughly analogous to Internet transport layerATM layer: network layer cell switching, routing
physical layer
ATM: network or link layer?
-
8/3/2019 Chap 5 Data Link Layer
122/143
5: DataLink Layer 5a-
122
: etwo o aye ?Vision:end-to-end
transport: ATM fromdesktop to desktop ATM is a networktechnology
Reality: used to connectIP backbone routersIP over ATM ATM as switched
link layer,connecting IProuters
ATM Adaptation Layer (AAL)
-
8/3/2019 Chap 5 Data Link Layer
123/143
5: DataLink Layer 5a-
123
p y ( )
ATM Adaptation Layer (AAL): adapts upperlayers (IP or native ATM applications) to ATMlayer belowAAL present only in end systems , not in switches
AAL layer segment (header/trailer fields, data)fragmented across multiple ATM cellsanalogy: TCP segment in many IP packets
ATM Adaptation Layer (AAL) [more]
-
8/3/2019 Chap 5 Data Link Layer
124/143
5: DataLink Layer 5a-124
Different versions of AAL layers, depending on ATMservice class:AAL1:for CBR (Constant Bit Rate) services, e.g. circuit emulationAAL2:for VBR (Variable Bit Rate) services, e.g., MPEG videoAAL5:for data (e.g., IP datagrams)
AAL PDU
ATM cell
User data
AAL5 - Simple And EfficientAL (SEAL)
-
8/3/2019 Chap 5 Data Link Layer
125/143
5: DataLink Layer 5a-125
AL (SEAL)AAL5: low overhead AAL used to carry IPdatagrams
4 byte cyclic redundancy checkPAD ensures payload multiple of 48byteslarge AAL5 data unit to be fragmented into 48-byte ATM cells
ATM Layer
-
8/3/2019 Chap 5 Data Link Layer
126/143
5: DataLink Layer 5a-126
Service: transport cells across ATM network
analogous to IP network layervery different services than IP network layer
NetworkArchitecture
Internet
ATM
ATM
ATM
ATM
ServiceModel
best effort
CBR
VBR
ABR
UBR
Bandwidth
none
constantrateguaranteedrateguaranteedminimumnone
Loss
no
yes
yes
no
no
Order
no
yes
yes
yes
yes
Timing
no
yes
yes
no
no
Congestionfeedback
no (inferredvia loss) nocongestionnocongestionyes
no
Guarantees ?
ATM Layer: Virtual Circuits
-
8/3/2019 Chap 5 Data Link Layer
127/143
5: DataLink Layer 5a-127
yVC transport: cells carried on VC from source to dest
call setup, teardown for each call before data can floweach packet carries VC identifier (not destination ID)every switch on source- dest path maintain state for eachpassing connection
link,switch resources (bandwidth, buffers) may be allocated toVC: to get circuit-like perf.Permanent VCs (PVCs)
long lasting connections
typically: permanent route between to IP routers Switched VCs (SVC): dynamically set up on per-call basis
ATM VCs
-
8/3/2019 Chap 5 Data Link Layer
128/143
5: DataLink Layer 5a-128
Advantages of ATM VC approach: QoS performance guarantee for connectionmapped to VC (bandwidth, delay, delay jitter)
Drawbacks of ATM VC approach:
Inefficient support of datagram trafficone PVC between each source/dest pair) doesnot scale (N*2 connections needed)SVC introduces call setup latency, processingoverhead for short lived connections
ATM Layer: ATM cell
-
8/3/2019 Chap 5 Data Link Layer
129/143
5: DataLink Layer 5a-129
y5-byte ATM cell header48-byte payload
Why?: small payload -> short cell-creation delayfor digitized voicehalfway between 32 and 64 (compromise!)
Cell header
Cell format
ATM cell header
-
8/3/2019 Chap 5 Data Link Layer
130/143
5: DataLink Layer 5a-130
VCI: virtual channel IDwillchange from link to link thru netPT: Payload type (e.g. RM cell versus data cell)CLP: Cell Loss Priority bit
CLP = 1 implies low priority cell, can bediscarded if congestion
HEC: Header Error Checksumcyclic redundancy check
ATM Physical Layer (more)
-
8/3/2019 Chap 5 Data Link Layer
131/143
5: DataLink Layer 5a-131
y y ( )
Two pieces (sublayers) of physical layer:Transmission Convergence Sublayer (TCS): adaptsATM layer above to PMD sublayer belowPhysical Medium Dependent:depends on physicalmedium being used
TCS Functions: Header checksum generation: 8 bits CRCCelldelineationWith unstructured PMD sublayer, transmissionof idle cells when no data cells to send
ATM Physical Layer
-
8/3/2019 Chap 5 Data Link Layer
132/143
5: DataLink Layer 5a-132
y y
Physical Medium Dependent (PMD) sublayer SONET/SDH : transmission frame structure (like acontainer carrying bits);
bit synchronization;bandwidth partitions (TDM);several speeds: OC3 = 155.52 Mbps; OC12 = 622.08Mbps; OC48 = 2.45 Gbps, OC192 = 9.6 Gbps
TI/T3 : transmission frame structure (oldtelephone hierarchy): 1.5 Mbps/ 45 Mbpsunstructured : just cells (busy/idle)
IP-Over-ATMIP over ATM
-
8/3/2019 Chap 5 Data Link Layer
133/143
5: DataLink Layer 5a-133
Classic IP only
3 networks (e.g.,LAN segments)MAC (802.3) and IPaddresses
replace network
(e.g., LAN segment)with ATM networkATM addresses, IPaddresses
ATMnetwork
EthernetLANs
EthernetLANs
IP-Over-ATM
-
8/3/2019 Chap 5 Data Link Layer
134/143
5: DataLink Layer 5a-134
Issues: IP datagrams intoATM AAL5 PDUsfrom IP addressesto ATM addresses
just like IPaddresses to802.3 MACaddresses!
ATMnetwork
EthernetLANs
Datagram Journey in IP-over-ATM Network
-
8/3/2019 Chap 5 Data Link Layer
135/143
5: DataLink Layer 5a-135
at Source Host: IP layer maps between IP, ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data, segments cells, passes to ATM layer
ATM network: moves cell along VC to destination at Destination Host:
AAL5 reassembles cells into original datagramif CRC OK, datagram is passed to IP
Chapter 5 outline
-
8/3/2019 Chap 5 Data Link Layer
136/143
5: DataLink Layer 5a-136
5.1 Introduction andservices5.2 Error detectionand correction
5.3Multiple accessprotocols5.4 LAN addressesand ARP
5.5 Ethernet
5.6 Hubs, bridges, andswitches5.7 Wireless links andLANs
5.8 PPP5.9 ATM5.10 Frame Relay
Frame Relay
-
8/3/2019 Chap 5 Data Link Layer
137/143
5: DataLink Layer 5a-137
Like ATM: wide area network technologiesVirtual-circuit oriented
origins in telephony worldcan be used to carry IP datagrams
can thus be viewed as link layers by IP
protocol
Frame Relay
-
8/3/2019 Chap 5 Data Link Layer
138/143
5: DataLink Layer 5a-138
Designed in late 80s, widely deployed in the 90s Frame relay service:
no error controlend-to-end congestion control
Frame Relay (more)
-
8/3/2019 Chap 5 Data Link Layer
139/143
5: DataLink Layer 5a-139
Designed to interconnect corporate customer LANstypically permanent VCs: pipe carrying aggregatetraffic between two routersswitched VCs: as in ATM
corporate customer leases FR service from publicFrame Relay network (e.g., Sprint, ATT)
Frame Relay (more)
-
8/3/2019 Chap 5 Data Link Layer
140/143
5: DataLink Layer 5a-140
Flag bits, 01111110, delimit frameaddress:
10 bit VC ID field3 congestion control bits FECN: forward explicit congestion
notification (frame experienced congestion
on path) BECN: congestion on reverse path DE: discard eligibility
addressflags data CRC flags
Frame Relay -VC Rate Control
-
8/3/2019 Chap 5 Data Link Layer
141/143
5: DataLink Layer 5a-141
Committed Information Rate (CIR) defined, guaranteed for each VC negotiated at VC set up timecustomer pays based on CIR
DE bit: Discard Eligibility bit Edge FR switch measures traffic rate for each VC;marks DE bit
DE = 0: high priority, rate compliant frame; deliverat all costs DE = 1: low priority, eligible for congestion discard
Frame Relay - CIR & Frame Marking
-
8/3/2019 Chap 5 Data Link Layer
142/143
5: DataLink Layer 5a-142
Access Rate : rate R of the access link betweensource router (customer) and edge FR switch (provider); 64Kbps
-
8/3/2019 Chap 5 Data Link Layer
143/143
principles behind data link layer services:error detection, correctionsharing a broadcast channel: multiple accesslink layer addressing, ARP
link layer technologies: Ethernet, hubs,bridges, switches,IEEE 802.11 LANs, PPP,ATM, Frame Relay
journey down the protocol stack now OVER! next stops: multimedia, security, networkmanagement