Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
104 views

Computer Communications and Networks

The document provides an overview of the history and development of computer networks and communications. It discusses some of the key milestones and innovations that have contributed to modern networks, including the development of packet switching in the 1960s, the creation of the ARPANET in the late 1960s, the invention of email in 1971, and the development of protocols like TCP and Ethernet in the early 1970s. It also outlines some examples of different network types, protocols, and technologies used at various layers of the TCP/IP model.

Uploaded by

siddhardha jetti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Computer Communications and Networks

The document provides an overview of the history and development of computer networks and communications. It discusses some of the key milestones and innovations that have contributed to modern networks, including the development of packet switching in the 1960s, the creation of the ARPANET in the late 1960s, the invention of email in 1971, and the development of protocols like TCP and Ethernet in the early 1970s. It also outlines some examples of different network types, protocols, and technologies used at various layers of the TCP/IP model.

Uploaded by

siddhardha jetti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 208

Computer Communications

and
Networks
CS 306 (2-0-2)
Dr. N. Raghu Kisore,
Assistant Professor, MEC
On the Shoulders of Giants
1961: Leonard Kleinrock published a work on packet
switching
1962: J. Licklider described a worldwide network of
computers called Galactic Network

1965: Larry Roberts designed the ARPANET that


communicated over long distance links

1971: Ray Tomilson invents email at BBN

1972: Bob Kahn and Vint Cerf invented TCP for reliable
packet transport
On the Shoulders of Giants
 1973: David Clark, Bob Metcalfe implemented
TCP and designed ethernet at Xerox PARC
 1975: Paul Mockapetris developed DNS system for
host lookup
 1980: Radia Perlman invented spanning tree
algorithm for bridging separate networks
 21st century??? What is the next big Idea?
And YOU are here
Networks in 21st century

 Wired Networks

 Wireless Networks

 Cellular Networks

 Deep space networks

 Sensor networks: zigbee, z-wave


Based on Purpose
Tor Net
High Speed Internet
Adhoc Networks
Dark Web
Deep Web
Internet Structure: Network of
Networks
Internet Structure: Network of
Networks
Deep Sea OFC
7 layer OSI
TCP/IP Stack: Overview
Application
(Server) Data
Transport Upper Layers
segments
Network
(Router)
packets Logical Link
(802.2) Logical Link (802.2)
Data Link

802.11b HR-DSSS
(Switch) frames

802.11a OFDM

802.11g OFDM
802.3 Ethernet
Medium Access

802.11 IR
Physical
(Hub,multiplexers
, modems) bits
Real World
TCP/IP Stack
Protocols at Various Layers
The 802.11 Protocol Stack
Comparison of Last Mile Wireless
Technologies
feature Bluetooth NFC Wi-Fi Infrared
Frequency 2.4Ghz 13.56Mhz 2.4Ghz 1-400Thz
Bandwidth Low Low High 0.75-15µ
(8kpbs) (424Kbps) (11Mbps)
Bit rate 2.1Mbps 424Kbps 600Mbps
Range 10m Few 100m <50Ft
centimeters
Security Less More secure More secure More secure
secure
Technology 802.15 ISO 13157 802.11 MISL, MISP
Operating Frequency
 ISM Band (2-5GHz)
• 2.4GHz Wi-Fi (a/b/g), Bluetooth (802.15.1), NFC, ZigBee (802.15.4)
• 5GHz Wi-Fi (ac/ad/n)
• 5-6GHz 802.11p New Driverless cars
 865-867 MHz (865.22MHz Z-Wave)
 Smart City: TV White Space spectrum (400-600MHz)
802.22, 802.11af, 802.11a/b/g

 quad band 2.5 GSM (850, 900, 1800, 1900) MHz


 3GSM 2.1 GHz
 4G LTE-advanced, Vo-LTE, WiMax (802.16e)
--2.3/2.5/3.5GHz
 5G (LTE Direct) 6GHz to 60GHz
