You are on page 1of 56

Multiple Access and

Local Area Networks


2G1316 Data
Communications and
Computer Networks

2E1623 Data Links and


Local Area Networks
Illustrations in this material are collected from

Behrouz A Forouzan, Data Communications


and Networking, 3rd edition, McGraw-Hill.
This Lecture

• Multiple access: CSMA/CD, CSMA/CA, token passing,


channelization

• LAN: characteristics, basic principles

• Protocol architecture

• Topologies

• LAN systems: Ethernet

• Extending LANs: repeater, bridge, router

• Virtual LANs

3
Communication on LANs

• Goal: simple and cheap solution


• Characteristics
ƒ small area, limited number of users, all nodes can
communicate directly
ƒ short and long sessions

• The use of shared medium and broadcast transmission


ƒ simple network elements, simple network management
• Property of LANs
ƒ propagation time << frame transmission time
o (Tpr << Ttr)
ƒ if a station transmits, all other will soon know about it

4
Multiple Access

• How to access a shared media in a controlled


fashion

5
MA—Multiple Access

• Aloha
ƒ Packet radio protocol
ƒ Random-access method based on acknowledgements
and backoffs

6
Aloha Protocol

7
Carrier Sense Multiple Access (CSMA)

• Carrier sense
ƒ Listen (sense) before sending

ƒ Do not send unless the medium is idle

• Reduces the possibility of collisions


ƒ Does not eliminate collisions

ƒ Propagation delay
o Takes time before all other stations can sense a
transmission

8
Persistence Strategy

Sense
Sense carrier
carrier Sense
Sense carrier
carrier
Wait
Wait
Yes Yes
Busy?
Busy? Busy?
Busy?
No No
Send
Send frame
frame Send
Send frame
frame

• 1-persistent • Non-persistent
ƒ Send as soon as channel is idle ƒ Wait a random period of time
before sensing again

9
p-Persistent

• When channel is
Sense
Sense carrier
carrier
idle
ƒ Send with Yes
Busy?
Busy?
probability p Wait
Wait No

ƒ Wait and then rr =


= random(0,
random(0, 1)
1)
sense again with
No
probability (1-p) rr <
< pp ??
Yes

Send
Send frame
frame

10
CSMA with Collision Detection (CSMA/CD)

• Exponential back-off
ƒ Wait 2N × max_propagation_time after collision, where N is number of transmission
attempts

• Send jam so other stations detect collision as well


11
Packet Size Versus Bus Length
S: frame size [bit]
S 2L
Ttr > 2T pr ⇔ > C: link capacity [bit/s]
L: bus length [m]
C v v: signal propagation speed [m/s]

• Two (or more) stations


sending at the same time

Ttr
Tpr
• Collisions must be
Tpr
detected by all stations
• Minimum packet size and
maximum bus length
ƒ 72 bytes (64 bytes at
data link layer) and 500
Station 1 Station 2
meters for 10Base5
(“Thick Ethernet”)

12
Wireless Networks—Hidden Terminal Problem

• Stations may not detect each


others signals

13
Wireless Networks—Signal Strength Problem

• To detect collisions, a station needs to compare


transmit and receive signals
• The signal from station’s own transmitter is much
stronger than the signals from other stations

14
CSMA/CA

• Collision detection does not work well on wireless networks


ƒ Problems with hidden terminals, signal strength differences, etc

• CSMA/CA—Carrier Sense Multiple Access with Collision


Avoidance
ƒ Control signals before transmission
ƒ Carrier sense:
o do not transmit immediately when medium gets idle (p-persistence)
o Wait random time
— lower collision probability

• Use acknowledgements (stop-and-wait!) to detect if


transmission is successful

15
CSMA/CA Procedure

16
IEEE 802.11 CSMA/CA Wait Procedure

• When medium tt =
= random(0,
random(0, maxwait)
maxwait)
becomes idle, wait a
random amount of Sense
Sense carrier
carrier
time
Yes
ƒ Only decrement timer Busy?
Busy?
while medium is idle! No
No
Decrement
Decrement tt
• Collision can only
happen if two stations No
tt =
= 00 ??
generate same timer
Yes
value
Send
Send frame
frame
17
CSMA/CA With RTS/CTS

• Request-to-send/clear-to-send (RTS/CTS) handshake


ƒ RTS/CTS frames contain Duration field
o Period of time the medium is reserved for transfer

ƒ Other stations remain quite during this period


ƒ Optional, as the overhead may be too high for small frames

18
IEEE 802.11 CDMA/CA Summary

• Link-layer acknowledgements
ƒ Stop-and-wait

• Randomized back-off timers


ƒ Counted down only while medium is
idle

• Optional RTS/CTS reservation


scheme
19
Controlled Access

Controlled
ControlledAccess
Access

