0% found this document useful (0 votes)
23 views165 pages

CCNUnit 1

The document provides an overview of computer communication networks, focusing on internet architecture and applications. It explains the structure of computer networks, the role of Internet Service Providers (ISPs), and the classification of access networks. Additionally, it discusses the network core, including routing protocols, switching methods, and the historical context of internet development.

Uploaded by

Varada
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views165 pages

CCNUnit 1

The document provides an overview of computer communication networks, focusing on internet architecture and applications. It explains the structure of computer networks, the role of Internet Service Providers (ISPs), and the classification of access networks. Additionally, it discusses the network core, including routing protocols, switching methods, and the historical context of internet development.

Uploaded by

Varada
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 165

COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
Introduction
• What is a computer network?
• It is like a graph consisting of end-systems or hosts connected to
one another via communication links and some packet switches.
• End-systems or hosts run applications which generate or receive
data in the form of packets (i.e., collection of bits)
• A sequence of packet switches and communication links is called
route or path
• A computer network is usually administered by one entity which
configures and maintains the operation
• Examples of computer networks include home networks,
enterprise networks, mobile networks, etc.
• Hosts
2
connect to the internet via ISPs
Introduction
• What is internet?
• Internet is a computer network that interconnects
billions of computing devices throughout the world.
• Internet is an interconnected architecture that provides
services to distributed applications.
• How did it come about?
• History of the internet: DARPA, ARPANET, Packet switched
networks, killer applications, TCP/IP, Ethernet, DNS,
NSFNET program, IANA, ICANN, RFC, IETF and IESG, IAB

3
COMPUTER COMMUNICATION NETWORKS
INTERNET -
VISUALIZATION
▪ Internet is viewed as a
graphical network that provides
services to distributed
applications.
▪ End systems are referred to as
hosts because they host (that
is, run) application programs.
▪ End systems are at the edge of
the network.
▪ Hosts are further divided into
two categories: clients and
4
servers
COMPUTER COMMUNICATION NETWORKS
INTERNET -
VISUALIZATION

Network edges are depicted as shaded regions

Network core is highlighted in dark blue

Host or End Systems

5
Introduction
• Notable inventions and inventors
• World wide web: Tim Berners Lee, MIT laboratory
1989-90
• Email: Ray Tomlinson, BBN 1972
• DNS: Paul Mockapetris, USC 1982
• RFC: Stephen Crocker, UCLA 1969
• Packet switching: Leonard Kleinrock, UCLA 1961
• TCP/IP: Bob Khan and Vincent Cerf, DARPA and SRI
1972-73
• Ethernet: Bob Metcalfe, Xerox PARC 1973
6
Introduction
• Who owns/controls the internet?
• ISP (Internet Service Provider) is a business entity or
company which provides internet access to the
end-systems in return for a subscription fee
• The place where end-systems connect to an ISP is
referred to as point-of-presence (PoP).
• The number of PoPs (typically in 1000s) held by an
ISP tells about its outreach in the internet.
• PoP consists of routers, link layer switches, MPLS and
communication links.
• ISP examples: Telecom operators, Cable TV
operators, Fiber (optic) operators
7
COMPUTER COMMUNICATION NETWORKS
Application Layer

ISP Architecture

ISP architecture of wired network (copper,


fibre) is shown here.

Subscribers can be anyone of the following:


▪ Home,
▪ Enterprise,
▪ Community,
▪ Business

The ISP architecture based on wireless


networks like GSM, 4G etc will be relatively
different.
8
COMPUTER COMMUNICATION NETWORKS
Application Layer

Internet Service Provider (ISP)


▪ End systems access the Internet through Internet Service Providers
(ISPs). Different types of ISPs are given as :
▪ Residential ISPs such as local cable or telephone companies
▪ Corporate ISPs
▪ University ISPs
▪ ISPs that provide Wi-Fi access in airports, hotels, coffee shops,
and other public places
▪ Cellular data ISPs providing mobile access to our smartphones
and other devices
▪ The place where end users or access networks connect to an ISP is
referred to as Point-of-Presence (PoP).
▪ PoP consists of routers, Ethernet switches and servers.
4
9
COMPUTER COMMUNICATION NETWORKS
Application Layer

Types of ISPs

Regional ISP- usually provides internet National ISP- It is a business that


access to a specific geographic area provides internet access nation wide

4
1
0
COMPUTER COMMUNICATION NETWORKS
Network Core
Global Transit
ISP

Customer
Examples of Tier 1 ISPs: AT&T, Sprint, Verizon etc. in the US. Bharti, Reliance, Tata and VSNL are Tier-1 ISPs in India
Examples of Regional ISPs: BSNL, Airtel, Vodafone, Reliance communications, etc.
Organization of Network Core: ISP
hierarchy

4
COMPUTER COMMUNICATION NETWORKS
Network Core

PoPs of various ISPs in the hierarchy may be interconnected using multi-


homing, peering, and Internet exchange points (IXPs) .

Multihoming :
• Any ISP (except for Tier-1 ISPs) may choose to multi-home, that is,
to connect to two or more provider ISPs.
• For example, an access ISP may multi-home with two
regional
ISPs, or it may multi-home with two regional ISPs and also with a
tier-1 ISP.
• Similarly, a regional ISP may multi-home with multiple tier-1 ISPs.

12
Introduction
• PoP

13
Introduction

14
COMPUTER COMMUNICATION NETWORKS
Network Core

Peering:
▪ ISPs at the same level of the hierarchy can peer, that is,
they can
directly connect their networks together so that all the traffic between
them passes over the direct connection rather than via
upstream
intermediaries.

Internet Exchange Point (IXP):


▪ A third-party company can create an Internet Exchange Point (IXP)
(typically in a stand-alone building with its own switches), which is a meeting
point where multiple ISPs can peer together.
1
5
COMPUTER COMMUNICATION NETWORKS
Application Layer

Services Provided by ISP

▪ ISPs provide a variety of types of network access


to the end systems.
▪ ISPs provide Internet access to content
providers.
▪ ISPs that provide access to end systems must be
interconnected:
Lower-tier ISPs are interconnected through
national and international upper-tier ISPs.
Upper-tier ISPs consists of high-speed routers
interconnected with high-speed 4
COMPUTER COMMUNICATION NETWORKS
Application Layer