Wi-Fi Technologies
Protocols
A protocol is a set of rules and formats that
govern the communication between two
communicating peers.
– Set of valid messages
– Meaning of each message

Is necessary for any function that requires co-


operation between peers.
Definitions
Service Access points [SAP]
Protocol Data Units [PDU]
Service Data Units [SDU]
Service Access Points
Layer SAP Purpose
MAC type field
Network Layer protocol field indicates the type of transport packet
being carried (e.g. 1 = ICMP; 2= IGMP; 6
= TCP; 17= UDP).
Transport Layer port number identify the type of protocol being carried.
Ex: the values 0x0800 is used to identify
the IP network protocol, other values are
used to indicate other network layer
protocols*.

* Other network layer protocols are Novell IPX, AppleTalk, LAN Manager,
X.25, MPLS
Service Primitives

 Request: A primitive sent by layer (N + 1 ) to layer N to request a service. It invokes


the service and passes any required parameters.
 Indication: A primitive returned to layer (N + l) from layer N to advise of activation
of a requested service or of an action initiated by the layer N service.
 Response: A primitive provided by layer (N + 1) in reply to an indication primitive. It
may acknowledge or complete an action previously invoked by an indication
primitive.
 Confirm: A primitive returned to the requesting (N + l)st layer by the Nth layer to
acknowledge or complete an action previously invoked by a request primitive
PDU Vs SDU
PDU Vs SDU
Physical Layer
Data Encoding Techniques
Example Network
Attenuation in Signals
Physical Layer Devices
Modem: Digital Data, Analog Signals.
Codec: Analog Data, Digital Signals
• Multiplexing is also used here.

Wired LAN: Digital Data, Digital Signals


Multiplexer: Combine multiple i/p signals to
single o/p signal
Encoding Techniques
Wired networks.
• NRZ-L, NRZ-I, Manchester, differential Manchester

Wireless networks.
• PSK, FSK, ASK, QPSK, QAM-16, QAM-64
NRZ-L Codes
(Non-Return-to-Zero-Level)
Uses two different voltage levels (one positive
and one negative) as the signal elements for
the two binary digits.
• 0no voltage
• 1positive voltage
NRZ-I Codes
(Non-Return-to-Zero-Inverted)
0 No Voltage transition
1Voltage transition
Manchester Coding
0 low to high transition
1 high to low transition
Differential Manchester
Previous Bit Current Bit Transition
0 0 Swap
0 1 No change
1 0 Swap
1 1 No change
Multiplexing
Improve resource usage.
Group multiple users based on a physical
attribute:
• Frequency
• Time
• Space
• Code
• Wavelength
Multiplexing

Components
• Multiplexer
• De-multiplexer
• Link
Multiplexing
Frequency Division Multiplexing
Frequency Division Multiplexing

(a) Original Bandwidths (b) bandwidths raised in frequency


(c) The multiplexed channel
Time Division Multiplexing
Code Division Multiplexing
CDM produces a wideband, noise like signal,
and it occupies the entire range of frequencies
allocated to the system.
Discrimination between the signals is achieved
through the assignment of unique spreading
codes (all codes are orthogonal)
Shannon – Hartley Equation
𝑆
𝐶=𝐵 𝑙𝑜𝑔2 (1+ )
𝑁
Where,
C Channel capacity; bps
This is the maximum possible amount of
error free digital data that can be transmitted.
B bandwidth in Hz
S Signal power in watts
N Noise level in watts
𝑆
 is the signal to noise ratio.
𝑁
Wavelength Division
Multiplexing
Wireless Medium
Summary
Encoding
Modulation
Multiplexing
Baud Rate and Bit rate.
Data Link Layer
 Logical Link Control
 Medium Access Control
MAC Sub layer
(Access methodologies)
 Token bus
 Token ring
 CSMA
• 1-persistent
• p-persistent
• Non persistent
 802.3 CSMA/CD
 802.11 CSMA/CA
 wireless packet data network
