1 Prof. Younghee Lee 1 Computer Networks Lecture 10: Data Link - LANs Prof. Younghee Lee * Some part of this teaching materials are prepared referencing the lecture note made by F. Kurose, Keith W. Ross(U. of Massachusetts)
1Prof. Younghee Lee1
Computer Networks Lecture 10: Data Link - LANs
Prof. Younghee Lee
* Some part of this teaching materials are prepared referencing the lecture note made by F. Kurose, Keith W. Ross(U. of Massachusetts)
2Prof. Younghee Lee2
Point to Point Data Link Control
one sender, one receiver, one link: easier than broadcast link:– no Media Access Control– no need for explicit MAC addressing– e.g., dialup link, ISDN line
popular point-to-point DLC protocols:– PPP (point-to-point protocol)– HDLC: High level data link control (Data link used
to be considered “high layer” in protocol stack!
3Prof. Younghee Lee3
HDLC Connection-oriented error-correcting data link protocol
– Early international protocol standard (original 1974, frequent updates) Designed to transmit data frames across (potentially) high error-rate
data links– Improved on older character-based data link protocols
Standard defines– Framing scheme and frame format(s)– Recommended window sizes and approved checksum lengths– Primitives (commands)– Procedures for connection set-up and release, data transfer, error detection
and error correction– Connectionless mode of operation
Basis of many Link Layer protocols developed since that time– Including those for X.25, FR, ISDN, PPP, modems
HDLC frames are delimited by flags: 01111110 Stuff bits if pattern appears in data:
– 01111110 ; flag– Data 01111110 -> 011111010
4Prof. Younghee Lee4
PPP
Point-to-point Protocol Originally for User-network connection Now being used for router-router connection also PPP is used when you connect to an internet
service provider (ISP) via modem PPP is a variation of HDLC Uses flags like HDLC Uses byte stuffing in stead of bit stuffing
5Prof. Younghee Lee5
PPP Data Frame
Flag: delimiter (framing) Address: does nothing (only one option) Control: does nothing; in the future possible multiple control fi
elds Protocol: upper layer protocol to which frame delivered (eg,
PPP-LCP, IP, IPCP, etc) info: upper layer data being carried check: cyclic redundancy check for error detection
6Prof. Younghee Lee6
PPP is character-oriented version of HDLC Flag is 0x7E (01111110) Control escape 0x7D (01111101) Any occurrence of flag or control escape inside of frame is replaced
with 0x7D followed by original octet XORed with 0x20 (00100000)
Byte-Stuffing in PPP
Data to be sent
41 7D 42 7E 50 70 46
After stuffing and framing
5D 42 7D 5E 50 70 467E 41 7D 7E
7Prof. Younghee Lee7
PPP PhasesHome PC to Internet Service Provider1. PC calls router via modem2. PC and router exchange LCP packets to
negotiate PPP parameters3. Check on identities4. NCP packets exchanged to configure the
network layer, e.g. TCP/IP ( requires IP address assignment)
5. Data transport, e.g. send/receive IP packets6. NCP used to tear down the network layer
connection (free up IP address); LCP used to shut down data link layer connection
7. Modem hangs up
Two-layer protocol that encapsulates multiple packet types over data link
– Link Control Protocol (LCP) initializes and configures the data link
– Network Control Protocol (NCP) controls packet encapsulation
Dead
Establish
Authenticate
Network
Terminate
Open
Failed
Failed
1. Carrier detected
2. Optionsnegotiated
3. Authentication completed4. NCP
configuration
6. Done
7. Carrierdropped
5.
8Prof. Younghee Lee8
ATM protocol architecture ATM protocol architecture
– ITU-T SG 13, SG 11– ATM Forum– Connection-oriented packet-switched network– Used in both WAN and LAN settings– Signaling (connection setup) Protocol: Q.2931– Packets are called cells: 5-byte header + 48-byte payload– Commonly transmitted over SONET (but not necessarily)
9Prof. Younghee Lee9
Cell Network
Why Cell?– Taking advantages of the characteristics of both packet and bit --> good for multimedia communications– Interference
o interference at gigabit speed?
10Prof. Younghee Lee10
ATM architecture
adaptation layer: only at edge of ATM network– ATM Adaptation Layer (AAL): “adapts” upper layers
AAL present only in end systems, not in switches– data segmentation/reassembly– roughly analagous to Internet transport layer
ATM layer: “network” layer– cell switching, routing
physical layer
11Prof. Younghee Lee11
ATM: network or link layer?
Vision: end-to-end transport: “ATM from desktop to desktop”– ATM is a network
technology
Reality: used to connect IP backbone routers – “IP over ATM”– ATM as switched link
layer, connecting IP routers
12Prof. Younghee Lee12
ATM LayerService: transport cells across ATM network analogous to IP network layer very different services than IP network layer
NetworkArchitecture
Internet
ATM
ATM
ATM
ATM
ServiceModel
best effort
CBR
VBR
ABR
UBR
Bandwidth
none
constantrateguaranteedrateguaranteed minimumnone
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 ?
13Prof. Younghee Lee13
ATM Layer: Virtual Circuits
VC transport: cells carried on VC from source to dest– call setup, teardown for each call before data can flow– each packet carries VC identifier (not destination ID)– every switch on source-dest path maintain “state” for each passing c
onnection– link,switch resources (bandwidth, buffers) may be allocated to VC: 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
14Prof. Younghee Lee14
ATM Physical Layer
Physical Medium Dependent (PMD) sublayer SONET/SDH: transmission frame structure (like a contai
ner carrying bits); – bit synchronization; – bandwidth partitions (TDM); – several speeds: OC3 = 155.52 Mbps; OC12 = 622.08 Mbps;
OC48 = 2.45 Gbps, OC192 = 9.6 Gbps
TI/T3: transmission frame structure (old telephone hierarchy): 1.5 Mbps/ 45 Mbps
unstructured: just cells (busy/idle)
15Prof. Younghee Lee15
IP Forwarding IP over ATM
– LANE: ATMF, to make an ATM LAN appear as a set of logical shared medium LANs interconnected via router.
– IPOA: IETF, group of ATM stations are divided into Logical IP Subnet(LIS), interconnected via router. Each LIS has an ATM ARP server for address resolution
– NHRP(Next Hop Resolution Protocol): IETF, to locate an exit point in the ATM cloud closest to the destination and to obtain ATM address.
– Multiprotocol over ATM(MPOA): ATMF, to provide internetworking service such as IP, IPX, and AppleTalk over an ATM network: an extension of LANE. Uses NHRP.
IP switching: Ipsilon Tag switching: Cisco Cell Switched Router: Toshiba Aggregate Route Based IP Switching(ARIS): IBM MPLS: IETF(~Tag switching)
16Prof. Younghee Lee16
IP over ATM
CLIP(Classical IP over ATM): – group of ATM stations are divided into Logical IP Subnet(LIS), interconn
ected via router. Each Logical IP subnetwork(LIS) has an ATM ARP server for address resolution
– All members(IP end system) in the same LIS must use the same IP address prefix
LIS1
LIS3 LIS4 LIS5LIS6
LIS2
RouterRouter
Router RouterRouter
ATM network
17Prof. Younghee Lee17
IP Switching How to use ATM hardware without the software.
– ATM switches are very fast data switches– software adds overhead, cost
The idea is to identify flows at the IP level and to create specific VCs to support these flows.– flows are identified on the fly by monitoring traffic– flow classification can use addresses, protocol types, ...– can distinguish based on destination, protocol, QoS
Once established, data belonging to the flow bypasses level 3 routing.– never leaves the ATM switch
Interoperates fine with “regular” IP routers.– detects and collaborates with neighboring IP switches
18Prof. Younghee Lee18
IP Switching
Flows– any sustained traffic between end points across a network
» consist of a collection of flows with different characteristics, including different traffic profiles and different QoS requirements
» flows: based on the applications running over TCP/IP, UDP/IP or raw IP.– How to know which flows would benefit from delivery across ATM virtual
channels, bypassing the router function ?» Application declare the traffic profile and QoS requirements of the flow
IPv4 provides only limited capability IPv6 flow label field is well suited but not widely deployed RSVP provides the way to identify specific flow but not widely deployed
» To do flow analysis classify traffic on the basis of its likely flow characteristics “Relatively small percentage of flows are of long duration and carry a
high percentage of packets.”
19Prof. Younghee Lee19
An Alternative: Tag Switching Instead of monitoring traffic to identify flows to op
timize, use routing information to guide the creation of “switched” paths.– Switched paths are set up as a side effect of filling in fo
rwarding tables
Generalize to other types of hardware. Also introduced stackable tags.
– Made it possible to temporarily merge flows and to demultiplex them without doing an IP route lookup
– Requires variable size field for tag
A
B
A
B
A
B
C
C
20Prof. Younghee Lee20
IP Switching versus Tag Switching
Flows versus routes.– tags explicitly cover groups of routes– tag bindings set up as part of route establishment– flows in IP switching are driven by traffic and detected
by “filters”» Supports both fine grain application flows and coarser grain flow
groups
Stackable tags.– provides more flexibility
Generality– IP switching focuses on ATM– not clear that this is a fundamental difference
21Prof. Younghee Lee21
MPLS
Goal of MPLS group in IETF: To develop a standard for integration of layer 2 switching with layer 3 routing in order to improve price/performance of network layer routing, scalability of network layer and provide great flexibility in providing new routing service
Core MPLS components– Basic Routing Approach: use OSPF, BGP without change– Labels: semantics, granularity, assignment, stack/forwarding
operation– Encapsulation: Label swapping: encoded in a layer 2 header
22Prof. Younghee Lee22
MPLS capable routers
a.k.a. label-switched router forwards packets to outgoing interface based
only on label value (don’t inspect IP address)– MPLS forwarding table distinct from IP forwarding
tables signaling protocol needed to set up forwarding
– RSVP-TE– forwarding possible along paths that IP alone would
not allow (e.g., source-specific routing) !!– use MPLS for traffic engineering
must co-exist with IP-only routers
23Prof. Younghee Lee23
Elements of a wireless network
network infrastructure
base station typically connected to wir
ed network relay - responsible for se
nding packets between wired network and wireless host(s) in its “area”– e.g., cell towers 802.
11 access points
24Prof. Younghee Lee24
Characteristics of selected wireless link standards
384 Kbps384 Kbps
56 Kbps56 Kbps
54 Mbps54 Mbps
5-11 Mbps5-11 Mbps
1 Mbps1 Mbps
802.15
802.11b
802.11{a,g}
IS-95 CDMA, GSM
UMTS/WCDMA, CDMA2000
.11 p-to-p link
2G
3G
Indoor
10 – 30m
Outdoor
50 – 200m
Mid rangeoutdoor
200m – 4Km
Long rangeoutdoor
5Km – 20Km
25Prof. Younghee Lee25
Elements of a wireless network
network infrastructure
infrastructure mode base station connects
mobiles into wired network
handoff: mobile changes base station providing connection into wired network
26Prof. Younghee Lee26
Elements of a wireless network
Ad hoc mode no base stations nodes can only transmit
to other nodes within link coverage
nodes organize themselves into a network: route among themselves
27Prof. Younghee Lee27
MAC MAC Problems in wireless network: to use CSMA/CD
– Collision Detection(CD) does not work– CS might not work in some case( if a terminal is “hidden”)
Hidden terminal problem– Nodes A and C cannot hear each other
» Node A : currently transmitting to B» Node C : wants to transmit to B» Transmissions by nodes A and C can collide at node B
• Nodes A and C are hidden from each other
A B C
28Prof. Younghee Lee28
MAC Exposed terminal problem
– Node C cannot send to D due to carrier of B sense » Node B : currently transmitting to A» Node C : wants to transmit to D» Carrier of C doesn’t interfere A’s reception, Carrier of B doesn’t interfere D’s
reception Waiting is not necessary
» But C is waiting since it sense carrier of B
– C is exposed to B
A B C D
29Prof. Younghee Lee29
CDMA Encode/Decode
slot 1 slot 0
d1 = -1
1 1 1 1
1- 1- 1- 1-
Zi,m= di.cmd0 = 1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 11
1-1- 1- 1-
slot 0channeloutput
slot 1channeloutput
channel output Zi,m
sendercode
databits
slot 1 slot 0
d1 = -1d0 = 1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 11
1-1- 1- 1-
slot 0channeloutput
slot 1channeloutputreceiver
code
receivedinput
Di = Zi,m.cmm=1
M
M
30Prof. Younghee Lee30
CDMA: two-sender interference
31Prof. Younghee Lee31
IEEE 802.11 Wireless LAN
802.11b– 2.4-5 GHz unlicensed
radio spectrum– up to 11 Mbps– direct sequence spread
spectrum (DSSS) in physical layer
» all hosts use same chipping code
– widely deployed, using base stations
802.11a – 5-6 GHz range– up to 54 Mbps
802.11g – 2.4-5 GHz range– up to 54 Mbps
All use CSMA/CA for multiple access
All have base-station and ad-hoc network versions
32Prof. Younghee Lee32
802.11 LAN architecture
wireless host communicates with base station– base station = access poi
nt (AP) Basic Service Set (BSS) (aka
“cell”) in infrastructure mode contains:– wireless hosts– access point (AP): base st
ation– ad hoc mode: hosts only
BSS 1
BSS 2
Internet
hub, switchor routerAP
AP
33Prof. Younghee Lee33
802.11: Channels, association 802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at
different frequencies; 3 non-overlapping– AP admin chooses frequency for AP– interference possible: channel can be same as that chosen by
neighboring AP!
host: must associate with an AP– scans channels, listening for beacon frames containing AP’s
name (SSID) and MAC address– selects AP to associate with; initiates association protocol– may perform authentication [Chapter 8]– will typically run DHCP to get IP address in AP’s subnet
34Prof. Younghee Lee34
IEEE 802.11: multiple access Like Ethernet, uses CSMA:
– random access– carrier sense: don’t collide with ongoing transmission
Unlike Ethernet:– no collision detection – transmit all frames to completion– acknowledgment – because without collision detection, you don’
t know if your transmission collided or not
Why no collision detection?– difficult to receive (sense collisions) when transmitting due to we
ak received signals (fading)– can’t sense all collisions in any case: hidden terminal, fading
Goal: avoid collisions: CSMA/C(ollision)A(voidance)
35Prof. Younghee Lee35
MAC IFS: interframe space: depend on the type of frame to transmit
– SIFS: Short IFS» High priority frame before contending for channel» ACK frame, CTS frame, data transfer of a segmented MSDU, frames from station that are respon
ding to a poll from an AP, any frame from an AP during CFP
– PIFS: PCF-IFS» Used by PCF to gain priority access to the medium at the start of a CFP(Contention Free Period)
– DIFS: DCF-IFS» Used by the DCF to transmit data and management MPDU
DCF : CSMA/CA– Initial MAC PDU: medium idle for a period DIFS or greater -> transmit
» Medium busy -> wait random backoff time to schedule a reattempt
– Reattempt: decrement a counter each time an idle contention slot transpire – After successful frame transmission -> backoff procedure to transmit next frame
Busy Medium SIFS
PIFS
DIFSContentionWIndow
Next
Frame
36Prof. Younghee Lee36
IEEE 802.11 MAC Protocol: CSMA/CA
802.11 sender
1 if sense channel idle for DIFS then
- transmit entire frame (no CD)
2 if sense channel busy then
- start random backoff time
- timer counts down while channel idle
- transmit when timer expires
- if no ACK, increase random backoff interval, repeat 2
802.11 receiverif frame received OK
- return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
37Prof. Younghee Lee37
RTS/CTS
idea: allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames
optional; not typically used sender first transmits small request-to-send (RTS) packets to A
P using CSMA– RTSs may still collide with each other (but they’re short)
AP broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes
– sender transmits data frame– other stations defer transmissions
Avoid data frame collisions completely using small reservation packets!
38Prof. Younghee Lee38
Collision Avoidance: RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
39Prof. Younghee Lee39
hub or switch
AP 2
AP 1
H1 BBS 2
BBS 1
802.11: mobility within same subnet
router
H1 remains in same IP subnet: IP address can remain same
switch: which AP is associated with H1?– self-learning (Ch. 5):
switch will see frame from H1 and “remember” which switch port can be used to reach H1
40Prof. Younghee Lee40
Mradius ofcoverage
S
SS
P
P
P
P
M
S
Master device
Slave device
Parked device (inactive)P
802.15: personal area network
less than 10 m diameter replacement for cables
(mouse, keyboard, headphones)
ad hoc: no infrastructure master/slaves:
– slaves request permission to send (to master)
– master grants requests
802.15: evolved from Bluetooth specification– 2.4-2.5 GHz radio band– up to 721 kbps
41Prof. Younghee Lee41
Mobile Switching
Center
Public telephonenetwork, andInternet
Mobile Switching
Center
Components of cellular network architecture
connects cells to wide area net manages call setup (more later!) handles mobility (more later!)
MSC
covers geographical region base station (BS) analogous to 802.11 AP mobile users attach to network through BS air-interface: physical and link layer protocol between mobile and BS
cell
wired network
42Prof. Younghee Lee42
Cellular networks: the first hop
Two techniques for sharing mobile-to-BS radio spectrum
combined FDMA/TDMA: divide spectrum in frequency channels, divide each channel into time slots
CDMA: code division multiple access frequency
bands
time slots
43Prof. Younghee Lee43
Cellular standards: brief survey
2G systems: voice channels IS-136 TDMA: combined FDMA/TDMA (north america) GSM (global system for mobile communications): combi
ned FDMA/TDMA – most widely deployed
IS-95 CDMA: code division multiple access
IS-136 GSM IS-95GPRS EDGECDMA-2000
UMTS
TDMA/FDMADon’t drown in a bowlof alphabet soup: use thisoor reference only
44Prof. Younghee Lee44
Cellular standards: brief survey
2.5 G systems: voice and data channels for those who can’t wait for 3G service: 2G extensions general packet radio service (GPRS)
– evolved from GSM – data sent on multiple channels (if available)
enhanced data rates for global evolution (EDGE)– also evolved from GSM, using enhanced modulation – Date rates up to 384K
CDMA-2000 (phase 1)– data rates up to 144K– evolved from IS-95
45Prof. Younghee Lee45
Cellular standards: brief survey
3G systems: voice/data Universal Mobile Telecommunications Service (UMTS)
– GSM next step, but using CDMA CDMA-2000
….. more (and more interesting) cellular topics due to mobility (stay tuned for details)