Title: Chapter 6 Medium Access Control Protocols and Local Area Networks
1Chapter 6 Medium Access Control Protocols and
Local Area Networks
- Part I Medium Access Control
- Part II Local Area Networks
2Chapter 6Medium Access Control Protocols and
Local Area Networks
- Multiple Access Communications
3Networking (Network access lay
- Point to point communication not usually
practical - Devices are too far apart
- Large set of devices would need impractical
number of connections - Solution is a communications network
- Wide Area Network (WAN)
- Large geographical area
- Local Area Network (LAN)
- Smaller scope
- Building or small campus
- Usually owned by same organization
4LAN Topologies
5NetworkingConfiguration
Typical configuration
6Multiple Access Communications
- Shared media basis for broadcast networks
- Inexpensive radio over air copper or coaxial
cable - M users communicate by broadcasting into medium
- Key issue How to share the medium?
Wire Radio Fiber
7Random Access
Multitapped Bus
Transmit when ready
Transmissions can occur need retransmission
strategy
8Chapter 6Medium Access Control Protocols and
Local Area Networks
9ALOHA
- Wireless link to provide data transfer between
main campus remote campuses of University of
Hawaii - Simplest solution just do it
- A station transmits whenever it has data to
transmit - If more than one frames are transmitted, they
interfere with each other (collide) and are lost - If ACK not received within timeout, then a
station picks random backoff time (to avoid
repeated collision) - Station retransmits frame after backoff time
First transmission
Retransmission
Backoff period B
t
t0
t0X
t0-X
t0X2tprop? B
t0X2tprop
Vulnerable period
Time-out
10Slotted ALOHA
- Time is slotted in X seconds slots
- Stations synchronized to frame times
- Stations transmit frames in first slot after
frame arrival - Backoff intervals in multiples of slots
Backoff period B
t
(k1)X
t0 X2tprop
kX
t0 X2tprop B
Time-out
Vulnerableperiod
Only frames that arrive during prior X seconds
collide
11Carrier Sensing Multiple Access (CSMA)
- A station senses the channel before it starts
transmission - If busy, either wait or schedule backoff
(different options) - If idle, start transmission
- Vulnerable period is reduced to tprop (due to
channel capture effect) - When collisions occur they involve entire frame
transmission times - If tprop gtX (or if agt1), no gain compared to
ALOHA or slotted ALOHA
12CSMA Options
- Transmitter behavior when busy channel is sensed
- 1-persistent CSMA (most greedy)
- Start transmission as soon as the channel becomes
idle - Low delay and low efficiency
- Non-persistent CSMA (least greedy)
- Wait a backoff period, then sense carrier again
- High delay and high efficiency
- p-persistent CSMA (adjustable greedy)
- Wait till channel becomes idle, transmit with
prob. p or wait one mini-slot time re-sense
with probability 1-p - Delay and efficiency can be balanced
Sensing
13CSMA with Collision Detection (CSMA/CD)
- Monitor for collisions abort transmission
- Stations with frames to send, first do carrier
sensing - After beginning transmissions, stations continue
listening to the medium to detect collisions - If collisions detected, all stations involved
stop transmission, reschedule random backoff
times, and try again at scheduled times - In CSMA collisions result in wastage of X seconds
spent transmitting an entire frame - CSMA-CD reduces wastage to time to detect
collision and abort transmission
14CSMA-CD Application Ethernet
- First Ethernet LAN standard used CSMA-CD
- 1-persistent Carrier Sensing
- R 10 Mbps
- tprop 51.2 microseconds
- 512 bits 64 byte slot
- accommodates 2.5 km 4 repeaters
- Truncated Binary Exponential Backoff
- After nth collision, select backoff from 0, 1,,
2k 1, where kmin(n, 10)
15Chapter 6Medium Access Control Protocols and
Local Area Networks
- Part II Local Area Networks
- Overview of LANs
- Ethernet
- Token Ring and FDDI
- 802.11 Wireless LAN
- LAN Bridges
16Chapter 6Medium Access Control Protocols and
Local Area Networks
17What is a LAN?
- Local area means
- Private ownership
- freedom from regulatory constraints of WANs
- Short distance (1km) between computers
- low cost
- very high-speed, relatively error-free
communication - complex error control unnecessary
- Machines are constantly moved
- Keeping track of location of computers a chore
- Simply give each machine a unique address
- Broadcast all messages to all machines in the LAN
- Need a medium access control protocol
18Typical LAN Structure
Refer to sl.25
- Transmission Medium
- Network Interface Card (NIC)
- Unique MAC physical address
Ethernet Processor
ROM
19Chapter 6Medium Access Control Protocols and
Local Area Networks
20IEEE 802.3 MAC Ethernet
- MAC Protocol
- CSMA/CD
- Slot Time is the critical system parameter
- upper bound on time to detect collision
- upper bound on time to acquire channel
- upper bound on length of frame segment generated
by collision - quantum for retransmission scheduling
- maxround-trip propagation, MAC jam time
- Truncated binary exponential backoff
- for retransmission n 0 lt r lt 2k, where
kmin(n,10) - Give up after 16 retransmissions
21IEEE 802.3 MAC Frame
802.3 MAC Frame
7
1
6
6
2
4
Destination address
Source address
Information
FCS
Pad
Preamble
Length
SD
Synch
Start frame
64 - 1518 bytes
- Every frame transmission begins from scratch
- Preamble helps receivers synchronize their clocks
to transmitter clock - 7 bytes of 10101010 generate a square wave
- Start frame byte changes to 10101011
- Receivers look for change in 10 pattern
22IEEE 802.3 MAC Frame
23IEEE 802.3 MAC Frame
- Length bytes in information field
- Max frame 1518 bytes, excluding preamble SD
- Max information 1500 bytes 05DC
- Pad ensures min frame of 64 bytes
- FCS CCITT-32 CRC, covers addresses, length,
information, pad fields - NIC discards frames with improper lengths or
failed CRC
24DIX Ethernet II Frame Structure
- DIX Digital, Intel, Xerox joint Ethernet
specification - Type Field to identify protocol of PDU in
information field, e.g. IP, ARP - Framing How does receiver know frame length?
- physical layer signal, byte count, FCS
25Ethernet Hubs Switches
Twisted Pair Cheap Easy to work
with Reliable Star-topology CSMA-CD
Twisted Pair Cheap Bridging increases
scalability Separate collision domains Full
duplex operation
26Fast Ethernet
Table 6.4 IEEE 802.3 100 Mbps Ethernet medium
alternatives
- To preserve compatibility with 10 Mbps Ethernet
- Same frame format, same interfaces, same
protocols - Hub topology only with twisted pair fiber
- Bus topology coaxial cable abandoned
- Category 3 twisted pair (ordinary telephone
grade) requires 4 pairs - Category 5 twisted pair requires 2 pairs (most
popular) - Most prevalent LAN today
27Gigabit Ethernet
Table 6.3 IEEE 802.3 1 Gbps Fast Ethernet medium
alternatives
- Slot time increased to 512 bytes
- Small frames need to be extended to 512 B
- Frame bursting to allow stations to transmit
burst of short frames - Frame structure preserved but CSMA-CD essentially
abandoned - Extensive deployment in backbone of enterprise
data networks and in server farms
2810 Gigabit Ethernet
Table 6.5 IEEE 802.3 10 Gbps Ethernet medium
alternatives
- Frame structure preserved
- CSMA-CD protocol officially abandoned
- LAN PHY for local network applications
- WAN PHY for wide area interconnection using SONET
OC-192c - Extensive deployment in metro networks
anticipated
29Typical Ethernet Deployment
30Chapter 7Packet-Switching Networks
- Network Services
- Packet Network Topology
- Datagrams and Virtual Circuits
- Routing in Packet Networks
- Shortest Path Routing
- \
31Chapter 7 Packet-Switching Networks
32Network Layer
- Network Layer the most complex layer
- Requires the coordinated actions of multiple,
geographically distributed network elements
(switches routers) - Must be able to deal with very large scales
- Billions of users (people communicating
devices) - Biggest Challenges
- Addressing where should information be directed
to? - Routing what path should be used to get
information there?
33Packet Switching
- Transfer of information as payload in data
packets - Packets undergo random delays possible loss
- Different applications impose differing
requirements on the transfer of information
34Network Service
- Network layer can offer a variety of services to
transport layer - Connection-oriented service or connectionless
service - Best-effort or delay/loss guarantees
35Network Layer Functions
- Essential
- Routing mechanisms for determining the set of
best paths for routing packets requires the
collaboration of network elements - Forwarding transfer of packets from NE inputs
to outputs - Priority Scheduling determining order of
packet transmission in each NE - Optional congestion control, segmentation
reassembly, security
36Chapter 7Packet-Switching Networks
37LAN Concentration
Switch / Router
- LAN Hubs and switches in the access network also
aggregate packet streams that flows into switches
and routers
38Campus Network
Servers have redundant connectivity to backbone
Organization Servers
To Internet or wide area network
s
s
Gateway
Backbone
R
R
R
S
S
S
R
Departmental Server
R
R
s
s
s
High-speed campus backbone net connects dept
routers
Only outgoing packets leave LAN through router
s
s
s
s
s
s
39Connecting to Internet Service Provider
Internet service provider
Border routers
Campus Network
Border routers
Interdomain level
Autonomous system or domain
Intradomain level
s
LAN
network administered by single organization
s
s
40Key Role of Routing
- How to get packet from here to there?
- Decentralized nature of Internet makes routing a
major challenge - Interior gateway protocols (IGPs) are used to
determine routes within a domain - Exterior gateway protocols (EGPs) are used to
determine routes across domains - Routes must be consistent produce stable flows
- Scalability required to accommodate growth
- Hierarchical structure of IP addresses essential
to keeping size of routing tables manageable
41Chapter 7Packet-Switching Networks
- Datagrams and Virtual Circuits
42The Switching Function
- Dynamic interconnection of inputs to outputs
- Enables dynamic sharing of transmission resource
- Two fundamental approaches
- Connectionless
- Connection-Oriented Call setup control,
Connection control
43Packet Switching Network
- Packet switching network
- Transfers packets between users
- Transmission lines packet switches (routers)
- Origin in message switching
- Two modes of operation
- Connectionless
- Virtual Circuit
44Packet Switching - Datagram
- Messages broken into smaller units (packets)
- Source destination addresses in packet header
- Connectionless, packets routed independently
(datagram) - Packet may arrive out of order
- Pipelining of packets across network can reduce
delay, increase throughput - Lower delay that message switching, suitable for
interactive traffic
45Routing Tables in Datagram Networks
- Route determined by table lookup
- Routing decision involves finding next hop in
route to given destination - Routing table has an entry for each destination
specifying output port that leads to next hop - Size of table becomes impractical for very large
number of destinations
46Example Internet Routing
- Internet protocol uses datagram packet switching
across networks - Networks are treated as data links
- Hosts have two-port IP address
- Network address Host address
- Routers do table lookup on network address
- This reduces size of routing table
- In addition, network addresses are assigned so
that they can also be aggregated - Discussed as CIDR in Chapter 8
47Packet Switching Virtual Circuit
- Call set-up phase sets ups pointers in fixed path
along network - All packets for a connection follow the same path
- Abbreviated header identifies connection on each
link - Packets queue for transmission
- Variable bit rates possible, negotiated during
call set-up - Delays variable, cannot be less than circuit
switching
48Chapter 7Packet-Switching Networks
- Routing in Packet Networks
49Routing in Packet Networks
- Three possible (loopfree) routes from 1 to 6
- 1-3-6, 1-4-5-6, 1-2-5-6
- Which is best?
- Min delay? Min hop? Max bandwidth? Min cost?
Max reliability?
50Creating the Routing Tables
- Need information on state of links
- Link up/down congested delay or other metrics
- Need to distribute link state information using a
routing protocol - What information is exchanged? How often?
- Exchange with neighbors Broadcast or flood
- Need to compute routes based on information
- Single metric multiple metrics
- Single route alternate routes
51Routing Algorithm Requirements
- Responsiveness to changes
- Topology or bandwidth changes, congestion
- Rapid convergence of routers to consistent set of
routes - Freedom from persistent loops
- Optimality
- Resource utilization, path length
- Robustness
- Continues working under high load, congestion,
faults, equipment failures, incorrect
implementations - Simplicity
- Efficient software implementation, reasonable
processing load
52Centralized vs Distributed Routing
- Centralized Routing
- All routes determined by a central node
- All state information sent to central node
- Problems adapting to frequent topology changes
- Does not scale
- Distributed Routing
- Routes determined by routers using distributed
algorithm - State information exchanged by routers
- Adapts to topology and other changes
- Better scalability
53Static vs Dynamic Routing
- Static Routing
- Set up manually, do not change requires
administration - Works when traffic predictable network is
simple - Used to override some routes set by dynamic
algorithm - Used to provide default router
- Dynamic Routing
- Adapt to changes in network conditions
- Automated
- Calculates routes based on received updated
network state information
54Routing Tables in Datagram Packet Networks
55Non-Hierarchical Addresses and Routing
- No relationship between addresses routing
proximity - Routing tables require 16 entries each
56Hierarchical Addresses and Routing
- Prefix indicates network where host is attached
- Routing tables require 4 entries each
57Flat vs Hierarchical Routing
- Flat Routing
- All routers are peers
- Does not scale
- Hierarchical Routing
- Partitioning Domains, autonomous systems,
areas... - Some routers part of routing backbone
- Some routers only communicate within an area
- Efficient because it matches typical traffic flow
patterns - Scales
58Specialized Routing
- Flooding
- Useful in starting up network
- Useful in propagating information to all nodes
- Deflection Routing
- Fixed, preset routing procedure
- No route synthesis
59Chapter 7Packet-Switching Networks
60Shortest Paths Routing
- Many possible paths connect any given source and
to any given destination - Routing involves the selection of the path to be
used to accomplish a given transfer - Typically it is possible to attach a cost or
distance to a link connecting two nodes - Routing can then be posed as a shortest path
problem
61Routing Metrics
- Means for measuring desirability of a path
- Path Length sum of costs or distances
- Possible metrics
- Hop count rough measure of resources used
- Reliability link availability BER
- Delay sum of delays along path complex
dynamic - Bandwidth available capacity in a path
- Load Link router utilization along path
- Cost
62Shortest Path Approaches
- Distance Vector Protocols
- Neighbors exchange list of distances to
destinations - Best next-hop determined for each destination
- Ford-Fulkerson (distributed) shortest path
algorithm - Link State Protocols
- Link state information flooded to all routers
- Routers have complete topology information
- Shortest path ( hence next hop) calculated
- Dijkstra (centralized) shortest path algorithm
63Distance VectorDo you know the way to San Jose?
San Jose 294
San Jose 392
San Jose 596
San Jose 250
64Dijkstra Algorithm Finding shortest paths in
order
Find shortest paths from source s to all other
destinations
Closest node to s is 1 hop away
2nd closest node to s is 1 hop away from s or w
3rd closest node to s is 1 hop away from s, w,
or x
65Source Routing
- Source host selects path that is to be followed
by a packet - Strict sequence of nodes in path inserted into
header - Loose subsequence of nodes in path specified
- Intermediate switches read next-hop address and
remove address - Source host needs link state information or
access to a route server - Source routing allows the host to control the
paths that its information traverses in the
network - Potentially the means for customers to select
what service providers they use
66Example
3,6,B
6,B
1,3,6,B
1
3
B
6
A
4
B
Source host
2
Destination host
5