• ALOHA
• Slotted ALOHA
Physical and Data Link Layer
Token Bus: 802.4
(Logical Ring)

 Used widely in industrial automation as it provides


deterministic access (for each node) to the medium
Token Ring: 802.5
The nodes are structured as a physical ring.
Only one token exists.
The actual data and ACK frame piggy back on
the token frame.
Allows priority based access.
CSMA
 Non persistent:
When the channel is busy, it waits for a random period
of time before trying to listen again. This is less greedy.
 1-persistent:[greedy approach]
User keeps listening to see if channel is free and, as
soon as the channel is idle, it transmits
 p-persistent:
When the channel is free during current slot, it may
transmit with probability p or may defer until next slot with
probability 1 − p. Requires predefined time slots.
 Ethernet (1-persistent with CD)
CSMA: p-persistent
Ethernet: 802.3
(CSMA/CD)
Node monitors its own transmission to detect
collision.
If channel is idle then transmit.
While transmitting monitor for collisions and
in case of collision back-off for random amount
of time.
Requires transmitter and receiver capable of
“listen-while-talk” operation.
Aloha

Throughput S = G*e(-2G)
Where,
G =λ*τ Erlang is the no.of frames submitted per frame time.
f
λ frames per frame time.
Slotted Aloha

Throughput S = G*e(-G)
Where,
G =λ*τ Erlang is the no.of frames submitted per frame time.
f
λ frames per frame time.
Aloha and Slotted Aloha

G = e-1

G = (e-1)/2
802.3 Frame Format
802.11 MAC Header
802.11 Vs. 802.3 Header
MAC Address format
MM:MM:MM:SS:SS:SS
48 bit address
24 bits for manufacturer ID and 24 bits for
host ID.
Exception: 64 bit MAC address used in ZigBee
IEEE 802.15.4
MAC Address Format
Types of MAC Address
Broadcast: pkt is addressed to all nodes in the
network. FF:FF:FF:FF.FF:FF
Multicast: pkt is addressed to a specific group
of nodes. 01-00-0C-CC-CC-CC
Unicast: pkt is addressed to a specific node in
the network
Types of MAC Address

U/L: Universally or Locally administered


• 0: burned in address (BIA) i.e. universal address
• 1: has been changed locally (Unique MAC address set up locally)

I/G: Individual or group address bit


• 0: Individual address (Unicast)
• 1: Group address (Multicast/Broadcast)
Common Fields in 802.3 and
802.11
Length/Type:
• control, management and data frames

Data/Payload:
• 802.3: 46 to 1500 bytes
• 802.11: 0 to 2312 bytes

FCS: CRC-32 Checksum


5-4-3 rule

5-4-3 rule was created when


10BASE5, 10BASE2 and
10BASE-FP were the only
types of Ethernet network
available
Wi-Fi Access
Wi-Fi Access
BSS and ESS

BSSID: MAC
address of the
WAP
Inter-Access Point Protocol
Client to access point associations.
AP to AP communication.
Client handoff through Mobile IP.
Physical and Data Link Layer
Bridge
Purpose of a Bridge

 Multiplexing from different MAC sub layers.


Switch
Wi-Fi or 802.11
CSMA/CA
MACA
• Multiple Access with Collision Avoidance
CSMA/CA
Necessary as the antenna cannot hear and
receive at the same time.
Since detection of collision is not possible,
prevention of collision is preferable.
Each node waits for a random amount of time
before transmitting data.
CSMA/CA
Exponential Back off algorithm.

However does not address hidden and


exposed terminal problem.
Communication Range

Carrier sensing range


Tx. Range

Interference range
Physical Layer Challenges
Communication Range

Value of K depends on environment and neighboring objects and is usually in the


range of [2,4]
Hidden Terminal problem
Wireless stations have transmission ranges
and not all stations are within radio range of
each other.
Simple CSMA will not work!
• Hidden Terminal.
• C is hidden from A
Sender/Transmitter

