Network Interface Layer
MIS 507
Prasad Kularatne
Objective
Understand the functions behind Physical layer and
Data Link layer of the OSI model with more in-depth
treatment of the latter
Framing & Synchronization, Error Control, Flow
Control, Reliable Delivery
Understand the popular data link layer protocol
implementations
Ethernet
Wi-Fi
PPP
Physical Layer
Physical Layer
Standardizes transmission media
Cable types and specifications
Encoding and Decoding
Convert electrical pulses into signals that can be
transmitted over the medium
Manchester codes, 8B/10B etc.
Common layer-1 communications
Ethernet, xDSL (ADSL, SDSL), Frame Relay, X.25, SONET,
ATM, GSM, HSDPA, Wireless LAN
Note: We will not go into details of the Physical Layer
Encoding/Decoding
Determines how the binary data is represented on the
link or how a given bit stream should be converted into
signals that can be transmitted over the media
Allows clock synchronization
Reduces in DC content (for electrical signals)
Detects and correct errors
Line codes and Block codes
Line codes: RZ, NRZ, NRZI, Manchester coding
Block Codes: 4B5B, 8B10B
Q: Which line coding/block coding are used in Ethernet, PPP and WLAN?
Data Link Layer
Data Link Layer
Responsible for transport of packets received from the
network layer in a reliable manner to the immediate link
destination
Access control to physical media
To allow many nodes to share a common transmission medium
Framing
Synchronize the sender and receiver
Aid in devising error control mechanisms
Error control works on chunks of data rather than on a continuous
steam of bits
Efficient switching
Data Link Layer (cntd.)
Error Control
Detection of errors occurred in transit
How many bit errors can be detected?
Correction of errors
Detect and errors have occurred
In which bit position has the errors occurred
Flow Control
Address the problem of fast sender overl0ading a busy
receiver
Uses a feedback mechanism to let sender know that he
is sending too much
Data Link layer in context
Data Link Layer termination
Ethernet PPP
Source: Computer Networks, A Tanenbaum
Media Access Control
When to listen , when to transmit and how to handle
contention
Broadcast media vs. Point-to-Point
Typically original Ethernet LAN’s are broadcast and
WAN’s are P2P
Broadcast media is shared
Mechanism to control access to media should be in place
Media Access Control (MAC)
MAC protocols: CSMA
CS: Carrier Sense -> Is there anyone transmitting?
MA: Multiple Access -> I can hear what others can hear
When to transmit depends on how you would want to
handle the contention
CSMA/CD: Collisions are NOT prevented, detect them
and let others know of them
Used in original Ethernet standard
CSMA/CA: Collisions are prevented as much as possible
Used in Wireless LAN’s
Obviously more overheads, less effective throughput
CSMA/CD vs. CSMA/CA
Detection of collisions are possible in wired, but virtually
impossible in wireless media
Wireless medium is essentially half-duplex
Research is under way for full duplex wireless
Strength of the transmitted signal essentially masks detection of
any other node transmission
If you cannot detect collisions you need to avoid occurring them as
much as possible
In Wireless LAN’s negotiate for media access
This negotiation tells other nodes not to transmit till the intended
communication is complete
Framing: What is it?
At the Sender: Packets received has to be packaged into
frames and sent reliably over the unreliable physical media
At the Receiver: Identify where the frame starts and where
it ends
Requires some special bit sequence to indicate the start and the end
Synchronizing sender and receiver for frame transmission
Where does the frame starts and where does it end
Framing: Approaches
Fixed length
Send a special character at the beginning and end of
the frame
Send a special flag sequence at the beginning and end
of the frame
What if the special character or flag sequence occurs
in actual data?
Error Control
Error Detection & Correction and a mechanism to
deal with detected errors if correction is not
possible
Can use either
Error-Correcting Codes (ECC)
Not all errors can be corrected
Usage: Many wireless networks
Error-Detecting Codes (EDC)
Just detect errors and deal with them (may be reject them)
Usage: Most wired networks (low BER and fast transmission
speeds)
Error Detection
Introduces some additional bits/bytes into the frame
header
Mechanisms
Parity checking (Even or Odd parity)
Checksum
Cyclic Redundancy Check (CRC)
Not all errors can be detected
Residual errors may remain
A good mechanism must minimize the residual errors
How to deal with residual errors?
Error Correction
Mechanisms
FEC: Forward Error Correction
ARQ: Automatic Repeat Request
FEC is used when it is important to mitigate latency
than to avoid errors
Voice, video transmission
It is OK to lose one or two frames that incurring latency if it
has to retransmit!
E.g. Hamming Codes
Reliable Delivery
Mechanism: ARQ
Acknowledge the received frame
Timer to stop waiting indefinitely for an ACK
Sequence Numbering
Identify what is acknowledged
Distinguish between transmissions and retransmissions
Protocols
Idle ARQ: Stop and Wait
Continuous ARQ: Sliding Window protocols
n-bit sliding window
Go-back-n
Selective Repeat
Go-Back-N
Receiver Windows Size = 1; Sender Windows Size = N
The sender keeps transmitting until the number of
unacknowledged frames equals its window size
Still if it doesn’t receive what it expects it starts
resending everything in the window
Source: Computer Networks, A Tanenbaum
Go-Back-N issues
A pipeline (continuing to send frames when the past
frames have not yet been acknowledged) is a good idea
Fairly simple and fast mechanism and Frames are
always received in order, no need to re-order
When the pipeline breaks, a lot of retransmission is
needed
Can we avoid unnecessarily sending frames?
Selective Repeat ARQ
Receiver Windows Size = 1; Sender Windows Size = N
The sender keeps transmitting frames till a NACK is received,
then it starts resending everything not acknowledged.
The receiver can buffer (and reorder) frames after sending a
NACK.
No need for sender to re-send buffered frames
Source: Computer Networks, A Tanenbaum
Selective Repeat ARQ issues
Assumptions
A pipeline is a good idea
Unique sequence numbers can be generated and sent
Very fast and when pipeline breaks less
retransmissions are required
But frames are received out of order when pipeline
breaks, DLL has to reassemble
Flow Control
Idea: Sender does not flood the receiver, but maximizes
throughput
Sender throttles until receiver grants permission
Same Sliding Window protocols are used with the receiver
window tuned based on the size of receive buffer space
Mechanism
To advertise Receiver window size (use ACK frame)
To block the Sender if Receiver Windows size is zero
Flow Control (cntd.)
Receiver Window size
Increases when network layer takes control
Decreases when packets are received from the sender
Sender window size
Increases when ACK’s are received
Packets in sender window must be buffered at source
Why? – May be needed for retransmissions
Flow Control Example Receiver
Sender Receiver Buffer
Application Does 0K 4K
a 2K Write 2K SEQ=0 Empty
2K
8
=2 0 48 , WIN=204
ACK
Application Does
a 3K Write
2K SEQ=
2048
Full
Sender is = 409 6, WIN=0
AC K Application
blocked
Reads 2K
8
=4 0 96 , WIN=204
ACK 2K
Sender may
send up to 2K
1K SEQ=
4096
1K 2K
Individual Assignment
Examine what Media Access Control, Error control, flow control
and framing techniques are used in the following DLL protocols
Ethernet
Wi-Fi
Ethernet Virtual LAN’s are a layer-2 technology that allows
multiple logical networks to be carved out from a single physical
network. With Wireless LAN’s becoming commonplace in todays
enterprise network access layer, it is important to extend Ethernet
VLAN’s to Wireless LAN environment as well. Briefly describe how
Wireless LAN’s can accommodate this requirement
Data Link Layer
protocols
DLL Protocols
Most popular Data Link Layer protocols
Ethernet (most popular Wired-LAN protocol)
Wi-Fi (Wireless LAN protocol)
PPP (a popular WAN protocol)
We will discuss Ethernet protocol and Wi-Fi in detail
Ethernet
Ethernet
The most dominant DLL protocol in the networking
world
Demonstrated the fastest growth in last 5-7 years
Speed: 100Mbps -> 10Gbps (three orders of magnitude)
Range: LAN -> MAN -> WAN
Part of Physical layer and Data Link Layer
Standardized under IEEE 802.3
802.3u: Fast Ethernet
Same
802.3z: 1Gbps Ethernet Frame format
Addressing
802.3ae: 10Gbps Ethernet Ease of deployment
Cost effectiveness
Services to network layer
Connectionless unacknowledged service to the
network layer
Provide unreliable communication interface
Considering the reliability of frame transmissions in
LAN environments frame losses are less
Remember Concepts:
Connection oriented vs. Connectionless
Acknowledged vs. unacknowledged
MAC layer
CSMA/CD
Addresses issues with transmission over shared media
Ethernet Bus topology
Ethernet Hub
Half duplex operation
Not relevant today
Ethernet networks are full duplex, switched
10Gbps Ethernet does not even talk about this
Ethernet Framing
FCS
Preamble allows receiver to obtain clock synchronization
Addressing
6-byte world unique
Unicast, multicast, broadcast
Length of data field has to be between 46 Bytes – 1500 Bytes
(pad if less than 46 B)
Error control: 32-bit CRC [FCS]
Source: Computer Networks, A Tanenbaum
Ethernet Flow Control
Standardized under IEEE 802.3x
Paces a high speed transmitter
Can be a any network element: switch or a host
Receiving station upon overwhelming traffic ingestion
sends a PAUSE MAC control frame to a multicast
address
Control frame carries how long to wait before sending
the next message
Enhanced and used in Data Center Ethernet (DCE)
Discussed later
Ethernet Management Infrastructure
IEEE 802.1: LAN/MAN Bridging and Management
We will discuss those applicable to the management of
Ethernet based LAN’s
IEEE 802.1Q: VLAN’s
IEEE 802.1P: LAN based QoS
IEEE 802.1D: Spanning Tree Protocol
Source: www.10gea.org
IEEE 802.1Q: VLAN
VLAN: Gives a logical topology to LAN’s
Segments network load (traffic isolation)
Segments broadcast domains
Facilitates MAC’s (Moves, Adds, Changes)
Improves security
VLAN-aware switches vs. VLAN-aware hosts
Source: Computer Networks, A Tanenbaum
VLAN: Applications
Use of VLAN tagging in
Virtualized server environments
Blade Servers
Design LAN’s based on a topology aligned with
business organization rather than physical location of
network elements
Separate out LAN-based backup traffic, management
traffic to separate VLAN’s
IEEE 802.1P: Prioritization
Prioritization of LAN traffic
Level 7: Network-critical traffic (Routing)
Level 5 & 6: Delay-sensitive applications (interactive
video and voice)
Level 1 through 4: Controlled-load applications
streaming multimedia and business-critical traffic -
carrying SAP data- down to "loss eligible" traffic
Enhanced and used in offering flow control per
priority in Data Center Ethernet (discussed later)
IEEE 802.1D: Spanning Tree Protocol
Prevent loops from occurring in a LAN
Automatically activates redundant links in failure
scenarios
Idea
Go through each path in the LAN and figure out a
topology that is loop-free (Tree)
Determine the ISL ports that can be used to maintain
just enough connectivity among all segments (The tree
is spanning all segments)
Block all other ports
Spanning Tree Algorithm
All switches are assigned a Bridge ID
Select Root Bridge as the node with the lowest bridge ID and
MAC address
Mark Root Port in all other switches such that it has the least
cost to the Root Bridge
For each LAN segment, select the bridge with least cost to the
root bridge and mark the corresponding port as the
Designated Port
Forward frames only over Root & Designated ports and block
all others
Spanning Tree illustration
Bridge ID: 1 Bridge ID: 2
Root Port
Designated Port
Blocked Port
Bridge ID: 4
Bridge ID: 3
Note on Breaking the ties
• Equal cost paths through different bridges -> Select the path to the bridge with lowest Bridge ID
• Equal cost paths through the same bridge -> Select the path that connect to the lowest Port ID
STP Enhancements
Why? - To address the shortcomings of the conventional STP
Takes a long time to converge upon a bridge/link failure
Poor link utilization
IEEE 802.1W: Rapid Spanning Tree Protocol (RSTP)
Improve the convergence time
IEEE 802.1S: Multiple Spanning Tree Protocol (MSTP)
Use redundant links for load balancing
Traffic of different VLAN’s spans through different redundant links
between the same set of switches
Multiple Spanning Tree Protocol
Bridge ID: 1 Bridge ID: 2 Bridge ID: 1 Bridge ID: 2
Root for STPi1 Root for STPi2
Bridge ID: 3 Bridge ID: 4 Bridge ID: 3 Bridge ID: 4
Resulting traffic flow (all links used)
VLAN to MSTP instance
Mappings
VLANs 10,20,30 <-> STPi1
VLANs 15,25,35 <-> STPi2
Gigabit Ethernet
Why? - Proliferation of bandwidth hungry apps
Content networking, file serving, increase in concurrent
server connections
Compatible to Ethernet and Fast Ethernet (UTP Cat-5)
Same MAC layer as Fast Ethernet
Burrowed Physical Layer from Fibre Channel
Support for MM and SM fiber
8B/10B encoding
Support for jumbo frames
Ideal for high throughput applications
NFS, CIFS, iSCSI, backup traffic
Gigabit Ethernet overview
Source: Broadband Network Technologies, Technical University of Berlin
Gigabit Ethernet (Protocol Stack)
Source: Broadband Network Technologies, Technical University of Berlin
GigE – Distance specifications
Source: Broadband Network Technologies, Technical University of Berlin
10Gbps Ethernet
Objective I: Promote Ethernet’s LAN experience to
WAN’s - Ethernet Broadband
IEEE 802.1P and 802.1Q enables services provider
capabilities
Defines two PHY options LAN PHY and WAN PHY
Separate WAN PHY allows Ethernet over existing telco networks
Objective II: Data Center Ethernet
Increased load on LAN’s due to
Server virtualization
I/O consolidation
Ethernet Broadband
IEEE 802.1P and 802.1Q standards allow
Service differentiation (802.1P)
Traffic separation and security (VLAN)
Source: http://www.10gea.org/ethernet-wan.htm
Data Center Ethernet (DCE)
Architectural extensions to address increased traffic
load & new traffic types in Data Center caused by
Server virtualization and I/O consolidation
Also known as Converged Enhanced Ethernet (CEE)
IEEE 802.1Qbb: Priority Flow Control
IEEE 802.1Qau: Congestion Notification
IEEE 802.1Qaz: Bandwidth Management
IEEE 802.1Aq: Shortest Path Bridging
IEEE 802.1Qbb: Priority Flow Control
Combined use of Flow Control (IEEE 802.3x) and
Prioritization (IEEE 802.1p)
Send PAUSE frame on a per-user-priority basis
Loss sensitive protocols (Fibre Channel) to get a lossless lane
Ethernet Enhancements supporting I/O consolidation, Nuova Systems Inc.
IEEE 802.1Qaz: BW Management
Re-allocate the unused bandwidth in one traffic class to
another in need of more bandwidth
Allow for bursty LAN traffic while guaranteeing bandwidth
for Fibre Channel traffic
Ethernet Enhancements supporting I/O consolidation, Nuova Systems Inc.
Wi-Fi
What is Wi-Fi?
Its not a protocol, but a set of standards that
defines the compliance of devices to IEEE 802.11
IEEE 802.11 defines a set of protocols that
defines the physical and data link layers of
Wireless LAN
We will not discuss MAC, framing, flow control
and error control here
They are covered via the Assignment
Unlicensed Frequency Bands
Short-Wave Radio FM Broadcast
Infrared Wireless LAN
AM Broadcast Television
Cellular (840MHz)
Audio
NPCS (1.9GHz)
Extremely Very Low Medium High Very Ultra Super Infrared Visible Ultra- X-Rays
Low Low High High High Light violet
2.4–2.4835 GHz
5 GHz
83.5 MHz
(IEEE 802.11a)
(IEEE 802.11b,g)
IEEE 802.11n
IEEE 802.11n
Source: Wireless Protocols, Todd Lammle
WLAN design goals
Easy to use and plug-and-play setup
Enables operation globally over wireless
Uses license-free ISM band of frequencies
Low power operation
Extend the use to cover battery operated devices
Easily inter-operate with the existing wired
infrastructure protecting the committed investments
Support for mobility through roaming
Wi-Fi in IEEE 802
Broadband Mobility
IEEE 802.16e
WMAN
IEEE 802.16 / ETSI HiperMAN
WiMAX (256-FFT OFDM)
48+ km.
WLAN
IEEE 802.11x
Wi-Fi
100m.
WPAN
IEEE 802.15
Bluetooth
10m.
Source: Wireless Broadband Mobility, Shawn Taylor
WLAN terminology
Access Point (AP): Provides co-ordination of
communication within a BSS and provides services to
integrate with the Distribution System
Basic Service Set (BSS): One or more wireless nodes
that share a single Access Point (co-ordination
function)
Extended Service Set (ESS): One or more BSS’s
connected via Access Points
WLAN Terminology (Cntd.)
Distribution System (DS): Network that
interconnects several BSS’s to form an ESS
Portal: Function that allows BSS to integrate with
the non IEEE 802.11 network
WLAN terminology illustrated
802.11 LAN
BSS1 STA5
STA4
STA1 BSS3
Access Access Portal
Portal Point
Point
Distribution System (DS)
Access Portal
Point
STA2 STA3
BSS2
ESS
Portal function
802.11 LAN
BSS1 STA5
STA4
STA1 BSS3
Access Access
Point Point
Wireless
Distribution System (DS)
Access Portal
Point
802.3 LAN
STA2 STA3
BSS2
ESS
Services offered by a DS
Association, Re-association & de-association
Distribution service and Integration service
Source: CWAP Certified Wireless Analysis Professional Official Study Guide, Devin Akin and Jim Geier
WLAN topologies
Infrastructure WLAN
A set of wireless nodes whose communication is coordinated
via an access point
Ad-hoc WLAN
A set of wireless nodes that established communication
between them without a central coordinator
IEEE 802.11 standards
Criteria 802.11a 802.11b 802.11g 802.11n
Maximum Data Rate 54 Mbps 11 Mbps 54 Mbps 600 Mbps
DSSS or CCK DSSS or CCK or
Modulation Technique OFDM DSSS or CCK
or OFDM OFDM
RF-Band 5 GHz 2.4 GHz 2.4 GHz 2.4 GHz or 5 GHz
Number of Spatial Streams
1 1 1 1, 2, 3 or 4
Channel Width 20 MHz 20 MHz 20 MHz 20 MHz or 40 MHz
IEEE 802.11n
Need for higher data rates & longer range
Increased adoption of bandwidth hungry LAN applications
Voice, Video, Gaming & multimedia, file serving etc.
Need for more simplified and flexible WLAN deployments
Mainly increase in the range
Features introduced in IEEE 802.11n to address the
above requirements
Re-engineer the Physical layer
Enhance the MAC layer
IEEE 802.1n: Re-engineering PHY
Key technology - MIMO
Option for the use of an increased frequency band
Use of dual-band antennas – 40 MHz channel BW
Source: http://www.computerlanguage.com/ydict.html
MIMO
Uses a technique called Spatial Multiplexing
Input data stream is split into multiple streams and fed
into multiple transmit antennas
Each antenna transmit them in parallel
At the received parallel data streams are merged to
reconstruct the original data stream
IEEE 802.11n: Enhanced MAC layer
Block Acknowledgements
Send only one ACK for a number of frames
ACK overhead is minimized, hence the effective
throughput
Frame Aggregation
Increases the Maximum Frame Size at the MAC layer
ServiceFrames: 2304 Bytes -> 8 kB
Data Frames: 2304 Bytes -> 64 kB
Benefits especially voice and video traffic
End of Network
Interface Layer lecture