Token
TokenPassing
Passing Reservations
Reservations Polling
Polling

20
Token Passing

• Token (a control frame) circulates among the


nodes
• The node that holds the token has the right to
transmit
• Used in Token Ring LAN
21
Token Passing Procedure

22
Channelization

• FDMA/WDMA
ƒ A station is allocated a frequency band (wavelength)
on an FDM (WDM) link

• TDMA
ƒ Entire bandwidth is one channel
ƒ A station is allocated time slots on a TDM link

• CDMA (Code Division Multiple Access)


ƒ Entire bandwidth is one channel
o Data from all inputs are transmitted at the same time

23
CDMA Multiplexing

• Bit is coded as a sequence of numbers (chips)


• Each station has a unique code
24
CDMA Demultiplexing

• Station can extract its chip sequence from the multiplexed sequence
• Codes are orthogonal

25
Local Area Networks (LANs)

• Ethernet by far the most popular


ƒ Originally from Xerox’s Palo Alto
Research Center (PARC) in 1976

• LAN standardization in IEEE


Project 802
ƒ Data link layer subdivision
o Logical Link Control (LLC)
o Medium Access Control (MAC)
26
IEEE Project 802

27
IEEE 802.3 MAC Frame Format

Data link layer frame

• 18 bytes of overhead at link layer (26 bytes on the wire)


• 48-bit addresses
ƒ Written as 00:90:27:25:3c:4e or 00-90-27-25-3c-4e
ƒ Multicast (8th bit is 1), unicast, or broadcast (all 1s)
• Length/PDU
ƒ Length if less than 1518
o IEEE 802.3 format
ƒ Otherwise PDU type
o DIX (DEC, Intel, Xerox) Ethernet format
• CRC-32

28
10Base5 (Thick Ethernet)

29
Switched Ethernet

• One port per station


• Full-duplex mode
ƒ No need for CSMA/CD
• MAC control sublayer added
ƒ Flow and error control
• Autonegotiation
ƒ As of Fast Ethernet (100 Mb/s)
30
10 and 100 Mb/s Ethernet

Ethernet Media Speed Distance Coding


Type Type (Mb/s) (m)
10Base-T Cat 3 UTP 10 100 Manchester

10Base-FL Multimode 10 2 000 Manchester


fiber
100Base-T Cat 5 UTP or 100 100 4B/5B + MLT-3
STP
100Base-FX Multimode fiber 100 2 000 4B/5B + NRZ-I

31
Gigabit Ethernet

Ethernet Media Speed Distance Coding


Type Type (Mb/s) (m)
1000Base-SX 850 nm 1 000 220 8B/10B + NRZ
multimode
1000Base-LX 1270-1350 nm 1 000 2 000 8B/10B + NRZ
singlemode or
multimode
1000Base-CX Copper 1 000 25 8B/10B + NRZ
jumpers
1000Base-T Cat 5e & 6 UTP 1 000 100 8B/10B + 4D-PAM5
(2 pairs)

32
10 Gigabit Ethernet
Ethernet Media Speed Distance (m) Coding and Format
Type Type (Mb/s)
10GBase-SR 850 nm 10 000 300 64B/66B
multimode
10GBase-SW 850 nm 10 000 300 64B/66B, SONET/SDH
multimode framing
10GBase-LR 1310 nm 10 000 10 000 64B/66B
singlemode
10GBase-LW 1310 nm 10 000 10 000 64B/66B, SONET/SDH
singlemode framing
10GBase-ER 1550 nm 10 000 40 000 64B/66B
singlemode
10GBase-EW 1550 nm 10 000 40 000 64B/66B, SONET/SDH
singlemode framing
10GBase-CX4 Copper jumpers 10 000 15 8B/10B

10GBase-LX4 4 × 3.125 Gb/s 10 000 240-300 (MM) 8B/10B


33
W-WDM 10 000 (SM)
Wireless LANs

• “Basic Service Set”


• Infrastructure mode (with Access Point)
• Ad hoc mode (without Access Point)
34
IEEE 802.11 Frame Format

• Additional address fields for


intermediate nodes, such as access
points

35
802.11 Wireless LAN Standards

Standard Spectrum Physical Data rate Compatible


rate

802.11 2.4 GHz 2 Mb/s 1.2 Mb/s -

802.11a 5.0 GHz 54 Mb/s 32 Mb/s -

802.11b 2.4 GHz 11 Mb/s 6-7 Mb/s 802.11

802.11g 2.4 GHz 54 Mb/s 32 Mb/s 802.11b


802.11

36
Extending LANs

• Why not one LAN?


ƒ Signal quality and network performance
o Declines with number of connected devices and
network diameter

ƒ Reliability
o Several self-contained units

ƒ Security
o Separation of traffic