A B C

Receiver
Definition
A node is within the range of receiver but not
within range of transmitter.
Exposed Terminal Problem

Receiver

Transmitter
• Exposed Terminal.
• C is Exposed to B
Definition
A node is within the range of transmitter
(sender) but not within range of receiver.

Causes under utilization of the channel


Multiple Access with Collision
Avoidance (MACA)
Uses RTS and CTS packets
neighbor sender receiver neighbor

RTS
RTS

CTS
CTS

DATA DATA
Packet Transmission
Packet Transmission
PCF and DCF
Inter frame spacing in 802.11
Wi-Fi
 Basic Service Set [BSS]
• 48 bit address or BSSID
• MAC address of the 802.11 side of Access Point (AP).
 Independent BSS
• Don’t need a BSSID.
• A virtual BSSID is generated.
 Infrastructure BSS
• Based on an Access Point
 Extended Service Set [ESS]
• Bunch of BSS’s
• BSS’s are connected by a distribution network.
• Distribution network connects the AP’s.
Equipment
Signal booster
• Physical Layer

AP switch
• Data Link Layer (Layer 2)

AP with routing capabilities


• Network Layer (Layer 3)
802.11 CSMA/CA
Depends on a distributed coordinated
function to resolve conflicts.
Each node exponentially backs off in the event
of collision or the medium being busy.
802.11 Frame format
Sliding Window Protocol
Optimize channel delivery.
Ensure that the communication channel is
filled.
Pipelining data communications.
Useful in communication systems with large
propagation delays.
Attributes of a comm. channel
Bandwidth*Delay product.
Different types of networks
• Some have large bandwidth.
• Some have large delay
How do loss and delay occur?
packets queue in router buffers
• packet arrival rate to link (temporarily) exceeds output link
capacity
• packets queue, wait for turn
packet being transmitted (delay)

B
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
Four sources of packet delay
transmission
A
propagation

B
nodal
processing queueing

dnodal = dproc + dqueue + dtrans + dprop

dproc: nodal processing dqueue: queueing delay


check bit errors time waiting at output link
for transmission
determine output link
depends on congestion level
typically < msec of router
Four sources of packet delay
transmission
A
propagation

B
nodal
processing queueing

dnodal = dproc + dqueue + dtrans + dprop

dtrans: transmission delay: dprop: propagation delay:


L: packet length (bits) d: length of physical link
R: link bandwidth (bps) s: propagation speed in medium
dtrans = L/R (~2x108 m/sec)
dtrans and dprop dprop = d/s
very different
Queueing delay

R: link bandwidth (bps)


L: packet length (bits)
a: average packet arrival rate

traffic intensity
= La/R
La/R ~ 0: avg. queueing delay small La/R ~ 0

La/R -> 1: avg. queueing delay large


La/R > 1: more “work” arriving
than can be serviced, average delay infinite!

La/R -> 1
Sliding Window Protocol
Stop-and-Wait
• Wt=1, Wr=1

Go-Back-N
• Wt>1, Wr=1

Selective repeat
• Wt>1, Wr>1
Stop-and-Wait Protocol ARQ
(Wt=1, Wr=1)
the sender sends out one frame, waits for
acknowledgment before sending next frame, thus
the name Stop-And-Wait.
Highly inefficient in networks with unusually long
delay.
• Ex: 3 and 22 minutes for earth-to-mars comm.
• Ex: 17 hours, 15 minutes for earth-to-voyager comm.
Stop-and-Wait Protocol ARQ
(Wt=1, Wr=1)
Go-Back-N ARQ
(Wt>1, Wr=1)
Go-Back-N ARQ
(Wt>1, Wr=1)

 Packet Recovery based on NAK


Selective Repeat ARQ
(Wt>1, Wr>1)