End systems, packet switches, and other pieces of the Internet run
protocols that control the sending and receiving of information within the
Internet. The two major protocols are as follows:

1. Transmission Control Protocol (TCP)


2. Internet Protocol (IP)

The IP protocol specifies the format of the packets that are sent and
received among routers and end systems.

The Internet’s principal protocols are collectively known as TCP/IP.

4
1
7
Introduction
• ISP hierarchy (contd.)

18
Introduction
• Revenue generation is as follows:
• End users pay access ISPs
• Access ISPs pay to regional ISPs
• Regional ISPs pay to Tier 1 ISPs
• Tier 1 ISPs may have several bilateral agreements to share resources such as
bandwidth and routers
• Besides, content service providers can enter into bilateral agreements with an
ISP at any stage
• ISPs which perform peering or multi-homing share some of their revenue
based on equipment and resource utilization

19
Introduction
• How does the internet provide services for distributed
applications (i.e., programs written in Java, C, etc.)?
• Distributed means that applications run independently on the
hosts or end systems
• Messages are exchanged by the hosts using the internet socket
interfaces of their respective applications
• Protocols define the format and the order of messages
exchanged between two or more hosts
• Protocols also define the actions taken on the transmission
and/or receipt of a message or other event
• Services (e.g., reliability, guaranteed rate) are provided by
hardware or software associated with the devices

20
Classification by topography and functionality

21
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


2
2
Network edge
• Computer networks that sit on the periphery of the internet
constitute the network edge or the access network
• End-systems can be further classified as clients and servers
• Router which connect an access network to a
regional/access ISP is referred to as gateway
• Access network nomenclature
• Based on size: Local area networks, home networks, wide
area networks, etc.
• Based on topology: Tree, star, ring, bus, point-to-point.
• Based on physical media: Wired (DSL, Cable, Fiber to the
home (FTTH)) or wireless
23
Network edge
• Home access networks
• The devices in the home are connected to the internet via a LAN or
Wifi router
• Different physical media could be provided by different access ISPs to
connect the home network with the internet

24
Network edge
• Home access networks
• An infrastructure handled by a telecom or cable or fiber operator
• General architecture is given below

Home Central office


Modem Local multiplexer

Core
Multiplexer Network
Router

Home
Modem