ƒ Geography
o Connect LANs at different locations

37
Extending LANs

• Repeaters/hubs
ƒ Signal regeneration

• Bridges (two-layer switches)


ƒ Connects LANs that use same type of data link addresses
ƒ Often just called ”switches”
ƒ Traffic filtering

• Router (three-layer switches)


ƒ Routing at the network layer (IP)
ƒ Connects LANs (or links in general) of different technologies

• Beware: terminology is getting blurred!


ƒ “Smart switches”, “dual-speed hubs”, …

38
Repeaters

o Signal regenerator

o MAC protocol must be identical in all segments

o Collisions propagate to all segments

o A hub is a multiport repeater

39
Bridged Ethernet

• Share of bandwidth increases


• Probability of collisions decreases
ƒ Smaller collision domains

• Can connect LANs with different data link layers


protocols
ƒ Ethernet LAN and Wireless LAN

40
Bridging

• A bridge has a forwarding table that maps addresses to ports


• A bridge does not change the MAC address in a frame
ƒ Or any other part of the frame

• A bridge buffers frames while ports are busy

41
Learning Bridges

• How do bridges learn the location of the


stations?
ƒ For each arriving frame:
o Add source address (together with port number)
to the forwarding table

o Check if destination address is in the forwarding


table?
—if it is, transmit the frame on the respective port

—Otherwise, broadcast the frame on all ports

42
Learning Bridges Example

43
Learning Bridges—Loop Problem

44
Spanning Tree

• Purpose
ƒ Bridges dynamically discover a subset of the topology that
is loop-free (a tree)
ƒ Just enough connectivity so that:
o there is a path between every pair of segments where
physically possible
— the tree is spanning

• Each bridge has a unique ID


• A cost can be calculated for each path between two
bridges
• All bridges exchange configuration messages, called
bridge protocol data units (BPDUs)

45
Spanning Tree Process

1. The node with the smallest ID is selected the root bridge


2. Mark the port on each bridge with the least cost path
(shortest path, typically) to the bridge as a root port
ƒ On the root bridge, all ports are marked

3. On each LAN segment, select a designated bridge


ƒ Bridge with least cost path to root bridge
ƒ If two bridges have the same least cost, the bridge with
smallest ID is designated bridge
ƒ Mark the corresponding port as the designated port

4. Forward frames only on marked ports


ƒ Designated ports and root ports
ƒ Block on the others

46
Before Spanning Tree

47
Applying Spanning Tree

48
Forwarding Ports and Blocking Ports

49
Routers

Station Station
Router
Int. Internet Int.
LLC LLC LLC LLC
MAC MAC MAC MAC
PHY LAN PHY PHY LAN PHY

ƒ Connects LAN segments on Internet (IP) level

ƒ MAC protocols on the connected segments can be


different

50
Virtuell LANs (VLAN)

• Need a way to divide the LAN into


different parts
ƒ Without physical reconfiguration

• Moving stations without


reconfigurations
• Create virtual workgroups
• Keep broadcasts isolated
• Keep different protocols from each
other
51
VLAN Divides LAN Into Logical Groups

52
VLAN Grouping

• How is VLAN membership


determined?
ƒ Port number
o Ports 1, 2, 7: VLAN 1

o Ports 3, 4, 5, 6: VLAN 2

• MAC address

• Frame tagging
53
Frame Tagging

6 bytes 6 bytes 2 bytes 2 bytes 46-1500 bytes 6 bytes


Destination Source Tag Length/
DATA CRC
address address Header Type

TPID User VLAN


CFI
(81-00) Priority Identifier
16 bits 3 bits 1 bit 12 bits

• Tag header added to Ethernet header


ƒ IEEE 802.1Q

• 12-bit VLAN ID allows for 4096 VLANs


54
Summary

• Shared medium—multiple access


ƒ CSMA/CD, CSMA/CA

ƒ Channelization

• Ethernet
ƒ Frame format

ƒ Three generations

ƒ LAN protocol stack and MAC layer

• Extending LANs: repeaters, bridges, routers


ƒ Spanning tree

• Virtual LANs
55
Reading Instructions
• Behrouz A. Forouzan, ”Data Communications and Networking,” third edition
ƒ 13 Multiple Access
o 13.1 Random Access
o 13.2 Controlled Access
o 13.3 Channelization

ƒ 14 Local Area Networks: Ethernet


o 14.1 Traditional Ethernet
o 14.2 Fast Ethernet
o 14.3 Gigabit Ethernet

ƒ 15 Wireless LANs
o 15.1 IEEE 802.11
— CSMA/CA

ƒ 16 Connecting LANs, Backbone Networks, and Virtual LANs


o 16.1 Connecting Devices
o 16.3 Virtual LANs

56

You might also like