WS=WR = 2m-1
WS, WR are the sending and receiving window sizes.
m is the number of bits allocated for sequence number.
Network Layer
Internet Protocol (IP)
 Addressing schemes
 Network partitioning.
 CIDR.
 IPv4
 IPv6
 IANA
 Routing decisions
 Routing Protocols
 Autonomous systems, inter and intra domain routing
IPv4 Header
IPv4 Address Scheme
Private IP address
Other Info
Loopback: 127.0.0.1
Broad Cast: All 1’s
– Example: 192.168.1.255
– 195.1.1.0/26

Avoid using Subnet Zero and the All-Ones


Subnet
Routing
Involves two stages:
• Route Discovery
• Routing Decision

Types of routing protocols


Step by step process.
• Matching in the routing table
IP Routing Table at a Router
IP Routing Table at a Host
What does routing table
provide?
The forwarding or next-hop IP address
The interface to be used for the forwarding
Route Determination Process
Perform AND operation between netmask and
the destination IP Address.
Determine the entry against which there is a
longest match.
 Forward the packet to the address listed
under gateway using the NIC card listed under
the interface.
Routing Criteria
Routing Scenarios
Examples
Sending traffic to 157.20.16.48
Sending traffic to 157.20.0.79
Interplay between Link Layer
and IP Layer
Interplay between Link Layer and
IP Layer
Other Scenarios
Other Scenarios
Routing Principles
 The source and destination IP addresses in the IP
header are never modified
 At each hop, only the source and Mac addresses
in the Mac header are modified.
 The IP layer hands over the IP packet and the next
hop IP address to Link Layer.
 The Link layer uses ARP protocol to determine
the next hop Mac address.
IP Routing Table at a Host
Examples
Sending traffic to 157.55.16.48
Sending traffic to 157.55.27.79
Autonomous Systems
An autonomous system is the group of
computers managed by a single ISP provider.
Inter and intra domain routing protocols
facilitate routing of IP packets between and
within each autonomous system respectively.
Autonomous Systems
Types of Routing Protocols
Inter and Intra domain routing
Distance Vector and Link State routing
protocols.
Distance Vector Routing
Distance vector protocols send complete
routing table to each neighbour.
Use Bellman-Ford algorithm to calculate the
best routes.
Use more bandwidth because they send
complete routing table
Susceptible to routing loops and converge
slower than link state routing protocols
Example
Handling Link Failure
Bellman Ford Pseudo Code
Link State Routing
 They advertise information about a network topology.

 Uses Dijkstra’s algorithm to find shortest path


 Each router running a link state routing protocol
creates three different tables:
• Neighbor table – the table of neighboring routers
running the same link state routing protocol
• Topology table – the table that stores the topology of
the entire network
• Routing table – the table that stores the best routes
Dijkstra’s algorithm Pseudo
Code
Count to Infinity
Differences between DV and
LS Routing
Inter domain Routing
protocols
Inter domain: BGP
Intra Domain Routing
protocols
Distance vector
• RIP, EIGRP

Link State
• OSPF or IS-IS
IPv6
 128 bit address.
 Example:
2001:0000:3238:DFE1:0063:0000:0000:FEFB
 Rules:
• Discard leading Zero(es)
• If two of more blocks contain consecutive zeroes, omit
them all and replace with double colon sign.
• A single block of zeroes are represented by single 0
 Above address is represented as
• 2001:0:3238:DFE1:63::FEFB
IPv6 address format
Using NIC address to generate EUI-64 Interface
ID.
Conversion of EUI-64 ID into IPv6 Interface
Identifier.
Global Unicast Address.
EUI-64 Interface ID
IPV6 Interface ID
Types of IPv6 addresses
Link-Local Address
• scope is limited to the segment and hence a
router will never forward/route these packets

Unique-Local Address
• are locally global, but are not routed over the
Internet and their scope is limited to an
organization’s boundary

Global Unicast Address


• are globally unique and recognizable.
Hierarchy of IPv6 addressing
Global Unicast Address
address always starts with FE80.
next 48-bits are set to 0
Unique-Local Address
IPv6 usage: Anycast
Byte Order
 Host byte order.