25
Network edge
Feature DSL based Cable TV based FTTH based
access network access network access network
Modem DSL modem Cable modem Optical modem
Local Splitter Fiber node Optical network
multiplexer terminator
Central office DSL access Cable modem Optical line
(CO) multiplexer terminating terminator
(DSLAM) system (CMTS) (OLT)
Downlink rates 12 Mbps [ITU DOCSIS 2.0 100 Mbps
1999] and 24 standard 42.8 (cable length
Mbps [ITU Mbps based)
2003]
Uplink rates 1.8 Mbps [ITU DOCSIS 2.0 30 Mbps (cable
1999] and 2.5 standard 30.7 length based)
26
Mbps [ITU Mbps
Network edge
• Enterprise access network
• ISP can be telecom operator
• Built using Ethernet cables, switches and hubs
• Ethernet switches are preferred over routers in a LAN
• Routers are used for separating the network into subnets

27
Network edge
• Wireless networks:
• Classified according to radio access technologies
• Spread spectrum, frequency hopping, random access, polling methods, etc.
• More complex compared to wired access networks
• Packet losses and time varying wireless channel characteristics
• Wireless networks can be WiFi-based or cellular-based
• Wireless networks are usually supported by telecom ISPs
• Span of wireless networks can be few meters to several kilo meters
• Wireless networks have undergone tremendous evolution especially with the
exploding data requirements of the users

28
Network edge
• Satellite access networks:
• Remote end systems get access to the internet via satellite links
• Implemented when other access networks are not feasible
• Has lowest data rates among access networks
• The delays are higher. It depends on the distance between the satellite and
the users and the type of satellite
• Types of satellites: geostationary satellites and low-earth orbiting (LEO)
satellites

29
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


3
0
Network core
• Also known as backbone network
• Consists of high speed routers and high speed links (Gigabit
Ethernet/optical fibers)

Cisco NCS6000
router

31
Network core
• Network core is part of
the internet which is
composed of high-speed
packet switches and
high-speed
communication links
• Network core is
constructed using the
interconnection of ISPs
• The packet switches
(routers) perform store
and forward operation

32
Network core
• Traffic from access ISPs are aggregated using multiplexers
• Multiplexers are interconnected to more distant switches through a
backbone network
• Network core follows mesh topology with lot of redundancy
• Some design problems in network core include:
• Satisfy delay and reliability constraints
• Routing
• Assigning capacity (Flow maximization problem)
• Cost improvement

33
Network core
• Routers in the network core perform switching
• Routers have several links on which packets arrive and depart
• Switching involves transfer of an incoming packet from one link to an
appropriate outgoing link based on IP protocol
• The switching operation can be done by hardware and/or software
• Different types of switching performed in the network core
• Circuit switching
• Packet switching

34
Network core
• Circuit switching:
• Requires connection establishment before data transfer
• Resources are allocated by every intermediate
switch/router between the source and destination
hosts
• Resource example: Fixed link bandwidth, internal
memory
• In telephony, when a path is established between the
source and destination we can say a circuit is formed
• After data transfer, the circuit is closed by releasing the
reserved resources at each intermediate router
• No waiting time and no loss of data at intermediate
routers
• Throughput reduces with resource sharing
35
Network core
• Circuit switching:
• A circuit in a link is established either by frequency
division multiplexing (FDM) or time division
multiplexing (TDM)

36
Network core
• TDM- Time division multiplexing:
• Time is divided into frames and frames into slots
• Slots in a frame are reserved for the transmitting hosts
• Each slot ends with a guard time to prevent ISI
• Duration of frame, slot, guard time are fixed

37
Network core
• FDM- Frequency division multiplexing:
• Bandwidth is divided into channels
• All channels reserved for transmitting hosts in a fixed slot time
• Channel reservation done slot-by-slot-basis
• Channels separated by guard band to prevent adjacent channel interference

38
Network core
• Numerical #1:
• How long does it take to send a file of 640,000 bits from host A to host B over
a circuit-switched network?
• All links are 1.536 Mbps
• Each link uses TDM with 24 slots/sec
• Guard time is equal to (1/8)th of the slot time
• 500 msec to establish end-to-end circuit

39
Network core
The user needs one slot per frame

Frame size =1 s

Number of slots per frame = 24

Slot duration = 1/24 sec = 41.67 msec

Effective transmission time per slot = 41.67 * 7/8 = 36.458 msec

Number of bits transmitted by a user per frame (Nbs) = link rate * effective transmission time per slot =
1.536M * 36.458m = 56 kilobits

Nbs is also bits per slot

Number of frames needed to transmit (Nf) = file size/bits per slot = 640000/56000 = 11.42 frames = 12
frames (even if the fraction of a slot is required, the entire slot is meant for that user)

Total delay
40
= connection setup time + (Nf-1) * frame duration + 1 slot duration = 500m + 11 * 1sec + 1/24 =
11.0916 sec
Network core
• Numerical #2:
• How long does it take to send a file of 640,000 bits from host A to host B over
a circuit-switched network?
• Available link rate is 1.536 Mbps
• Link rate is distributed across 10 channels of 200 kHz
• Guard band of 50 Hz is used
• 500 msec to establish end-to-end circuit

41
Network core

The user needs one frequency channel per slot


Total delay
= connection setup time + transmission time
= connection setup time + file size/link rate of one channel
= 500 msec + 640000/0.1536M
= 4.667 sec

42
Network core
• Packet switching:
• Data broken into smaller chunk called packets
• No reservation of resources
• Suited for bursty traffic
• Better link utilization
• Packets are stored in buffer and then forwarded one at a time
• Requires protocols for link access and reliable packet delivery

43
Network core
• Packet switching (contd.):
• Packets may suffer queuing delays and get lost at the routers
• This happens when rate of arrivals exceeds the rate of departure

44
Network core
• Packet switching versus Circuit switching – Case 1:
• Suppose users share a 1 Mbps link. Also suppose that each user alternates
between periods of activity when a user generates data at a constant rate
of 100 kbps, and periods of inactivity when a user generates no data.
Suppose further that a user is active only 10 percent of the time.
• With circuit switching, 100 kbps must be reserved for each user at all
times.
• Thus, the circuit-switched link can support only 10 (= 1 Mbps/100 kbps)
simultaneous users.

45
Network core
• Packet switching versus Circuit switching – Case 1:
• With packet switching, the probability that a specific user is active is 0.1. If there are 35
users, the probability that there are 11 or more simultaneously active users is approximately
0.0004.
• Each user is using the channel 10% of the time, so the probability of a given user
being active is p = 0.1, and inactive q = 0.9.
• It's a binomial distribution X ~ B(35, 0.1), so probability Pr(X=k) = C(35, k) pk q(35-k).
• Pr(X>10) which is 1 - Pr(X<=10) which is 1-(Pr(X=0) + Pr(X=1) + ... Pr(X=10)) =
0.0004

• When there are 10 or fewer simultaneously active users (which happens with probability
0.9996), the aggregate arrival rate of data is less than or equal to 1 Mbps.
• When there are more than 10 simultaneously active users, then the aggregate arrival rate of
packets exceeds the output capacity of the link, and the output queue will begin to grow.
• Thus, packet switching performs same as circuit switched TDM but serves more than three
times the number of users.
46
Network core
• Packet switching versus Circuit switching – Case 2:
• Suppose there are 10 users and that one user suddenly generates
one thousand 1,000-bit packets, while other users remain quiescent
and do not generate packets.
• Under TDM circuit switching with 10 slots per frame and each slot
consisting of 1,000 bits, the active user can only use its one-time slot
per frame to transmit data, while the remaining nine-time slots in
each frame remain idle. It will take 10 seconds
• Under packet switching, the active user can continuously send its
packets at the full link rate of 1 Mbps, since there are no other users
has packets for transmission. In this case, it will take 1 second

47
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


4
8
Delay, loss and throughput
• The different delays that occur in packet switched transmission are
depicted below

49
Delay, loss and throughput
❑ Processing delay: Time taken to inspect (or make) a packet
at a packet switch (or source host). Range: Microseconds
❑ Queuing delay: Time spent by a packet in the queue
before processing. Depends on the number of packets
waiting ahead, traffic intensity and distribution of the
arrival process. Range: Microseconds to milliseconds
❑ Transmission delay: Time taken to push a packet on to the
link. Depends on length of the packet (L bits) and link rate
(R bits/sec). Expressed as L/R
❑ Propagation delay: Time taken by a bit to travel over a
link. Depends on the length of the link and the physical
medium’s propagation speed (e.g., 2×108 to 3×108 m/s).
50
Delay, loss and throughput
❑ Traffic intensity versus queuing
delay
❖ Suppose arrival rate is a packets
per sec and departure rate is
L/R seconds per packet, then
traffic intensity is given by La/R
❖ Let buffer size be infinite
❖ When La/R < 1, every new
packet sees an empty queue
❖ When La/R ≥ 1, queue starts to When buffer is finite
build up and mean queuing and La/R ≥ 1, then
delay could approach infinity packet losses occur
51
Delay, loss and throughput
• End-to-end delay (dend-end): The total time spent by a packet to travel from
the source to the destination.
• End-to-end delay is the sum of the delays at the source, delays at each
packet switch and the propagation delays on each communication link
along the path.
• Delay at a packet switch equals the sum of queuing delay, processing
delay and transmission delay
• Consider N–1 identical and uncongested routers between the source and
destination. Let all N links be identical. Let propagation delay on any link,
transmission delay, and processing delay at any router and source be
denoted by dprop, dtrans and dproc respectively. What is the end-to-end
delay?

52
Delay, loss and throughput
• Numerical #3:
• For the scenario given below, assume the queuing delay, propagation delay
and processing delay to be negligible. Suppose packet length L = 7.5 Mb and
link rate R = 1.5 Mbps. Calculate the end-to-end delay.

• d (end-to-end) = NL/R =( 3 x 7.5 Mb) / 1.5 Mbps = 15 secs

53
Delay, loss and throughput
• Throughput is the rate (bits/sec) at which the destination host
receives the packets.
• Instantaneous throughput is the throughput at a given time instant
whereas average throughput is throughput over the entire file
transfer time (e.g., F/T where F is file size and T is file transfer time).
• Example: What is the maximum achievable throughput?

54
COMPUTER COMMUNICATION NETWORKS
Performance parameters

Throughput
▪ Packet transmission rate (bits/sec) between a pair of sender-receiver

▪ Instantaneous: transmission rate at given point in time


▪ Average: transmission rate over longer period of time

pipe that can pipe that can


server sends carry fluid at carry fluid at
bits (fluid) into rate rate
pipe R bits/sec)
s
R bits/sec)
c
55
COMPUTER COMMUNICATION NETWORKS
Performance parameters

