CN unit 4 vips
CN unit 4 vips
• UNIT II
Data Link Protocols- Stop and Wait protocols, Noise-free and Noisy Channels,
Performance and Efficiency, Sliding Window protocols, MAC Sublayer: The
Channel Allocation problem, Carrier Sense Multiple Access Protocols, Collision
Free Protocols, FDDI protocol. IEEE Standard 802.3 & 802. l1 for LANs and
WLANs
4
Syllabus Contents
• UNIT- III
Network Layer protocols- Design Issues: Virtual Circuits and Datagrams,
Routing Algorithms, Optimality principle, shortest path routing Algorithms,
Flooding and Broadcasting, Distance Vector Routing, Link State Routing, Flow-
Based Routing, Multicast Routing; Flow and Congestion Control.
• UNIT IV
Transport Layer Protocols- Design Issues, Quality of Services. The Internet
Transport Protocols. IPV4 vs IPV6.
Session Layer protocol- Dialog Management, Synchronization, Connection
Establishment. Quality of service, security management, Firewalls.
Application layer protocols- HTTP, SMTP, FTP, SNMP, Etc. 5
Syllabus Contents
• UNIT- I
Introduction to Layered Network Architecture- What are computer networks, Layered
models for networking, different types of communication models, ISO-OSI Model,
TCP/1P.
• UNIT II
Data Link Protocols- Stop and Wait protocols, Noise-free and Noisy Channels,
Performance and Efficiency, Sliding Window protocols, MAC Sublayer: The Channel
Allocation problem, Carrier Sense Multiple Access Protocols, Collision Free Protocols,
FDDI protocol. IEEE Standard 802.3 & 802. l1 for LANs and WLANs
6
Syllabus Contents
• UNIT- III
Network Layer protocols- Design Issues: Virtual Circuits and Datagrams,
Routing Algorithms, Optimality principle, shortest path routing Algorithms,
Flooding and Broadcasting, Distance Vector Routing, Link State Routing, Flow-
Based Routing, Multicast Routing; Flow and Congestion Control.
• UNIT IV
Transport Layer Protocols- Design Issues, Quality of Services. The Internet
Transport Protocols. IPV4 vs IPV6.
Session Layer protocol- Dialog Management, Synchronization, Connection
Establishment. Quality of service, security management, Firewalls.
Application layer protocols: HTTP, SMTP, FTP, SNMP, Etc. 7
Unit 4
11
Transport Layer
Reliable process-to-process delivery of a message
12
Functions of Transport Layer:
1. Segmentation of message into packet and reassembly of packets into message:
accepts a message from (session) layer above it, splits into smaller units (if not already
small enough), and passes smaller units down to network layer. Transport layer at
destination station reassembles message.
2. Message acknowledgment: provides reliable end-to-end message delivery with
acknowledgments.
3. Message traffic control : tells transmitting station to “back-off” when no message
buffers are available.
4. Session multiplexing : multiplexes several message streams, or sessions onto one
logical link and keeps track of which messages belong to which sessions.
13
Functions of Transport Layer:
5. Service point addressing: Purpose is to deliver message from one process running on source
machine to another process running on destination machine simulataneously. To deliver
message to correct process, transport layer header includes a type of address called service
point address or port address. Thus by specifying this address, transport layer makes sure
that message is delivered to correct process on destination machine.
6. Protocols: Protocols of transport layer are TCP, SPX, NETBIOS, ATP and NWLINK.
7. Flow control: Ensures that sender and receiver communicate at a rate they both can handle
which prevents source from sending data packets faster than destination can handle. Here,
flow control is performed end-to-end rather than across a link.
14
Functions of Transport Layer:
8. Error control: Error control is performed end-to-end rather than across a single link. Sending
transport layer ensures that entire message arrives at receiving transport layer without
loss, error (damage, or duplication). Error correction is achieved through retransmission.
15
TRANSPORT LAYER PROTOCOLS – Design Issues
1. Reliability: To ensure that data transmitted between hosts is delivered reliably. TCP
provides reliable data delivery by using acknowledgment and retransmission mechanisms.
In contrast, UDP does not provide reliable delivery and is used in applications where
occasional loss of data is acceptable.
2. Flow Control: Process of regulating the flow of data between two network nodes to
prevent the receiver from being overwhelmed with data. Flow control results in a better
network utilization by avoiding packet loss. TCP uses flow control mechanisms to ensure
that the sender does not send data faster than the receiver can process it.
3. Congestion Control: Process of preventing network from becoming congested. Achieved by
controlling rate at which data is sent by sender. TCP uses effective congestion control to
prevent packet loss, improve network performance, and avoid network collapse.
4. Multiplexing and Demultiplexing: May have multiple connections running on a single
physical network. Multiplexing combines multiple connections into a single stream while
demultiplexing splits single stream into multiple connections.
16
TRANSPORT LAYER PROTOCOLS – Design Issues
5. Connection Establishment and Termination: Hosts exchange information for connection
establishment. Before data transfer, a connection is established which gets terminated
after completion of data transfer between sending and receiving hosts. TCP uses a three-
way handshake mechanism to establish a connection and a four-way handshake to
terminate a connection.
6. Quality of Service: Ensures to provide an acceptable level of QoS for traffic. Different
types of traffic have different QoS requirements, like guarantee of minimum bandwidth
or maximum delay.
7. Security: Critical issue – as any vulnerability can compromise confidentiality or integrity
of transmitted data. Encryption and authentication mechanisms can be used to secure
data.
8. Performance: High performance and low latency ensures efficient communication
between network nodes. Achieved through optimized algorithms and efficient use of
network resources. Measured by various metrics such as throughput, delay, and error
17
rate.
Quality of Service
• QoS is critical for applications that require reliable and timely data delivery.
• Transport Layer Protocols that do not provide QoS may cause degraded performance, user
frustration, increased latency, and dropped packets.
• Quality of service is something a flow seeks to attain
18
Factors affecting QoS
1. Reliability: Lack of reliability means losing a packet or acknowledgment, which entails
retransmission.
2. Delay: Applications can tolerate delay in different degrees.
3. Jitter: Jitter is variation in delay for packets belonging to same flow. High jitter means
difference between delays is large; low jitter means variation is small.
4. Bandwidth: Different applications need different bandwidths
19
Techniques to improve QoS
1. Scheduling
2. Traffic Shaping
3. Resource Reservation
4. Admission Control
20
Techniques to improve QoS
Scheduling:
• Good scheduling technique treats different flows in a fair and appropriate manner.
22
Priority queuing
23
Weighted fair queuing
24
Techniques to improve QoS
Traffic Shaping:
• Controls rate at which packets are sent (not just how many).
• At connection set-up time, sender and carrier negotiate a traffic pattern (shape).
• Leaky bucket
algorithm shapes
bursty traffic into
fixed-rate traffic by
averaging data rate.
• It may drop packets
if bucket is full.
26
Leaky bucket
• Enforces a constant output rate (average rate) regardless of burstiness of input.
• Implemented as a singleserver queue with constant service time.
• If bucket (buffer) overflows then packets are discarded.
• Does nothing when input is idle.
• Host injects one packet per clock tick onto network.
• This results in a uniform flow of packets, smoothing out bursts and reducing
congestion.
• When packets are same size one packet per tick is okay.
• For variable length packets, allows fixed number of bytes per tick.
• E.g. 1024 bytes per tick will allow one 1024-byte packet or two 512-byte packets
or four 256-byte packets on 1 tick 27
Leaky bucket implementation
28
Token Bucket Algorithm
• TBA allows output rate to vary, depending on size of burst.
• Idle hosts can capture and save up tokens (up to max. size of bucket) in order to
send larger bursts later.
29
Token Bucket Algorithm
30
Techniques to improve QoS
Resource Reservation
• Flow of data needs resources such as a buffer, bandwidth, CPU time, and so on.
Admission Control
• Before a router accepts a flow for processing, it checks flow specifications to see if its
capacity and previous commitments to other flows can handle new flow.
31
IPv4 ADDRESSES
• IPv4 address is a 32-bit address that uniquely and universally defines connection of
device (for example, a computer or a router) to Internet.
• IPv4 addresses are unique that each address defines only one, connection to Internet.
• Two devices on Internet can never have same address at same time.
• An address may be assigned to a device for a time period and then taken away and
assigned to another device.
• If a protocol uses N bits to define an address, address space is 2N because each bit can
have two different values (0 or 1) and N bits can have 2N values.
• IPv4 uses 32-bit addresses, which means that address space is 232 or 4,294,967,296.
33
IPv4 Notations
1. Binary Notation: Displayed as 32 bits.
• Each octet is referred as byte.
• IPv4 address referred to as a 32-bit address or 4-byte address.
• Example: 01110101 10010101 00011101 00000010
2. Dotted-Decimal Notation:
• To make address more compact and easier to read, Internet addresses are written in
decimal form with a decimal point (dot) separating bytes.
• Example: 117.149.29.2
34
Question: Find decimal notation of binary equivalent
35
Solution: Find decimal notation of binary equivalent
36
Question: Find decimal notation of binary equivalent
37
Solution: Find decimal notation of binary equivalent
• Solution:
a) 129.11.11.239
b) 193.131.27.255 38
Question: Find binary notation of Decimal equivalent
a) 111.56.45.78
b) 221.34.7.82
39
Solution: Find binary notation of decimal equivalent
a) 111.56.45.78
b) 221.34.7.82
• Solution:
1. a. 111.56.045.78
2. b. 221.34.7.8.20
3. c. 75.45.301.14
4. d. 11100010.23.14.67
41
Solution: Find errors if any
42
IPv4 Notations
• In classful addressing, address space is divided into five classes: A, B, C, D, and E.
• For binary notation address, first few bits defines class of address.
43
Question: Find class of each address.
44
Question: Find class of each address.
45
Question: Find class of each address.
B. 11000001 10000011 00011011 11111111: First 2 bits are 1; third bit is O. So,
class C address
46
Question: Find class of each address.
A. 14.23.120.8 :
47
Question: Find class of each address.
B. 252.5.15.111 :
48
Question: Find class of each address.
• Find class of each address.
B. 252.5.15.111 : First byte is 252 (between 240 and 255); So, class E address
49
Classful Addressing : Problem of Classes and Blocks
• One problem with classful addressing is that each class is divided into a fixed
number of blocks with each block having a fixed size
53
Classful Addressing : Subnetting
54
Classful Addressing : Supernetting
• Since, most of class A and class B addresses were depleted; there was huge demand
for midsize blocks.
• Class C block with maximum 256 addresses did not satisfy needs of organizations.
• Even a midsize organization needed more addresses.
• Solution was supernetting.
• In supernetting, several networks are combined to create a supernetwork
• Organizations can apply for sets of class C blocks instead of just one.
• For example, an organization that needs 1000 addresses can be granted four
continuous class C blocks which can create one supernetwork.
• Supernetting decreases number of 1s in mask.
• For example, if an organization is given four class C addresses, mask changes from /24
to /22.
• Classless addressing eliminated need for supernetting. 55
Classless Addressing
• Classful addressing is almost obsolete - replaced with classless addressing.
• To overcome address depletion and give more organizations access to Internet, classless
addressing was designed and implemented.
• There are no classes, but addresses are granted in blocks.
• When an entity, small or large, needs to connect to Internet, it is granted a block (range) of
addresses whose size (number of addresses) varies based on nature and size of entity.
• For example, a household may be given only two addresses; a large organization may be
given thousands of addresses.
• An ISP may be given hundreds of thousands based on number of customers it may serve.
• Restriction: To simplify handling of addresses, Internet authorities impose three restrictions:
1. Addresses in a block must be contiguous, one after another.
2. Number of addresses in a block must be a power of 2 (I, 2, 4, 8, ... ).
3. First address must be evenly divisible by number of addresses.
56
IP Version 4 Protocol
• Packets in IPv4 layer
are called datagrams
• Datagram is a variable-
length packet
consisting of two parts:
header and data.
• Header is 20 to 60
bytes in length and
contains information
essential to routing and
delivery.
• Customary in TCP/IP to
show header in 4-byte
sections.
57
IP Version 4 Protocol - VER
• 4-bit field defines
version of IPv4 protocol
• Version 4 dominates
Internet today
• VER tells IPv4 software
running in processing
machine that datagram
has format of version 4.
• Including version at
start of each datagram,
makes possible
transition between
versions over a long
period of time.
58
IP Version 4 Protocol - HLEN
• Header length (HLEN).
• 4-bit field defines total
length of datagram header
in 4-byte words.
• Needed because length of
header is variable (between
20 and 60 bytes).
• When there are no options,
header length is 20 bytes,
and value of this field is 5 (5
x 4 = 20).
• When option field is at its
maximum size, value of this
field is 15 (15 x 4 = 60).
59
IP Version 4 Protocol - Services
60
IP Version 4 Protocol - Services
a. Precedence is a 3-bit
subfield ranging from 0 (000
in binary) to 7 (111 in binary).
• Defines priority of
datagram in issues such as
congestion.
• If router is congested and
needs to discard some
datagrams, lowest
precedence datagrams are
discarded first.
61
IP Version 4 Protocol - Services
67
Abbreviated IPv6 addresses
• IP address, in hexadecimal format, is very long, many of its digits are zeros.
• Leading zeros of a section (four digits between two colons) can be omitted. Only leading zeros
can be dropped, not trailing zeros
68
Question
• Expand the address 0:15::1:12:1213 to its original
69
Solution
• Expand the address 0:15::1:12:1213 to its original
70
IPv6 datagram header and payload
71
IPv6 datagram header and payload
Packet Format
• Each packet is composed of a mandatory base header followed by payload.
• Payload consists of two parts: optional extension headers and data from an upper
layer.
• Base header occupies 40 bytes, whereas extension headers and data from upper layer
contain up to 65,535 bytes of information.
72
IPv6 datagram header and payload
Base Header
• Base header has eight fields.
Version: 4-bit field defines
version number of IP. For IPv6,
value is 6.
Priority: 4-bit field defines
priority of packet w.r.t. traffic
congestion.
Flow label: 3-byte (24-bit) field
designed to provide special
handling for a particular flow of
data.
Payload length: 2-byte field
defines length of IP datagram 73
excluding base header.
IPv6 datagram header and payload
Base Header
Next header: 8-bit field defining
header that follows base header in
datagram. One of optional extension
headers used by IP or header of an
encapsulated packet such as UDP or
TCP. Each extension header also
contains this field. This field in version
4 is called protocol.
Hop limit: 8-bit field serves same
purpose as TIL field in IPv4.
Source address: 16-byte (128-bit)
Internet address that identifies
original source of datagram.
Destination address: 16-byte (128-
bit) Internet address, identifies final 74
destination of datagram.
Comparison of IPv4 and IPv6
Properties IPv4 IPv6
Addressing Provides 32-bit addresses Provides 128-bit addresses which results
in a significantly larger address space
Security Does not provide security Provides authentication, integrity, and
mechanisms, and requires confidentiality during communication of
additional security protocols data over a network with the
facilitated by network devices implementation of IPSec protocol suite
Protocol No such protocol enhancement Features Hierarchical Addressing, which
Enhancement process enables ISPs to allocate a subnet to an
organization
Routing Uses flat routing model which Uses hierarchical routing protocol, only
requires routers to store complete store routing information of networks
table of route identification which they are connected to 75
Comparison of IPv4 and IPv6
76
Layer 5 – Session Layer
• Provides a reliable and secure communication between two devices by establishing, managing
and terminating sessions, maintaining session state information, and handling session
synchronization and recovery
• Regulates flow of data, Defines format of data sent over connections.
• Manages who can transfer data in a certain amount of time and for how long.
• Reconnects session if it disconnects.
• Reports and logs and upper layer errors.
• Protocols: Protocols for session layer are NetBIOS, Mail Slots, Names Pipes, and RPC.
77
Functions of Session Layer:
78
Functions of Session Layer:
1. Session Establishment: Establishes a connection between two devices before data
transmission begins. During this process, the session layer determines the type of session
required and negotiates session parameters.
2. Session Management: Manages session between two devices. Keeps track of session
throughout its duration, maintains session state information and ensures that connection
remains active. In case of errors during data transfer, ensures session is terminated
gracefully.
84
Types of Application Layer Protocols:
1. HTTP (HyperText Transfer Protocol): Client-server protocol designed for World Wide Web.
Used to transfer hypertext documents and other data between web servers and clients.
2. FTP (File Transfer Protocol): Client-server protocol used to transfer files over network.
Enables sharing and copying of files between computers located on different networks.
3. SMTP (Simple Mail Transfer Protocol): Used to send email messages from one server to
another. Most common protocol used for sending emails over Internet.
4. DNS (Domain Name System): DNS maps domain names to IP addresses and helps translate
human-readable domain names to computer-readable IP addresses.
5. Telnet: Used to connect to remote systems over network and enable communication with
those systems. Enables operations such as terminal emulation and remote administration.
6. SSH (Secure Shell): Used for secure remote administration and data transfer, with
encryption of all data transmitted over network.
7. SNMP (Simple Network Management Protocol): Used for network management and
monitoring. Enables network devices to be monitored, managed, and controlled remotely.
85
Types of Application Layer Protocols:
1. HTTP (HyperText Transfer Protocol): Client-server protocol designed for World Wide Web.
Used to transfer hypertext documents and other data between web servers and clients.
2. FTP (File Transfer Protocol): Client-server protocol used to transfer files over network.
Enables sharing and copying of files between computers located on different networks.
3. SMTP (Simple Mail Transfer Protocol): Used to send email messages from one server to
another. Most common protocol used for sending emails over Internet.
4. DNS (Domain Name System): DNS maps domain names to IP addresses and helps translate
human-readable domain names to computer-readable IP addresses.
5. Telnet: Used to connect to remote systems over network and enable communication with
those systems. Enables operations such as terminal emulation and remote administration.
6. SSH (Secure Shell): Used for secure remote administration and data transfer, with
encryption of all data transmitted over network.
7. SNMP (Simple Network Management Protocol): Used for network management and
monitoring. Enables network devices to be monitored, managed, and controlled remotely.
86
HTTP (HyperText Transfer Protocol)
• Used to access data on World Wide Web (www).
• Can be used to transfer data in form of plain text, hypertext, audio, video, and so on.
• Allows to use in a hypertext environment where there are rapid jumps from one document
to another document.
• Similar and simpler to FTP as it also transfers files from one host to another host using only
one connection, i.e., no control connection to transfer files.
• Used to carry data in form of MIME-like format.
• Similar to SMTP as data is transferred between client and server.
• Differs from SMTP in way messages are sent from client to server and from server to client.
• SMTP messages are stored and forwarded while HTTP messages are delivered immediately.
87
Features of HTTP:
• Connectionless protocol: HTTP client initiates request and waits for a response from server.
When server receives request, it processes request and sends back response to HTTP client.
Connection between client and server exist only during current request and response time.
• Media independent: Data can be sent as long as both client and server know how to handle
data content. Required for both client and server to specify content type in MIME-type
header.
• Stateless: Both client and server know each other only during current request. Due to this
nature of protocol, both client and server do not retain information between various
requests of web pages.
88
HTTP Transactions
• HTTP client initiates a transaction by sending a request message to server.
• Server replies to request message by sending a response message.
89
Request and status lines
90
Methods
91
Status codes
92
Status codes
93
Header format
General headers
94
Request headers
95
Response headers
96
Entity Headers
97
Example – To retrieve a document
• Use GET method to retrieve an image with path /usr/bin/image1.
• Request line shows method (GET), URL, and HTTP version (1.1).
• Header has two lines that show client can accept images in GIF or JPEG format.
• Request does not have a body.
• Response message contains status line and four lines of header.
• Header lines define date, server, MIME version, and length of document.
• Body of document follows header.
Formulate a HTTP request-response model based on above instructions.
98
Solution – To retrieve a document
• Use GET method to retrieve an image with path /usr/bin/image1. Request line shows method
(GET), URL, and HTTP version (1.1): GET /usr/bin/image1 HTTP/1.1-------- Under request section
• Header has two lines that show client can accept images in GIF or JPEG format:
Accept: image/gif
Accept: image/jpeg
99
Solution – To retrieve a document
• Response message contains status line and four lines of header. Header lines define
date, server, MIME version, and length of document.
HTTP/1.1 200 OK
Date: Mon, 07-Jan-05 13:15:14 GMT
Server: Challenger
Content-length: 2048
• Body of document follows header: (Body of Document)
100
Solution – To retrieve a document
101
Example – Client sending data to server.
• Use POST method.
• Request line shows method (POST), URL, and HTTP version (1.1).
• There are four lines of headers.
• Request body contains input information.
• Response message contains status line and four lines of headers.
• Include created document (CGI document) as body.
Formulate a HTTP request-response model based on above instructions.
102
Solution – Client sending data to server.
• Use POST method. Request line shows method (POST), URL, and HTTP version (1.1).
Accept: */*
Accept: image/jpeg
Accept: image/gif
Content-length: 50
104
Solution – Client sending data to server.
105
SMTP – Simple Mail Transfer Protocol
• Set of communication guidelines that allow software to transmit an e-mail over internet.
• Program used for sending messages to other computer users based on e-mail addresses.
• Provides mail exchange between users on same or different computers
• Can send a single message (like - text, voice, video or graphics) to one or more recipients
• Can send messages on networks outside internet.
• Components of SMTP:
User Agent (UA): prepares message, creates envelope then puts message in envelope
Mail Transfer Agent (MTA): transfers this mail across internet.
106
SMTP – Case 1
• When sender and receiver of an e-mail are on same system, it needs only two user
agents.
107
SMTP – Case 2
• When sender and receiver of an e-mail are on different systems, two UAs and a pair of
MTAs (client and server) are needed
108
SMTP – Case 3
109
SMTP – Case 4- Most common situation
110
FILE TRANSFER (FTP) Protocol
• Transferring files from one computer to another is most common tasks expected
from a networking or internetworking environment.
• Greatest volume of data exchange in Internet today is due to file transfer.
• FTP uses services of TCP.
• It needs two TCP connections.
• Well-known port 21 is used for control connection and well-known port 20 for data
connection.
111
FILE TRANSFER (FTP) Protocol
112
Using control connection
113
Using data connection
114
Simple Network Management Protocol (SNMP)
• SNMP is a framework for managing devices in an internet using TCP/IP protocol suite.
• Provides a set of fundamental operations for monitoring and maintaining an internet.
SNMP Concept
115
Simple Network Management Protocol (SNMP)
• SNMP defines format of packets exchanged between a manager and an agent.
• Reads and changes status (values) of objects (variables) in SNMP packets.
116
SNMP Management
117
Syllabus Contents
• UNIT IV
Transport Layer Protocols- Design Issues, Quality of
Services. The Internet Transport Protocols. IPV4 vs IPV6.
Session Layer protocol- Dialog Management,
Synchronization, Connection Establishment. Quality of
service, security management, Firewalls.
Application layer protocols: HTTP, SMTP, FTP, SNMP, Etc.
118
Unit 4- Completed
Thanks