– Big Endian
• Places the least significant byte first
• Intel microprocessors
– Little Endian
• Places the most significant byte first.
• IBM S/390 mainframes, IBM z/architecture, Motorola
architectures

 Network Byte Order.


– is defined to always be big-endian.
– Helper functions: htonl(), htons(), ntohl(), ntohs()
Transport Layer
Overview
Connection establishment
• 3-way handshake

Connection closing
• 4-way handshake
TCP Header
UDP Header
Differences between TCP & UDP
Congestion Control
 BW * delay product
 Additive Increase Multiplicative Decrease
 Congestion detection.
 Congestion avoidance
 Variants of TCP
• TCP RED, TCP Vegas
 Traffic Shaping and SLA
• Token bucket
• Leaky bucket
State Transition Diagram
Connection Establishment
Connection setup:
3 way handshake
Closing Connection
Socket Programming
TCP Congestion Management
Slow Start,
Congestion Avoidance,
Fast Retransmit and
Fast Recovery
End-to-end
Congestion Control
Network as black box
• TCP congestion-avoidance algorithm

Network as Grey box


• Explicit Congestion Notification
Network As Black Box

Network
Window Size Packet Loss,
Or Round trip time,
Rate or
Throughput
Packet Loss Based
Congestion Control
TCP Congestion Control
(Read Van Jacobson, “Congestion Avoidance and Control,” Sigcomm’88)
Transmission Control Protocol (TCP)

 A connection oriented, end-to-end reliable


transport protocol.
• Uses acknowledge/retransmission for reliability.
Key assumption
• Packet loss only due to congestion (buffer
overflow)
End-to-end semantics
• ACK is sent by the receiver to TCP sender to
confirm successful delivery only after the data is
obtained.
Basic Concepts, Mechanisms,
Algorithms and Parameters
TCP assigns byte sequence numbers for each
segment.
Cumulative acknowledgements
• An ACK acknowledgements bytes up to the first
missing byte in the stream
• A new cumulative acknowledgement is generated
only on receipt of a new in-sequence packet
• A duplicate ACK is generated whenever an out-of-
order segment arrives at the receiver.
Indications of packet loss.
• Retransmission time out (RTO)
• 3 Duplicate ACKs.
Basic Concepts, Mechanisms,
Algorithms and Parameters
Sliding window control.
• Maximum range of data sent but not acknowledged
Average Throughput.
• Average sliding window size/average RTT
Sliding window size = Minimum {receiver’s
advertised window, congestion window}
• receiver’s advertised window
determined by available buffer space at the receiver
• congestion window
determined by the sender, based on feedback from the network
TCP Congestion Control
• Additive Increase Multiplicative Decrease (AIMD)
Implementation
 When a packet is acked
if cwnd < ssthresh* {
/* Slow-Start: increment cwnd every ack*/
cwnd = cwnd + 1;
} else {
/* Congestion avoidance: increment cwnd every ack */
cwnd = cwnd + 1/cwnd
}

When a packet is lost (timeout)


ssthresh = cwnd / 2;
cwnd = init_cwnd;
TCP Congestion Control
 Congestion window
• cwnd, is a variable maintained at each host.
• determines the number of bytes that can be
outstanding at any time.

 receiver's advertised window


• rwnd, indicates buffer space at the receiver side.

 Slow start threshold


• ssthresh, an arbitrary variable to indicate possible
congestion
Keeping A System in Equilibrium
 Suppose that a system is in equilibrium, how
to keep it there?
• If there are no losses, easy: just send a packet
whenever an ack is received.
• If losses occur, we need to distinguish between
delayed packets (link capacity shortage) and lost
packets need an accurate retransmission timer.
TCP Performance
cwnd

Startup
Before
Stabiliza.

0 W/2 W 3W/2 (RTT)


loss loss loss loss
Perfect solution
Alternatives
TCP Tahoe
 Slow start and congestion avoidance.

 Doesn’t differentiate between duplicate ACKs