❖ Rs < Rc the bits pumped by the server will “flow” right through the
router and arrive at the client at a rate of Rs bps, giving a
throughput of Rs bps.

R bits/sec R bits/sec
s c

❖ Rs > Rc The router will not be able to forward bits as quickly as it


receives them. In this case, bits will only leave the router at rate Rc ,
giving an end-to-end throughput of Rc .

R bits/sec R bits/sec
s c
56
COMPUTER COMMUNICATION NETWORKS
Performance parameters

Throughput (contd.)
● Note also that if bits continue to arrive at the router at rate Rs , and
continue to leave the router at RC , the backlog of bits at the router
waiting for transmission to the client will grow and eventually
packet loss will occur

● Thus, for this simple two-link network, the throughput is min{RC ,


Rs}, that is, it is the transmission rate of the bottleneck link

R bits/sec R bits/sec
s c

57
COMPUTER COMMUNICATION NETWORKS
Performance parameters
Throughput (contd.)

Consider 10 clients
downloading from 10
servers

Assume bottleneck
link is shared equally
among different
packet flows

Per-connection end-
end throughput:
min(Rc,Rs,R/10)
58
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


5
9
COMPUTER COMMUNICATION NETWORKS
Performance parameters

Numerical 3:
Calculate the total time taken in transmission of 20,000 bits from Host A to
Host B. The data is divided into 4 packets of 5000 bits each. All four links
have an identical rate of 2 Mbps and are 10 km long. Assume optical links
and no processing & queuing delays.

60
COMPUTER COMMUNICATION NETWORKS
Performance parameters

61
• Numerical 5: Suppose there is a 10 Mbps microwave link between a
geostationary satellite and its base station on Earth. Every minute the
satellite takes a digital photo and sends it to the base station. Assume
a propagation speed of 2.4×108 m/s.
What is the propagation delay of the link?
What is the bandwidth-delay product, R · dprop?
Let x denote the size of the photo. What is the minimum value of x for the microwave link to be continuously
transmitting?
• Solution:
Propagation delay is (36000 km)/(2.4×108 m/s) = 150 ms
Bandwidth-delay product 1500 kb
Time between photo transmission is 60s therefore, transmit 600 Mb

62
• Numerical 6: Consider the figure below where transmission
delay is the only significant delay. Each link is 2Mbps.
Suppose the number of links N is 3. Calculate the end to end
delay for the two cases given below. Note that each switch is
a store and forward switch.
1. If message of size 8 Mb is transferred without segmentation.
2. If the message is segmented into 800 packets of 10 kb length.

63
64
Numerical #7:

The end-to-end delay of sending a packet consisting L bits from source to


destination over a path consisting N links each of rate R is (NL/R). Generalize this
formula for sending P such packets back-to-back over the N links.
• At time N*(L/R) the first packet has reached the destination, the second packet is
stored in the last router, the third packet is stored in the next-to-last router, etc.
• At time N*(L/R) + L/R, the second packet has reached the destination, the third
packet is stored in the last router, etc.
• Continuing with this logic, we see that at the time
N*(L/R) + (P-1)*(L/R) = (N+P-1)*(L/R) all packets have reached the destination.

65
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


6
6
Protocol layers and their service
• Data exchange between two hosts over a
communication network is a complex task
• The complex task is divided into smaller sub-tasks
• Maintain simplicity for network devices
• Put burden on the hosts
• The sub-tasks are completed sequentially
• The entire process can be visualized as layers
arranged top to bottom, where
• Each layer performs its own unique sub-task
• On the sender side, each layer waits till the above layer
finished its sub-task
• On the receiver side, each layer waits till the below
layer finished its sub-task
67
Protocol layers and their service
• Communication between two hosts requires the
same layers to be implemented in both hosts
• The peer layers (i.e., sub-task in sender and its
counterpart in the receiver) communicate with
one other using formatted blocks of data that obey
a set of rules or conventions known as a protocol
• Layers implement protocols in hardware or software
• Basics requirements of a Protocol:
• Syntax: Concerns the format of the data blocks
• Semantics: Includes control information for
coordination and error handling
• Timing: Includes speed matching and sequencing

68
Protocol layers and their service
• Arranged vertically, the layers on the systems
collectively constitute the protocol architecture
• Two types of protocol architecture were proposed
• TCP/IP model
• OSI model
• TCP/IP model or TCP/IP protocol suite
• Resulted from protocol research under ARPANET
• Consists of large collection of protocols issued as
Internet standards issued by IAB
• It consists of 5 layers namely, Application layer,
Transport (host-to-host) layer, Network layer (IP layer),
Link layer (network access layer), Physical layer

69
Protocol layers and their service
• Application layer :
• Applications running on hosts
generate/receive data
• Data is referred to as message
• A process initiates communication
with another by sending a
query/request
• Message is formatted according to
the application layer protocol
• Messages can be big in size
• Applications can have QoS
requirements
70
Protocol layers and their service
• Transport layer:
• Responsible for providing QoS for
messages
• Performs multiplexing at the sender
• Performs demultiplexing at the
receiver
• Maps each message to a
corresponding process
• Appends a new header to each
message
• Message plus header is called
segment
71
Protocol layers and their service
• Network layer:
• Fragments segments into packets
• Moves packets hop-by-hop
• E.g., router to router
• Uses source and destination IP
addresses
• Path between source host and
destination host is discovered
• Appends a new header to each
packet
• Packet plus header is called
datagram
72
Protocol layers and their service
• Link layer:
• Pushes the packets onto a link
• Using link layer protocols
• Can forward frames using MAC
address
• Appends a new header to the
packet
• Packet plus header is called frame
• Provides synchronization at receiver
• Checks for errors in frame

