DCN2
DCN2
DCN2
Networks
Communication Networks
• Communication networks enable users to
transfer information
- voice
- video
- e-mail
- computer files
Evolution of Communication Networks
• Telephone networks
• Computer networks
• Wireless Networks
Telephone Networks
• The key innovations in Telephony
- Circuit Switching
- Digitization
- Common Channel signalling
- Optical links
- Service Integration
Telephone networks around 1890
• Transmissions were analog
• Manually operated switches
Telephone network around 1988
• Transmissions were analog or digital
• Switches were electronic
• Exchange control information is sent by using
CCS
Digital Carrier system
• Network topology
Transmission Technology
• Broadcast networks
Single communication channel shared by all
Address field specify intended recipient
Multicasting- Packet delivered to all
machines subscribed to a group
• Point to Point networks
Connection between individual pairs of
machines
Network Topology
• The way in which a network is laid out
physically
Mesh Topology
• LAN
• MAN
• WAN
• TRANS
Time required to transmit a packet
= Packet size
Transmission speed
• PROP
Signal propagation time
=distance from source to destination
speed of electrical or optical signal
• QD
Queueing delay in the switch
• PROC
Processing time by switches (negligible)
Layered architecture
• Architecture
Specific way of organizing the functions
performed by a computer network when it
provides various services
• Layers
In most networks, functions are organized
into layers
• Services of layer n are implemented by processes
at layer n using the services of layer n-1
Example of layered decomposition of
communication function
• Complex design problem partitioned into a
number of more manageable sub problems
• Decomposition permits standardization –
facilitates network inter connection
• Services provided by different layers and the
interfaces between layers must be specified
Open System Architecture
• Design of computer network equipment that
can communicate with each other
Packet standards
Addressing scheme
Routing protocols
Router
• Designed to relay packets at a high rate to the
proper link and with a low delay
• Packets are statistically multiplexed
• Demultiplexing is done using network addresses
of the packets.
Layer 4: Transport layer
• Responsible for end to end transfer of
messages
• Connection oriented / connection less
• Segmentation and re assembly
Decomposes messages into packets and
combines packets into messages after
resequencing
Segmentation and re assembly
Blocking and Un blocking
• Packets are numbered
• Time to live, L
- Decrement L as the packet goes
through a network node
- Packets with zero L is discarded
Layer 5: Session layer
• Physical layer
• Frame layer
• Packet layer:
X.25 Layer mapping with OSI model
Physical layer:
• Deals with the physical interface between an
attached station and the link that attaches
that station to the packet-switching node.
– X.21 is the most commonly used physical layer
standard
Frame layer:
Facilitates reliable transfer of data across
the physical link by transmitting the data as a
sequence of frames.
Uses a subset of HDLC known as Link
Access Protocol Balanced (LAPB), bit oriented
protocol
Packet layer:
• Responsible for end-to-end connection
between two DTEs. Functions performed are:
– Establishing connection
– Transferring data
– Terminating a connection
– Error and flow control
Error control
• Transmission line uses
Error detection
Error correction
• CRC and checksum code (CKS)
Error free transmission
Error Control
• Window size = N
• Window size 4
• Before transmitting packet with number
‘n+N’, sender waits until it receives ACK of ‘n’.
• Efficiency = N x TRANS
TRANS + ACK + 2PROP
• Efficiency increases linearly with N upto 100%
• Efficiency = min N TRANS ,1
TRANS + ACK + 2PROP
• Problem:
Given :
Packet size = 1000 bits
ACK = 20 bits
Transmission over 20 km fibre at 100 Mbps
Find :
(a) Efficiency if it is ABP
(b) Value of N for efficiency to be 100% if it is
Go back N.
• Solution:
TRANS = 1000 / R
ACK = 20 / R
PROP = 20 km x 5S / km
( 3.3 to 5 S / km)
= 100 S
Efficiency (ABP) = 4.75 %
Efficiency (Go back N) = 1000N / 21020
For efficiency to be 1, N 21
Selective Repeat Protocol
• Retransmits the only packets that were not
correctly received
• Sender and receiver must be able to store up to N
packets
Flow & Congestion control
Transmission
rate
adjustment
Internal
Transmission
congestion
network
Small Large
capacity capacity
receiver receiver
Flow Control
• Receiver has limited speed and limited
block of memory (buffer)
• Flow control :
* Regulate the flow of data from a sender
to avoid buffer overflow
* Receiver informs the sender about the
amount of data that can be sent
• Methods of flow control
• Used by TCP
• Both hosts use a window for each connection
• Window spans a portion of the buffer
• It can slide over the buffer as data and
acknowledgements are sent and received
Sender Buffer
• Open loop
Prevention before it happens
• Closed loop
Removal after it happened
Open loop (Prevention)
• Handled either by the source or the
destination
1. Retransmission policy
Designed to optimize efficiency and at
the same time reduce congestion
2. Window policy
SRP / Go back N
3. Acknowledgement policy
Delayed / no acknowledgement
4. Discarding policy
Less sensitive packets discarded
5. Admission policy
Check the resource requirement of a flow
before admitting to the network
Closed loop (removal)
1. Back pressure
Congested router informs the previous
upstream router to reduce rate of
outgoing packets
2. Choke point
Packet is sent by router to source to
inform it of the congestion
3. Implicit signalling
Source detect delay of ACK and slow down
4. Explicit signalling
Routers set a bit in a packet to inform the
sender or receiver
(a) Backward signalling
(b) Forward signalling
• Delay – Bandwidth product of the connection
=RxT
R = Transmission rate
T = RTT (Round Trip Time)
It represents total bits “in transit”
• Window mechanisms
70
60
50
40
30
20
10
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
Time (seconds)
2. Slow start
• AIMD is used when source is operating
close to the available capacity of the
network
Packet 4 ACK 2
Packet 5 ACK 2
Packet 6
ACK 2
ACK 2
Retransmit
packet 3
ACK 6
• Sender waits until it receives some
duplicate ACKs (earlier packet may not be
lost, but delayed) and retransmits the
missing packet
• Fast recovery:
When congestion is detected, congestion
window is reduced to half (not reduced to 1)
TCP Congestion Control
• Slow start:
When connection established, sender
initializes CW to MSS (Max. Segment Size,
default value 536 bytes)
If this segment acknowledged, CW
doubled
CW increases exponentially until time out
occurs or receiver‟s window reached
• Threshold:
Half the value of CW (max).
When a time out occurs, it is set to half of
the current CW, and CW is reset to 1 MSS
Slow start initialized
Exponential growth stops when threshold
is hit, then CW increased linearly
Illustration:
• MSS initially at 1024 bytes
• CW initially at 64 kB
• Threshold set to 32 kB (CW/2)
• CW grows exponentially until it hits
threshold
• Increases linearly after threshold
• Time out occurs at txn 13
• Threshold set to 20 kB (CW/2)
• Slow start initiated again
Congestion Avoidance
• Congestion Control
TCP needs to create losses to find
available bandwidth
• Congestion Avoidance
Predict when congestion is about to occur
and reduce data rate to avoid packet loss
DEC bit
• Responsibility for congestion control is split
between routers and end nodes
• Routers monitor the load, “explicitly”
notifies end nodes when congestion is
about to occur
• Routers set a binary congestion bit in the
packets
• Destination host copies this congestion bit
into ACK
• Source adjusts its sending rate
• Bit is set if its average queue length is
greater than or equal to 1
• Averaging interval =
last busy cycle + idle time + current busy cycle
Current time
Averaging interval
Random Early Detection
• Routers monitor their queue length
• When congestion is about to occur, notify
source to adjust its congestion window
• Implicit signaling – drops one of the packets
• Source notified by subsequent time out or
duplicate ACK
• “Early” – drops packets earlier than it would
have to.
• If so decreases CW by 1/8
Algorithm2
• Decision based on changes in both RTT
and window size
• Window adjusted once every two RTT
based on
• If „0’ :
Increases window by one packet size
5-157
Asynchronous Protocols
• XMODEM
– Used for file transfer over telephone line
– Half-duplex, stop and wait protocol
Field 1 – One byte SOH, start of header
Field 2 – Two byte header, sequence no. (frame no.) &
validity check for seq. no.
Field 3 – 128 bytes of data
Field 4 – CRC for data only
Asynchronous Protocols - contd
YMODEM
• It is a protocol similar to XMODEM with the
following exceptions:
1. The information field has a maximum capacity of
1024 bytes.
2. ITU-T-CRC 16 is used to calculate the frame check
sequence.
3. Multiple frames can be sent in succession and
then acknowledged with a single ACK or NAK
character.
ZMODEM
• Combining features of XMODEM & YMODEM
Synchronous Protocols
• Character-oriented (byte-oriented) protocols – the
frame or packet is interpreted as a series of
characters
• Bit-oriented protocols – the frame or packet is
interpreted as a series of bits
Character-oriented Protocol
Binary Synchronous Communications (BSC)
– Developed by IBM in 1964
– Usable in point-to-point and multipoint, supports half
duplex, stop-and –wait ARQ flow control and error
correction
• BSC Control characters (represented by one or more
char)
– ACK 0 – good even frame received or ready to receive
– ACK 1 – good odd frame received
– ENQ – request for a response
– NAK – bad frame received
– SYN – alert receiver to incoming frame
BSC (contd.)
• BSC Frames
– Data Frames
• SYN character alert the receiver to the arrival of a new
frame and provide a bit pattern for time synchronization
• STX (start text), ETX (end text), BCC (block check count)
– Data Frames with header field
• SOH (start of header)
• Header include address of receiving device, address of
sending device, frame number for stop-and-wait ARQ
– Multiblock Data Frames
• message may be divided into several blocks
• ITB (intermediate text block)
• error checking done for each block, if any block
contains error, the entire must be retransmitted
• only single acknowledgment required
Multiframe Data Transmission
• some messages may be too long to fit into one
frame – split message
• ETB (end transmission block) is used instead of
ETX to signify that the end of frame is not the
end of transmission
• receiver must acknowledge each frame
Control Frames
• carries information specific to the functioning
of the data link layer itself – establishing
connections, flow and error control,
terminating connections
Synchronous Protocols -contd
• Bit-oriented Protocols
Synchronous Protocols
• Bit-oriented Protocol
– Synchronous Data Link Control (SDLC)
• Developed by IBM in 1975
– High-level Data Link Control (HDLC)
• ISO and ITU-T standard
• All bit-oriented protocols are related to HDLC
• Support half-duplex, full-duplex modes and
point-to-point, multipoint configurations
High-level Data Link Control (HDLC)
– Station Types
• Primary – Complete control of the link; sends
commands to secondary stations
• Secondary – Sends responses on command
received
• Combined – Behave either as primary or
secondary; send commands and responses
HDLC contd..
Configuration – Unbalanced (master/slave)
• One device is primary and others are
secondary
• Point-to-point and multipoint
• Configuration – Symmetrical
• Each physical station consists of two logical
stations – a primary and a secondary
• Separate links for two logical stations
• Control of link can shift between the two
stations
• Configuration – Balanced
• Both stations in point-to-point topology
are of the combined type
• A single link is used and can be controlled
by either stations
Modes of Communication
• Normal response mode (NRM)
–Standard primary-secondary relationship
–A secondary device must have permission from
the primary before transmitting
• Asynchronous response mode (ARM)
–A secondary may initiate a transmission without
permission from the primary whenever the
channel is idle
–All transmission from a secondary (even to
another secondary) must be through the primary
• Asynchronous balanced mode (ABM)
–In balanced configuration; all stations are
equal; any one can initiate transmission
without permission from the other
Frames
• I-frames (Information frames)
– Used to transport user data and control
information relating to user data
• S-Frames (Supervisory frames)
– Used only to transport control information,
e.g. flow control, error control
U-Frames (unnumbered frames)
Used for the initiation and termination of a link
and for sending various kinds of supplementary
control information
– Reserved for system management,
i.e. managing the link itself
HDLC contd..
I-frame (Information frame)
• Flag – a byte with bit pattern 01111110 that
identifies the beginning and end of frame and for
synchronization.
• Address – one byte or multiple byte; “Source
address” (if secondary) or “Destination address”
(if primary)
• Control – for acknowledgment of the number of
frame received and the number of frame expected
• FCS – error detection; two or four bytes CRC
HDLC contd..
– Reject (REJ)
Routing table
Routing table for datagram network
No virtual circuit
has to be set up
since no
connection exists
between a source
and a destination
Shortest Path Algorithms
• Network routing is a major function at the
network layer and is concerned with the
problem of determining feasible paths from
each source to each destination.
• A router or a packet switched node performs
two main functions:
1. Routing
Algorithm finds an optimal path to each
destination and stores the result in the routing
table
2. Forwarding
A router forwards each packet from an input port
to the appropriate output port based on the
information stored in the routing table.
A sample network with link costs
• Many metrics can be used to assign a cost to
each link depending on which function is to be
optimized.
1. Cost ~ 1/ capacity
Objective is to send the packet through a path
with the highest capacity
1. Cost ~ packet delay
Packet delay includes queueing delay and
propagation delay
1. Cost ~ congestion
Shortest path tries to avoid congested links.
Bellman-Ford Algorithm
d13
d56
xi min{dij x j }
j
dii = 0
d15 = d23 =
• Min cost from node 2 to destination (node 6)
can be calculated by
x2 = min d21 + x1, d24 + x4, d25 + x5)
= min 3 + 3, 1 + 3, 4 + 2
= 4
• Thus the minimum cost from node 2 to node 6 is
equal to 4 and the next node to visit is node 4
Application
Transport
Internet
Network
Interface
• Internet layer
Designed to glue together different networks
(Ethernet, FDDI,..)
• End to end delivery requires 2 tasks
1. Addressing
2. Routing
Address- 48 bit unique MAC address (H/W
address or physical address) and
Unique IP address
• Transport layer performs:
1. Multiplexing
2. Error control and re-ordering
3. Flow control and congestion control
• UDP:
User Datagram Protocol