and time outs.

 Slow start is triggered in response to time out.


TCP Reno
 Fast Retransmit in response to 3 Dup-ACKs.
 Fast Recovery:
• ssthresh = 0.5 * cwnd
• cwnd = ssthresh + 3
• On receiving another dup-ack; cwnd = cwnd + 1

 When an ACK for new data arrives;


• cwnd = ssthresh
• Begin Congestion Avoidance phase
TCP Reno
TCP Reno Disadvantages
 Cannot fast recover from multiple losses in the
same cwnd.
 When multiple losses happen, TCP Reno most
often results in time out.
 This is because cwnd is halved for every case
of 3 dup-acks.
Other TCP Variants
TCP New Reno
TCP Vegas
TCP SACK
Summary
Identifying packet loss
– Wait for RTO timer to expire
– wait for 3 DUP-ACKS

TCP Tahoe
– performs fast retransmit of lost packet on RTO time out

TCP Reno
– Improves on TCP Tahoe by doing fast recovery in
response to 3 DUP-ACKS
– Avoids slow start phase
Point-to-Point
Congestion Control
Active Queue Management Techniques
(Box is Green)
Queuing
Happens at intermediate routers.

In the event of queue build up which packets


to drop-off?

How to indicate the source to slow down?


Queuing
The primary purpose of a queue in an IP
router is to smooth out bursty arrivals, so
that the network utilization can be high.
But queues add delay and cause jitter.
• Delay is the enemy of real-time network traffic.
• Jitter is turned into delay at the receiver’s playout
buffer.
• Understanding and controlling network queues is
key to getting good performance from networked
multimedia.
TCP and Queues
TCP needs one delay-bandwidth product of
buffer space at the bottleneck link for a TCP
flow to fill the link and achieve 100%
utilization.
Thus, when everything is configured correctly,
the peak delay is twice the underlying
network delay.
• Links are often over buffered, because the actual
RTT is unknown to the link operator.
• Real-time applications see the difference between
peak and min as jitter, and smooth to peak delay.
Multiple TCP flows and Queues
If multiple flows all back-off in phase, the
router still needs a delay-bandwidth product
of buffering.
If multiple flows back-off out of phase, high
utilization can be maintained with smaller
queues.
- How to keep the flows out of phase?

Quality of Services
Goals of Active Queue
Management
The primary goal: Controlling average queuing
delay, while still maintaining high link utilization.
Secondary goals:
• Improving fairness (e.g., by reducing biases against
bursty low-bandwidth flows).
• Reducing unnecessary packet drops.
• Reducing global synchronization (i.e., for environments
with small-scale statistical multiplexing).
• Accommodating transient congestion (lasting less than a
round-trip time).
Queue Management Techniques
When to start dropping packets?

Which packets to drop?


Random Early Detection (RED)
As queue builds up, randomly drop or mark
packets with increasing probability (before
queue gets full).

Advantages:
• Lower average queuing delay.
• Avoids penalizing streams with large bursts.
• Desynchronizes co-existing flows.
RED Algorithm

Variables: Parameters:
qavg, pa minth, maxth
RED Drop Probabilities
Why use average Queue Size?
To be robust against transient bursts:
• When there is a transient burst, to drop just
enough packets for end-to-end congestion control
to come into play.
• To avoid biases against bursty low-bandwidth
flows.
• To avoid unnecessary packet drops from the
transient burst of a TCP connection slow-starting.
Disadvantages of RED
Parameter sensitivity:
• How to set minth, maxth and maxp?
Goal is to maintain mean queue size below the
midpoint between minth and maxth in times of
normal congestion.
maxth needs to be significantly below the
maximum queue size, because short-term
transients peak well above the average.
maxp primarily determines the drop rate. Needs
to be significantly higher than the drop rate
required to keep the flows under control.
RED Drop Probabilities
(alternative)
Other AQM schemes
Adaptive RED (ARED)
Proportional Integral (PI)
Virtual Queue (VQ)
Random Exponential Marking (REM)