73
Protocol layers and their service
• Physical layer:
• Provides physical interface between
the host and the link
• Example: Modem and Ethernet card,
wireless adapter
• Converts binary data into signals
• Performs modulation and
demodulation
• Performs transmission, reception
and filtering of signals

74
Protocol layers and their service
Encapsulation happens before departure
Decapsulation happens after arrival

Encapsulatio
n

Decapsulatio
n

75
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


7
6
Principles of network applications
• Applications run on end-systems (e.g., computers,
servers)
• Examples: Skype, Whatsapp, Apple Pay, Youtube,
Netflix
• Application developers often build a pair of
programs which are coded in C, Java or Python
• One program is referred to as client program while the
other is referred to a server program (e.g., web
browser and web server program)
• These programs are also referred to as processes
• From the application developer’s perspective, the
network architecture is fixed and provides a
specific set of services to applications.
•77Services: Reliability, throughput, security, timing, etc.
Application layer architectures
• Application architecture dictates how the application developer views the
interaction between the applications running on the end-systems

78
Application layer architectures
• Client-server architecture
• Client initiates the process communication
• Server responds to requests from the clients
• Server is always ON
• Server is well defined (e.g., IP address)
• Server can handle concurrent connections
• Examples: Search engines, Internet commerce,
Web-based email, Social media

79
Application layer architectures
• Peer-to-peer architecture
• Any host can send and receive data
• Hosts can join and leave the network any time
• Hosts allocate resources to help each other
• P2P architectures are self scalable
• Distributed algorithms are used for a) Maintaining state information and b)
For file sharing
• Examples: Bit Torrent, Skype

80
Processes communicating
• Processes exchange messages with one another using the rules
governed by the end-systems operating system

How to read/write a
message?
When to read/write a
message?

81
Transport layer services

82
Transport layer services
• Applications and the supported protocols

83
Application–layer protocols
• Application layer protocols define the following
• The types of messages exchanged, for example, request messages
and response messages
• The syntax of the various message types, such as the fields in the
message and how the fields are delineated
• The semantics of the fields, that is, the meaning of the information in
the fields
• Rules for determining when and how a process sends messages and
responds to messages
84
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


8
5
Web and HTTP: Overview
• Web servers store objects embedded in HTML
pages
• The primary object (i.e., HTML page) is called webpage
• Web applications communicate using the HTTP
• Client fetches a webpage using a web browser (aka
client process)
• Client process sends a HTTP request message
specifying the object requested (aka URL)
• Web server process sends a HTTP response message
which may contain the requested object
• Web browser: Microsoft Edge, Google Chrome, etc.
• Web server: Apache, Microsoft Internet Information
Server, etc.
• HTTP is a stateless protocol

86
Web and HTTP: Overview
• HTTP request-response behaviour
What transport layer protocol is
used?

How many ways can the request


and response happen?

1. Persistent TCP
2. Non-persistent
TCP

87
Web and HTTP: Non-persistent
Separate TCP connection to
fetch each object (including base
webpage)

Assume negligible size for HTTP


request message
Total access delay per object =
Transmission delay at the server
+ 2 × RTT
Socket number of web server
is 80

Used in HTTP/1.0
88
Web and HTTP: Persistent
• Compared to non-persistent connections, persistent
HTTP we save total access time and the efforts in
establishing TCP connections
• For each of these connections, TCP buffers must be
allocated and TCP variables must be kept in both the
client and server.
• In persistent HTTP connection, only one TCP
connection is established (for base webpage) and all
objects are fetched back-to-back
• Server closes connection after some specified time of
inactivity
• Used in HTTP/1.1 (allows up to 6 parallel TCP
connections)
• Used in HTTP/2 (includes multiplexing, message
prioritization and server pushing)
89
Web and HTTP
• Numerical #7: Consider accessing the webpage
ww.someSchool.edu/someDepartment/Schoolpage.html
which contains two embedded objects. Suppose the Web
server and client are connected by a long link of rate R.
Let RTT denote the two way propagation delay. Suppose
the length (bits) of the webpage and two objects are L 1, L2
and L3 respectively. Suppose the HTTP request message is
of negligible length and can be piggybacked with
acknowledgements. Calculate separately, the total access
delay under a persistent TCP connection and
non-persistent TCP connections. Show the timing
diagram.https://chatgpt.com/share/66e54c6c-9034-8006
-b13a-7a5f92874bae
90
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


9
1
Web and HTTP: Message format

• HTTP Request message


• Entity body is empty (download) or non-empty (upload)

92
Web and HTTP: Message format

• Example-GET message:
• Request webpage www.gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file.html

93
Web and HTTP: Message format

• Example-GET message (contd.):


• Inspecting the raw data of the TCP segment

94
Web and HTTP: Message format

• Web server sends the response message which could have the requested object

95
Web and HTTP: Message format

• Example-HTTP response message:

96
Web and HTTP: Message format

• Example-HTTP response (contd.):

97
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


9
8
Web and HTTP: Cookies

• Most commercial websites provide access through user identification. These special identities are called cookies

99
Web and HTTP: Web caching

• Web cache (aka proxy server) is a network entity that satisfies


HTTP requests on the behalf of an origin web server
• Typically a web cache is purchased and installed by an ISP or an organization
• Web cache has its own disk storage and keeps copies of recently
requested objects in this storage
• A user’s browser can be configured so that all of the user’s HTTP
requests are first directed to the web cache
• A web cache reduces the infrastructure cost and access delay in
large organizations
• Content delivery networks (CDN) provide web caching too!

10
0
Web and HTTP: Web caching

• When object is present on the


web cache client simply fetches
it; Otherwise web cache initiates
a connection to the Origin server.
The object is stored and
forwarded to the client

10
1
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
0
DNS: Domain Name System
❑ Defined in IETF documents RFC 1034 and 1035
❑ Why do we prefer using hostnames to IP addresses?
❑ How to get the IP address corresponding to a host name?
❖ gaia.cs.umass.edu 🡪 128.119.245.12
❑ A distributed architecture of DNS servers
❑ Unix machines running Berkeley Internet Name Domain (BIND) software
❑ Uses UDP for transport layer protocol
❑ Operates on port 53 of the DNS server

103
DNS: Domain Name System
• Example: Sending HTTP request to a web server 1st time

TCP header: Dst. port UDP header: Dst. port


80 53
Network layer header
Dst. DNS server IP
address
Link layer
header
Host A chooses a new source port number for each application
104
DNS: Domain Name System
• Example: Sending HTTP request to a web server 1st time

DNS server performs decapsulation and reads the DNS query.


Then, it generates a DNS reply having the IP address of the web server
DNS server encapsulates the reply in a UDP segment and passes it
105
DNS: Domain Name System
• Example: Sending HTTP request to a web server 1st time

Upon receiving the DNS reply, the encapsulation of the TCP handshake
(i.e., TCP connection request) segment resumes using the IP address
obtained for the web server.
This TCP segment is passed to the web server
106
DNS: Domain Name System
• Example: Sending HTTP request to a web server 1st time

Web server replies with a TCP handshake (i.e., TCP connection grant) of
its own from port 80

107
DNS: Domain Name System
• Example: Sending HTTP request to a web server 1st time

Upon receiving the TCP handshake from the web server, the host
performs encapsulation of the HTTP request and then sends it to the
web server
108
DNS: Domain Name System
The problems with a centralized design include:

• A single point of failure.


• Traffic volume.
• Distant centralized database
• Maintenance.

109
DNS: Domain Name System
• Distribution of DNS servers

110
DNS: Domain Name System
• Hierarchy of DNS servers
• Root DNS servers
• TLD DNS servers
• Authoritative DNS Server

111
DNS: Domain Name System
• Root DNS servers
• Root DNS servers are the first level of DNS servers which are contacted by the
clients to query DNS resource records.
• http://www.root-servers.org/ offers a map view of the root DNS servers
around the world
• The name, IP address and location of the root DNS servers can be obtained
from the above link
• 13 root DNS servers (actually 247 servers) across the world are maintained by
12 independent organizations
• https://www.iana.org/domains/root/servers provides list of root server zones

112
DNS: Domain Name System
• Root DNS servers

113
DNS: Domain Name System
• TLD DNS servers
• TLD DNS servers maintain domain level information.
• For each of the top-level domains—top-level domains such as com, org, net, edu, and
gov, and all of the country top-level domains such as uk, fr, ca, and jp—there is TLD
server (or server cluster).
• Verisign Global Registry Services maintains the TLD servers for the com top-level
domain, and the company Educause maintains the TLD servers for the edu top-level
domain
• https://domainpunch.com/tlds/ gives list of TLD servers and their associated domains
• Authoritative DNS servers maintain various DNS records corresponding to
the registered hosts
• Local DNS servers are proxy servers which reside in an access network
• They query the DNS hierarchy on behalf of the respective clients

114
DNS: Domain Name System
❑ Summary of services:
❖ Provides IP address for a given host name
❖ Host aliasing
❖ Mail server aliasing
❖ Load distribution

115
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
1
DNS: Domain Name System
• What is queried?
• A resource record is queried

• Name can be host name or domain name


• Value can be host name or IP addresses
• Type maps Name and Value
• TTL gives the time to live for a record
Type Name Value
A Hostname IP address
NS Domain Host name of Authoritative
DNS
CNAME Alias host name Canonical hostname
MX Alias host name Canonical mail server name
117
DNS: Domain Name System
• How is a resource record queried?

118
Type MX query and
response

119
DNS: Domain Name System
• DNS servers and the types of records they maintain
• Authoritative DNS server 🡪 Type A, MX
• Root DNS server 🡪 Type NS
• TLD server 🡪 Type A and NS
• Local DNS server 🡪 All types

120
DNS: Domain Name System

121
Iterative DNS query mechanism
DNS: Domain Name System

122
Recursive DNS query mechanism
DNS: Domain Name System
• How to update your website with DNS?
• Find a registrar
• Available at http://www.internic.net
• Registrars are authorized by ICANN
• Submit names and IP address of your primary
authoritative DNS server and secondary DNS (if any)
• Registrar creates Type NS and Type A records
• One each for primary and secondary servers
• Registrar inserts these records into the TLD DNS server
• You can insert records into your authoritative DNS
servers
• Type A records of your web servers
• Type A record and MX record of your mail server
123
DNS caching and vulnerabilities
• Caching
• Reduces network traffic
• Reduces delay in DNS response
• Vulnerabilities
• Denial of service attack
• Attackers are distributed
• Client cannot query to the DNS server as it is choked with DNS queries from attackers
• Spoofing
• Attackers mimic a client and send DNS queries
• Client is choked with DNS responses
• Man-in-the-middle attack
• Client-to-server message and/or server-to-client message is altered by malicious users
• Digital signatures can be used as a remedy

124
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
2
Electronic email
• Email: Brief overview
Interaction between
user mailbox and user
agent happens using
POP3, IMAP or HTTP
Every user’s mailbox is
hosted on a unique
mail server

Outgoing messages in a
126
mailbox are handled by SMTP
Electronic email
• Overview:
• Email message is composed by a sender using the user agent (e.g.,
web browser or Outlook).
• The email is uploaded to the mailbox of the sender using the Simple
Mail Transfer Protocol (SMTP) over TCP
• A mail server hosts the mailboxes of many clients
• A TCP connection is established between the mail servers of the
sender and the recipient of the email message
• SMTP pushes (moves) the message from the sender to the recipient's
mailbox (i.e., the sender’s mail server to the recipient’s mail server).
The port number is 25
• The recipient pulls the message from his/her mailbox using mail
access protocols to read it.
127
SMTP
Email has three major components: user agents, mail servers, and
the Simple Mail Transfer Protocol (SMTP)
SMTP is the principal application-layer protocol for Internet
electronic mail.
It uses TCP’s reliable data transfer service to transfer mail from
the sender’s mail server to the recipient’s mail server.
SMTP has two sides: a client side, which executes on the sender’s
mail server, and a server side, which executes on the recipient’s
mail server
SMTP does not normally use intermediate mail servers for sending
mail, even when the two mail servers are located at opposite ends
of the world.
128
Electronic email
• SMTP is defined in RFC 5321 and is much older than HTTP
• SMTP is invoked by sender’s mail server
• Messages between mail servers are encoded in ASCII