Dynamic-RED (DRED)

Blue
Many other variants... (a lot of PhDs in this area!)
Explicit Congestion Notification
(ECN)
Standard TCP:
• Losses needed to detect congestion.
• Wasteful and unnecessary.
ECN:
• Routers mark packets instead of dropping them.
• Receiver returns marks to sender in ACK packets.
• Sender adjusts it’s window as it would have done if
the packet had been dropped.
Advantages:
• Bandwidth up to bottleneck not wasted.
• No delay imposed by retransmission.
ECN: Backwards Compatibility
When congestion experienced, a bit in the IP
header indicates if both hosts implement ECN.
- If they do, router marks packet.
– If they don’t, router drops packet.
ECN Notification

The ECN Field in the IP Header:


•ECT: ECN-Capable Transport
•CE: Congestion Experienced.
ECN and AQM
ECN is only useful if the queue isn’t full.
• Otherwise the router has to drop the packet
whether it wants to or not.

An active queue management scheme like


RED is needed to set the ECN Congestion
Experienced bit before the queue fills up.
Summary
Multimedia traffic has tight delay constraints.

AQM combined with ECN can give low loss,


low-ish delay, moderate jitter service.
Traffic Shaping and SLA
It is about regulating average rate of data flow.
It is a method of congestion control by providing
shape to data flow before entering the packet
into the network.
There are two types of Traffic shaping algorithm
• Leaky bucket
• Token Bucket
Leaky Bucket

A leaky bucket with water. A leaky bucket with packets.


Leaky Bucket
 The Leaky Bucket Algorithm used to control rate
in a network.
 It is implemented as a single-server queue with
constant service time.
 If the bucket (buffer) overflows then packets are
discarded.
 In this algorithm the input rate can vary but the
output rate remains constant.
 This algorithm saves busty traffic into fixed rate
traffic by averaging the data rate.
Leaky Bucket Algortihm
1. Initialize the counter to ‘n’ at every tick of clock.
2. If n is greater than the size of packet in the front
of queue send the packet into the network and
decrement the counter by size of packet. Repeat
the step until n is less than the size of packet.
3. Reset the counter and go to 1.
Token Bucket

Before After
Token Bucket
 The Token Bucket Algorithm compare to Leaky
Bucket Algorithm allow the output rate vary
depending on the size of burst.
 In this algorithm the buckets holds token to
transmit a packet, the host must capture and
destroy one token.
 Tokens are generated by a clock at the rate of one
token every Δt sec.
 Idle hosts can capture and save up tokens (up to
the max. size of the bucket) in order to send larger
bursts later.
Token Bucket algorithm
1. A token is added at every Δt time.
2. The bucket can hold at most b-tokens. If a token arrive
when bucket is full it is discarded.
3. When a packet of m bytes arrived m tokens are removed
from the bucket and the packet is sent to the network.
4. If less than n tokens are available no tokens are removed
from the buckets and the packet is considered to be non
conformant.
The non conformant packet may be enqueued for subsequent
transmission when sufficient token have been accumulated in the
bucket.
 If C is the maximum capacity of bucket and ρ is the arrival rate and
M is the maximum output rate then Burst Length S can be
calculated as C + ρS = MS
Differences
Token Bucket Leaky Bucket
Token dependent. Token independent.
If bucket is full token are If bucket is full packet or
discarded, but not the packet. data is discarded.
Packets can only transmitted Packets are transmitted
when there are enough token continuously.
It allows large bursts to be sent It sends the packet at
faster rate after that constant rate constant rate
It saves token to send large bursts. It does not save token.
Application Layer
Key Protocols
DHCP
DNS,
• Hierarchy tree, TLDs
SNMP
• NMS, FCAPS, MIB, V2 and V3
HTTP/HTTPS, FTP,
SMTP,POP3

You might also like