129
SMTP
• Alice’s user agent uses SMTP or HTTP to deliver the e-mail message to
her mail server

• Then Alice’s mail server uses SMTP (as an SMTP client) to relay the
e-mail message to Bob’s mail server

• There are two common ways for Bob to retrieve his e-mail from a mail
server.
• If Bob is using Web-based e-mail or a smartphone app (such as
Gmail), then the user agent will use HTTP to retrieve Bob’s e-mail.
• The alternative method, typically used is to use the Internet Mail
Access Protocol (IMAP)
• SMTP cannot be used here, why?
130
SMTP
• Operation

131
SMTP
• Comparison with HTTP
• HTTP allows other encoding formats but SMTP strictly
follows ASCII
• SMTP is a “push” type protocol while HTTP is a “pull”
type protocol
• SMTP does not distinguish between object types in its
data exchange.

132
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
3
Video Streaming and Content Distribution Networks
• On-demand video streaming constitutes about 80% of the internet
traffic according to the report
• Popular on-demand content providers include Netflix, Hotstar,
Amazon, Youtube, etc.
• On-demand video streaming faces two main challenges
• Bandwidth bottlenecks in the end-to-end path between any
server and client
• Video availability at the bit rate desired by the client
• Solutions to overcome the above challenges
• Dynamic adaptive streaming over HTTP (DASH)
• Content distribution network (CDN)

134
Video Streaming and Content Distribution Networks –
Internet video
• A video is a sequence of images, typically being displayed at a constant rate
(e.g., 24-30 images/sec)
• An uncompressed, digitally encoded image consists of an array of pixels
• Each pixel is encoded into a number of bits to represent luminance and
colour
• Compression algorithms can achieve any bit rate desired
Video quality Bit rate Resolution
SD 800-1000 kbps 480p
HD 1.2-2 Mbps 720p
FHD 1.9-4.5 Mbps 1080p
135 UHD 10 Mbps 2160p
Video Streaming and Content Distribution
Networks – DASH
• Youtube was the earliest to adopt DASH
• Dynamic adaptive streaming refers to varying the video
resolution (bit rate) in response to the changes in the available
bandwidth at the client
• Multiple video resolutions are made available at the content
server (low resolution ⇒ low bit rate)
• Each video for a given resolution has an associated URL and a
set of chunks (e.g., 4 sec video fragment)
• A client makes a TCP connection to the content server and
requests for the manifest file corresponding to the video
• A manifest file which provides a URL for each version along
with its bit rate
136
Video Streaming and Content Distribution
Networks – DASH
• Upon learning the available versions, it chooses the version
of the chunk to request using HTTP GET
• This depends on the rate adaption algorithm and
available bandwidth
• The content server sends the requested chunk using the
HTTP response message
• The client’s application buffers the received chunks up to a
threshold before play out
• DASH has to ensure that the chunks are maintained above
the threshold of the receive buffer

137
Video Streaming and Content Distribution
Networks – CDN
• The objective of DASH is to ensure the quality of experience for the client
after a server is chosen
• The objective of CDN is to maintain the videos closer to the clients and
resolve server assignment for video streaming
• The CDN is a distributed architecture of server clusters placed on which the
contents are placed by a pull (Youtube) or push (Netflix) approach
Enter Deep Bring Home
Large number of small clusters Small number of large
clusters
Deployed in access ISPs (e.g., Deployed in IXPs (e.g.,
Akamai) Limelight)
Challenge
138
of maintenance and Challenge of delay and
Video Streaming and Content Distribution Networks –
CDN Operation
• Content providers distribute the video (different versions) to
the CDN company
• When a client wants to access a video on the content
providers webpage, the DNS servers help locate the server
cluster under the CDN, and locate the appropriate server
• Following this the TCP connection is established to the server
and then HTTP based DASH takes over during streaming
• Example, let KingCDN distribute videos of Netcinemas
• Let a client accesses Transformers 7, bearing the URL
http://video.netcinema.com/6Y7B23V, from NetCinema
webpage. See the sequence of operations next
139
Video Streaming and Content Distribution Networks –
CDN Operation

140
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
4
Transport layer: Services
• Provides logical connection between the processes
• Here, logical communication means that the applications in
the end-systems overlook the role of the underlying
physical interfaces, switches, routers and communication
links.
• Transport-layer protocols are implemented in the end
systems but not in network routers.
• Breaks the application layer message into segments
• Performs multiplexing and de-multiplexing of
segments inside a host
• Perform error detection and in-order assembly of
segments
• Can142
provide QoS support for the applications
Transport layer: Services

143
Transport layer: Services
• UDP
• Connectionless protocol
• Does not acknowledge transmitted segments
• No throughput regulation(i.e., could cause network congestion)
• No service guarantees
• process-to-process data delivery and error-checking
• Example applications?
• TCP
• Connection-oriented protocol
• Adapts throughput according to network congestion(congestion control)
• Supports flow control at the receiving node
• Guarantees reliable data transfer under the unreliable network layer
• Example
144
applications?
Network layer: Services
The Internet’s network-layer protocol has a name—IP, for Internet Protocol.
IP provides logical communication between hosts.
The IP service model is a best-effort delivery service.

• This means that IP makes its “best effort” to deliver segments between
communicating hosts, but it makes no guarantees.
• It does not guarantee segment delivery, it does not guarantee orderly
delivery of segments, and it does not guarantee the integrity of the data in
the segments.
• For these reasons, IP is said to be an unreliable service.

145
Transport layer: Sockets
• At any given time there can be more than one socket in the
receiving host, each socket has a unique identifier. The format of
the identifier depends on whether the socket is a UDP or a TCP
socket
• Sockets allow matching the transport layer segments to their
respective sockets
• Sockets are used in multiplexing and demultiplexing of segments
• Analogy for sockets:
• You can perform various transactions with your bank account
(application) through an ATM (end-system) and bank-side server
(end-system). You have various options (sockets) such as balance
enquiry, withdrawal, change of ATM PIN, etc.
146
Transport layer: Multiplexing and demultiplexing

• Every segment exchanged over process communication specifies two


sockets
• The socket for the client process is referred to as source port
• The socket for the server process is referred to as destination port

147
Transport layer: Multiplexing and demultiplexing

Transport-layer multiplexing requires (1) that sockets have unique


identifiers, and (2) that each segment has special fields that indicate the
socket to which the segment is to be delivered the source port number
field and the destination port number field.

Each port number is a 16-bit number, ranging from 0 to 65535.


The port numbers ranging from 0 to 1023 are called well-known port
numbers and are restricted, which means that they are reserved for use by
well-known application protocols such as HTTP (which uses port number
80) and FTP (which uses port number 21).

148
Transport layer: Multiplexing and demultiplexing

• Multiplexing: Segments leaving different sockets in a end-system are interleaved


so that the network layer can assign the source IP address
• Demultiplexing: Segments arriving from the network layer with the same
destination IP address, corresponding to the end-system, are separated and
delivered to respective sockets
• The multiplexing and demultiplexing requires further information in connection
oriented transport where a server handles multiple simultaneous connections

149
Transport layer: Multiplexing and demultiplexing

• Connectionless transport (one way)

150
Socket examples
• Connection oriented transport (two-way)

151
Socket examples
• Connection oriented transport (two-way)

152
Socket examples
UD TC
P P

153
COMPUTER COMMUNICATION NETWORKS

UNIT 1: INTERNET ARCHITECTURE AND APPLICATIONS

Department of Electronics and Communication Engineering


1
5
Connectionless transport: UDP
• User datagram protocol (UDP):
• Defined in RFC 768
• Simple to implement
• No connection establishment
• No connection state
• Small packet header overhead (header is just 8 bytes long)
• Suited for applications which are not delay tolerant
• Suited for real time multimedia applications (e.g., Internet phone,
real-time video conferencing, and streaming of stored audio and
video.)
• Suited for applications where old messages have little meaning (e.g.,
DNS, RIP, SNMP)
155
Connectionless transport: UDP
Why UDP is preferred for some applications?

Finer application-level control over what data is sent, and when.


Under UDP, as soon as an application process passes data to UDP, UDP
will package the data inside a UDP segment and immediately pass the
segment to the network layer.
TCP has a congestion-control mechanism and will continue to resend a
segment until the receipt of the segment has been acknowledged by the
destination, regardless of how long reliable delivery takes. So not suited for
real-time applications

156
Connectionless transport: UDP
No connection establishment.
TCP uses a three-way handshake before it starts to transfer data. UDP just
blasts away without any formal preliminaries. Thus UDP does not introduce
any delay to establish a connection.

No connection state.
TCP maintains the connection state in the end systems. This connection
state includes receive and send buffers, congestion-control parameters, and
sequence and acknowledgment number parameters. UDP does not maintain a
connection state and does not track any of these parameters.

Small packet header overhead.


The TCP segment has 20 bytes of header overhead in every segment,
whereas UDP has only 8 b
157
Connectionless transport: UDP
E-mail, remote terminal access, and file transfer run over TCP—all
these applications need the reliable data transfer service of TCP

However many important applications run over UDP rather than


TCP. For example, UDP is used to carry out network management.
UDP is preferred to TCP in this case, since network management
applications must often run when the network is in a stressed
state—precisely when reliable, congestion-controlled data transfer is
difficult to achieve

158
Connectionless transport: UDP

159
Connectionless transport: UDP
• Segment structure:
❖ Source port is used for multiplexing and
demultiplexing at the sender
❖ Destination port is used for multiplexing
and demultiplexing at the receiver
❖ Length specifies message length plus
header length in bytes
❖ Checksum (RFC1701) is used for error
detection at the receiver

Sender side: Split the segment into 16-bit numbers and sum them. Wrap around
carry (if any). Take 1’s complement of the sum (call this UDP checksum)
Receiver side: Recompute checksum including UDP checksum. If answer is all 1s
then
160it means no error has occurred
Connectionless transport: UDP
• Segment structure (contd.):
• Checksum example:
• Assume three16-bit words of the form

161
COMPUTER COMMUNICATION NETWORKS
Connectionless Transport UDP

CHECKSUM CALCULATION
Checksum calculation at the sender side:
a) The given data is split into 16-bit numbers (some zeros are padded if the
given data is not an integral multiple of 16).

b) The 16-bit numbers are summed and the carry is wrapped around and
added back to the resulting sum.

c) Take one complement of the sum and this result is called "checksum".

d) Append the data to the checksum.


162
COMPUTER COMMUNICATION NETWORKS
Connectionless Transport
CHECKSUM CALCULATION(Cont.)
Error detection at the receiver side:
a) Separate the checksum from the data.

b) The data is split into 16-bit numbers (some zeros are padded if the given data is not an
integral multiple of 16).

c) The 16-bit numbers are summed and the carry is wrapped around and added back to the
resulting sum.

d) Add the checksum to the sum.

e) Data is treated as intact if the resulting sum contains only ones; Otherwise data was
163
corrupted.
COMPUTER COMMUNICATION NETWORKS
Connectionless Transport

Checksum example:
● Assume segment has 3 16-bit words

164
COMPUTER COMMUNICATION NETWORKS
Connectionless Transport

UDP checksum calculation:


● The above sender and receiver operations are performed as before.
● However, the data in this context includes some fields from the
network layer header and the UDP segment.
● On the sender side, prior to calculation of checksum assume that this
field is all zeros.
Example: Suppose IPv4 datagram is carrying the UDP segment, the
following IPv4 header fields are required for the calculation: source IP
address, Dest. IP address, Upper layer protocol (binary value of 17),
Datagram length 165

You might also like