0% found this document useful (0 votes)
8 views14 pages

Network Types and Protocols Overview

The document provides an overview of network types, including Local Area Networks and various WAN configurations, as well as the principles of protocol layering in communication systems. It discusses the TCP/IP protocol suite, the OSI model, and the administration of internet standards, including the roles of ISOC, IAB, IETF, and IRTF. Additionally, it covers application layer protocols, client-server and peer-to-peer paradigms, and standard applications like HTTP and FTP.

Uploaded by

jatink1
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)
8 views14 pages

Network Types and Protocols Overview

The document provides an overview of network types, including Local Area Networks and various WAN configurations, as well as the principles of protocol layering in communication systems. It discusses the TCP/IP protocol suite, the OSI model, and the administration of internet standards, including the roles of ISOC, IAB, IETF, and IRTF. Additionally, it covers application layer protocols, client-server and peer-to-peer paradigms, and standard applications like HTTP and FTP.

Uploaded by

jatink1
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

Chapter 1

Overview
• A network is the interconnection of a set of devices capable of communication.
• Local Area Network: usually privately owned and connects some hosts in a single o ce,
building, or campus.
• Point-to-point WAN: a network that connects two communicating devices through a
transmission media.
• Switched WAN: a network with more than two ends.
• When two or more networks are connected they become internet.
• An internet is a switched network in which a switch connects at least two links together
• In a circuit switched network a dedicated connection, is always available between the two end
systems. Circuit switched network is e cient only when it is working at its full capacity.
• Packet switched network: obvious
• A router in a packet-switched network has a queue that can store and forward the packet.
• The Internet:
• At the top level, the backbones are large networks owned by - Sprint, Verizon (MCI), AT&T, and
NTT.
• Backbone networks are connect through some complex switching systems, called peering
points.
• Provider networks, use backbones for a fee.
• Together these are ISPs.
• Accessing the Internet:
• Using telephone networks:
• Dial-up service: modem that converts data to voice. slow and useful for small residences.
• DSL service: higher speed internet services

Protocol Layering
• A protocol de nes the rules that both the sender and receiver and all intermediate devices need
to follow to be able to communicate e ectively.
• Protocol layering enables us to divide a complex task into several smaller and simpler tasks.
• Protocol layering separates the services from the implementation
• Communication involves intermediate systems also, which can be just as complex as required.
• Dis: Single layer makes job easier (but does it?)
• Principles of protocol layering:
• First principle dictates that if we want bidirectional communication , we need to make each
layer so that it is able to perform two opposite tasks, one in each direction.
• Second principle is that two objects under each layer at both sites should be identical.
• TCP/IP protocol suite: Application, Transport, Network, Data link, Physical
• Application Layer: the logical connection, end-to-end, exchange messages, between two
processes.
• Transport Layer: end-to-end, logical connection, exchange packets (segment or datagrams).
SCTP (stream control transmission protocol)
• Network Layer: host-to-host communication and routing the packet through possible routes.
IP is a connectionless protocol that provides no ow control , no error control, and no
congestion control services. ex of protocols - Internet Control Message Protocol (ICMP),
Internet Group Management Protocol (IGMP)
• Data-link layer: routers in network layer decide best link, data link layer takes the datagram
across the link. Uses frames.
• Physical Layer: Logical connection, transmission medium are hidden layer, they use electric,
optic signals but physical layers assumes bits.
message -> segment(TCP)/ user datagram (UDP) -> datagrams -> frames.
Names -> port numbers -> logical addresses -> link layer addresses (MAC address) (no address
for physical)
fi
ff
ffi
fl
ffi
Multiplexing, Demultiplexing: Since TCP/IP protocol suite uses several protocols at some layers
we can say that we have multiplexing at the source and demultiplexing at the destination. To be
able to multiplex and demultiplex, a protocol needs to have a eld in its header to identify to
which protocol the encapsulated packets belong.

OSI Model:
International organisation for standardisations proposed Open Systems Interconnections (OSI)
model. An open system is a set of protocols that allows any two di erent systems to
communicate regardless of their underlying architecture.
OSI model has two extra layers -> Session and Presentation
The application layer in TCP/IP is considered combination of three layers
Two reasons for this:
• TCP/IP has more than one transport layer protocol, some of the functionalities of the session
layer are available in some of the transport layer protocols.
• The application layer is not only one piece of software. Many applications can be developed at
this layer if some of the functionalities mentioned in the session and presentation layers are
needed for a particular application, they can be included in the development of that piece of
software.
Reason for OSI fail:
• OSI was completed when TCP/IP was fully in place and a lot of time and money had been spent
on the suite.
• Some layers of the OSI model were not fully de ned. Presentation and session layers did not
have fully de ned protocols, and software wasn’t fully developed
• It did not show a high enough level of performance to entice the Internet Authority to switch
from the TCP/IP protocol suite to the OSI model.

Internet History
Read yourself

Standards and Administration


Internet standard is a thoroughly tested speci cation that is useful to and adhered to by this who
work with the Internet.
Internet draft is a working document with no o cial status and a six-month lifetime. A draft may
be published as a Request for Comment (RFC). Each RFC is edited, assigned a number and
made available to all interested parties.
Maturity Levels:
• Proposed standard: speci cation that is stable, well understood and of su cient interest to the
Internet community.
• Draft standard: elevated to draft standard after status after at least two successful independent
and interoperable implementations.
• Internet standard: demonstrations of successful implementation.
• Historic: they either have been superseded or have never passed the maturity levels
• Experimental: work related to an experimental situation
• Informational: general, historical, or tutorial information related to the Internet.
Requirement Levels:
• Required: It must be implemented by all Internet systems to achieve minimum conformance.
• Recommended: not required for minimum conformance, but recommended for usefulness
• Elective: can use for own bene t
• Limited Use: used in limited situations (experimental RFCs)
• Not recommended: inappropriate for general use. (historic RFC)
Internet Administration:
General organisation of the Internet Administration:
ISOC: Internet society, international, nonpro t organisation formed in 1992 to provide support for
the Internet standards process.
fi
fi
fi
fi
fi
fi
ffi
fi
ff
ffi
IAB: Internet Architecture Board is the technical advisor to the ISOC. Main purpose is to oversee
the continuing development of the TCP/IP protocol suite. IAB has two components: IETF, IRTF
IETF: Internet Engineering Task Force, managed by (Internet Engineering Steering Group IESG),
they identify operational problems and propose solutions. Review speci cations intended as
Internet Standards.
IRTF: Internet Research Task Force, focus on long-term research topics.
IANA and ICANN: Internet assigned numbers authority, (supported by U.S government) later
position taken by Internet corporation for assigned names and numbers.
Network Information Center: responsible for collecting and distributing information about TCP/
IP protocols.

fi
Chapter 2: Application Layer

Introduction
• The application layer provides services to the user. The two application layers assume that there
is an imaginary direct logical connection (two - way).
• If a protocol is added to each layer, it should be designed in such a way that it uses the service
provided by one of the protocols at the lower layer.
• The protocols used in the rst four layers of the TCP/IP suite need to be standardised and
documented. Application layer protocols can be standard or non standard.
• Paradigm of application-layer:
• Client-server paradigm: a.k.a traditional paradigm. The concentration of the communication
load is on the shoulder of the server, this means there should be a service provider willing to
accept the cost and create a powerful sever for a speci c service which means server should
earn money.
• Peer-to-peer paradigm: a.k.a new paradigm. for e.g internet telephony. The main challenge is
security. The other challenge is applicability, this does not have many use cases.
• Mixed paradigm

Client - Server Paradigm


• A server must be running (in nite) when a request arrives, client needs to run only when it wants
( nite).
• APIs for communication such as socket interface, transport layer interface, STREAM etc.
• Socket interface: is a set of instructions that can be used by a process to communicate with
another process. Sockets mimic a physical entity and have inputs and outputs (like a keyboard,
or monitor).
• The client thinks that the socket is the entity that receives the request and gives the response,
the server thinks that the socket is the one that has a request and needs a response.
• Socket address consists of 32 bit IP address and 16bit port number
• For a socket to form we need a local socket address and a remote socket address.
• Server side: Local socket address: OS knows the IP address of the computer on which the
process is running, the port number is assigned. Remote socket address: the client socket
address, is contained in the request packet sent to the server.
• Client side: Local socket address: IP address is known, the port number is a 16-bit temporary
integer that is assigned to a client each time the process starts communication. (Ephemeral
(temp) port numbers). Remote socket address: Case 1: server IP and port are hardcoded, Case
2: socket is a standard socket but URLs and DNS are used to nd IP address.
• Using services of the transport layer:
• UDP protocol: Connectionless, unreliable, datagram (encapsulated packets) service. It may
check that the data is not corrupted during transmission, but no further action takes place.
• It is message oriented, it gives boundaries to messages exchanged
• It is useful in send small messages, and speed and simplicity is more important that
reliability
• TCP protocol: provides connection-oriented byte-stream service. Initial connection phase is
called handshaking. Two way. TCP is reliable and can provide ow control and congestion
control. It is not message oriented as it does not put boundaries on the messages exchanged.
• Most of the standard applications that need to send long messages and require reliability
may bene t from the service of the TCP.
• SCTP Protocol: SCTP provides connection-oriented, reliable service, message-oriented like
UDP. SCTP can provide multi stream service by providing multiple network layer connections.
• Suitable for application that needs reliability and at the same time needs to remain
connected, even if a failure occurs in one network layer connection.

Standard Client-Server Applications


World wide web and HTTP: distributed client-server service.
fi
fi
fi
fi
fi
fl
fi
Web client (Browser) interpret and display a web page, all use the same architecture, a
controller, client protocols, and interpreters.
Web server where web pages are stored. Uses caching, multithreading and multiprocessing.
Uniform Resource Locator consists of 4 parts, protocol (HTTP, FTP), the host (IP address or
DNS), the port (decided when required else is a standard port), path (path in local computer).
Web documents: static, dynamic, active
• Static documents: The contents of the le are determined when they are created, user cannot
change them. HTML, XSL, XTML, XHTML etc.
• Dynamic documents: Created by a web server whenever a browser requests the document.
Retrieval of time and date from a server. Old: Common Gateway Interface (CGI), new: Java
server pages, Active server pages (Visual basic language by Microsoft), ColdFusion, which
embodies queries in a SQL.
• Active documents: When script is run on client side, such as animating graphics. Java applets
and javascript.
HTTP: Hyper Text Transfer Protocol. HTTP server uses port 80, uses TCP.
Non-persistent vs persistent
• Non-persistent: one TCP connection is made for each request/response. Imposes high
overhead on the server because server needs di erent bu ers each time a connection is
opened.
• Persistent: Made standard in HTTP 1.1 , server can close the connection at the request of a
client or if a time out has been reached. The sender sends length of data with each response,
however if length is not known (in the case of dynamic documents) the server sends data and
closes connection after data is received.
Message formats
Request message:
Version - 1.1
Methods:
Followed by zero or more header lines
Response message
version - 1.1
the status code eld de nes the status of the request. It consists of three digits. Codes in the
range 100 are only informational, codes in the range 200 indicate successful request, codes in the
range 300 redirect the client to another Url, and codes in the range 400 indirect error at the client
site, codes in the range 500 indicate an error at the server site.
Followed by zero or more response header
Conditional request, the server will send the requested web page if the condition is met or inform
the client otherwise.
Cookies:
• Creating and storing cookies: When server receives request from a client, it stores information
and sends it back to the client in the response which the browser then keeps in cookie directory
sorted by server domain name.
• Using cookies: When the client sends a request it checks if the cookies are presents and sends
them with the request.
• Set-cookie is a new server header and Cookie is a new client header
Web caching: Proxy Server
• A proxy servers is a computer that keeps copies of responses to recent requests. The proxy
server cache’s requests and responses improving latency and reducing load on the main server.
• Proxy servers are client side.
Cache update: how long a response should remain in pray server? Store the list of sites whose
information remains same for a while. For e.g the news website needs to update every day.
Another recommendation is to add some headers to show the last modi cation time of the
information.
HTTP Security: using Secure Socket Layer(SSL) to form HTTPS

File Transfer Protocol (FTP):


• Client has user interface, client control process, and the client data transfer process.
• Server has server control process and the server data transfer process.
• Separation of commands and data transfer makes FTP more e cient.
fi
fi
fi
ff
ff
ffi
fi
• Lifetimes of two connections: The control connection remains connected throughout the
session and the data connection is formed only when the le transfer happens.
• port 20 is used for data connection and port 21 is used for control connection.
• Control connection: uses NVT ASCII character set. Each line is terminated with a two-
character (carriage return and line feed) end-of-line token.
• Command followed by argument is sent by the client

• Response has a three digit number followed by text.


• Data connection: Client issues a passive open using ephemeral port, sends the port to server
using PORT command and then server issues an active open on its port 20.
• Communication over Data connection: we must de ne, the type of le to be transferred, the
structure of the data, and the transmission mode. We de ne three attributes of communication:
le type, data structure, and transmission mode.
• Data structure:
• File structure: has no structure, it is a continuous stream of bytes
• Record structure: le is divided into records, can be used only in text les
• Page structure: le is divide into pages, with each page having page number and a page
header. The pages can be stored and accessed randomly or sequentially.
• File type: ASCII le, EBCDIC le, or image le.
• Tranmission mode:
• Stream mode: default, delivered from FTP to TCP as continuous stream of bytes.
• Block Mode: data can be delivered from FTP to TCP in blocks, each block is preceded by a 3-
byte header, the rst byte is block descriptor followed by 2 bytes for byte length.
• Compressed mode
• File Transfer: retrieving a le, storing a le, listing the directory.
• SSL over FTP — SSL-FTP

Electronic Mail:
• E-mail is considered one-way transaction.
• Architecture: The electronic mail systems needs two UAs (user agent), two pairs of MTAs (mail
transfer agent) (client and server) and a pair of MAAs (Mail access agent)(client and server).
• User Agent: A user agent is a software package (program) that composes, read, replies to, and
forwards messages. It also handles local mailboxes on the user computers. They can be
command-driven or GUI-based. like Outlook.
• Sending mail: It has envelope and message, envelope contains sender address and receiver
address. The message contains header and body, header has sender, receiver, the subject of
the message.
• Receiving mail: Basically they explain what outlook looks like.
• Address: local part ‘@‘ domain name
• The domain name assigned to each mail exchanger either comes from the DNS database or is
a logical name (for example, the name of the organisation)
• Mailing list or group list: Aliases in the alias database.
• SMTP: SMTP is used two times, between the sender and the sender’s mail server and between
the two mail servers
• Command and responses: terminated by a two-character (carriage return and line feed) end-
of-line token.
• Commands: Keyword followed by argument
• Responses: three digit code followed by additional description
• Mail transfer phases:
• Connection Establishment: Port 25, client makes TCP connection. Server sends code 220
(service ready), else 421 (service not available). The client send the HELO message to
identify itself using its domain name address. The server responds with 250 (request
command completed).
• Message transfer: client sends MAIL FROM (to introduce sender, and for receiving error) ->
server responds with 250 -> client sends RCPT TO (recipient) -> server responds with 250
-> client sends DATA -> server responds with 354 (start mail input). -> client sends data line
by line and nished with end-of-line token.->server 250.
• Connection Termination: client QUIT -> server 221
• SMTP is a push protocol, third stage is a pull protocol, third stage uses message access agent.
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
• POP3 (post o ce protocol): Simple but limited, Opens connection to server on port 110 (TCP),
then sends username and password, on OK retrieves all mail one by one.
• POP3 has two modes, delete mode and keep mode. In the delete mode, the mail is deleted
from the mailbox after each retrieval, in the keep mode the mail remains in the mailbox after
retrieval. The delete mode is used when the user is working on their permanent computer, the
keep mode is used when the mail is accessed from multiple computers.
• IMAP4: Internet Mail access protocol version 4. IMAP4 is more powerful and more complex.
• POP3 does not allow the user to organise the mail on the server, have di erent folders, partially
check contents of mail before downloading. IMAP4 adds these features.

MIME: Multipurpose Internet Mail Extensions is a supplementary protocol that allows non-ASCII
data to be sent through e-mail, increasing language support. Electronic mail can only send
messages in NVT 7-bit ASCII format. MIME transforms non-ASCII data at the sender site to NVT
ASCII data and delivers it to the client MTA to be sent through the internet. The message ate the
receiving is transformed back to the original data. MIME de nes 5 headers
• MIME-version: current version is 1.1
• Content-type: type/subtype types include text, image, video, audio, application etc.
• Content-transfer-encoding: method used to endow the messages including binary, 8-bit, 7-bit
etc.
• Base64: write down 8bit representation break into 6 bits and write ASCII representation
• Quoted-printable: write the non-ASCII with equal to and follow base64 for only that.
• Content-ID identi es the whole message in a multiple message environment
• Content Description: de nes the body

Web based mail: websites today provide this service to anyone for ex - GMAIL.
In this instead of IMAP4 and POP3, HTTP is used. Client can also use HTTP client.
Email security: secured using two application layer protocols: Pretty Good Privacy (PGP) and
Secure/Multipurpose Internet Mail Extensions (S/MIME).

TELNET:
Telnet (TErminaL NETwork) and SSH are remote logging applications.
Local login, Remote login, pseudo terminal driver.
Network Virtual Terminal Character set (used because terminal commands di er based on OS). 8-
bit system with MSB set 0 for ASCII and 1 for control characters
Options are extra features available to a user with a more sophisticated terminal.
User Interface with user-friendly commands

Secure Shell (SSH):


Originally designed to replace TELNET, SSH-1 and SSH-2, incompatible. SSH-1 is deprecated.
Components: Three components:
• SSH-TRANS: Transport Layer Protocol. This protocol uses TCP to create a secured channel on
top of the TCP. Services provided: Privacy, Data integrity, Server Authentication, Compression of
the messages.
• SSH-AUTH: After server is authenticated by client, sever calls this process to authenticate
client. Similar to SSL. The request includes the user name, server name, the method of
authentication and the required data.
• SSH-CONN: Connection Protocol. Provides multiplexing, takes the secure channel and create
multiple logical channels over it, each channel can be used for a di erent purpose.
Applications: SSH for remote logging (Tectia, PuTTy )and SSH for le transfer (sftp).
Port forwarding: creates a tunnel through which the message belonging to other protocols can
travel (SSH tunnelling). Using port forwarding to access SMTP on another computer.
Format of the SSH Packets:
4 bytes : length (not including length of padding)
1-8 bytes: padding
1 bye : type
variable: data
4 byes: CRC (cyclic redundancy checksum)

Domain Name System (DNS):


ffi
fi
fi
fi
ff
fi
ff
ff
at name space vs hierarchical name space.
Domain name space: hierarchical name space. Tree can have only 128 levels (0-127).
Label: max 63 characters, root is null, each children should be unique
Domain name: fully quali ed domain name if from node to root (FQDN), else it is PQDN, it is used
when the name to be resolved belongs to the same site as the client. here the resolver can supply
the missing part, called the su x to create FQDN.
Domain: Subtree of the domain name space. Name of domain is label of root of subtree
Distribution of name space: root is left alone, rest is distributed among servers.
Hierarchy of name servers: DNS servers.
Zone: A zone is a contiguous part of the entire tree and is what a server has authority over.
Root server: Server whose zone consists of the whole tree.
Primary server: stores a le about the zone for which it is an authority. It is responsible for
creating, maintaining and updating the zone le. It stores the zone le on a local disk.
Secondary server: server that transfers the complete information about a zone from another
server and stores the les on its local disk. It is used as a backup if primary server fails. A server
may be primary for one and secondary for another.

Security of DNS:
DNS Security (DNSSEC) provides message origin authentication and message integrity using
digital signature. Doesn’t provide con dentiality for the DNS messages and no protection against
DOS attacks, caching system protects upper level servers against this attack to some extent.

Peer-to-peer paradigm
Centralised networks:
Listing of the peers and what they o er uses client-server paradigm, but the storing and
downloading of the les are done using the peer-to-peer paradigm.
Makes the maintenance of the directory simple, accessing the directory can generate huge tra c,
and if central directory is attacked entire system fails.
Decentralised networks:
peers arrange themselves into an overlay network, which is a logical network made on top of the
physical network.
Unstructured: In the name, ine cient as query must go through entire network. Eg. Gnutella and
Freenet.
Gnutella: ooding is somehow controlled to prevent huge tra c loads, one of the reasons that
Gnutella can not be scaled well it the ooding. A node needs to know the address of at least one
neighbour, this is done at the bootstrap time, when the node install the Gnutella software for the
rst time. The software includes a list of nodes that can record as neighbours. Later ping and
pong are used.
Newer version uses tiered system, of ultra nodes and leaves to make more e cient, also adds
Query Routing Protocol (QRP), Dynamic Querying (DQ) to reduce tra c overhead and make
searches more e cient.
Structured: prede ned set of rules to link nodes. Most common technique: Distributed Hash
table (used by BitTorrent) (DHT).
DHT is used in distributed data structure (DDS), Content Distributed Systems (CDS), Domain
Name Systems (DNS) and P2P le sharing.
fl
fi
fl
ffi
fi
fi
fi
fi
fi
ffi
ffi
fi
ff
fi
fl
fi
ffi
fi
ffi
ffi
ffi
Chapter 3

Transport-Layer Services
Process-to-process Communication: The rst duty of a transport-layer protocol. Process-to-
process means not only getting from source to destination computer but also to the correct pro
cess.
Addressing: Port Numbers: port number between 0-65535 (16-bits). Ephemeral port number has
to be greater than 1023.
ICANN Ranges:
• well-known: ports ranging from 0 to 1023
• registered ports: 1024 - 49151
• dynamic-private: 49152-65535
IP address + Port address = Socket address
The packets at the transport layers in the Internet are called user datagrams, segments, or
packets.
Multiplexing: When an entity accepts items from more than one source
Demultiplexing: vice versa.
Multiple messages form multiple packets (multiplexer) these packets go to multiple destinations
where they are extracted and sent to respective processed (demultiplexer)
Pushing: If the sender delivers items whenever they are produced without a prior request from the
consumer
Pulling: If the producer delivers the items after the consumer has requested them
When the producer pushes the items, the consumer may be overwhelmed and there is a need for
ow control.

Use bu ers where ow control is required.


Error Control: Detecting and discarding corrupt packets, Keeping track of lost and discarded
packets and resending them. Recognising duplicates and discarding them. Bu ering out-of-order
packets until the missing packet arrives.
The receiving transport layer manager error control, by informing the sending transport layer
about the problems.
Acknowledgement: Positive error control signal, receiver sends sender acknowledgment that he
has received packet safe and sound.
Combination of Error control and ow control: Two bu ers one at each site.
Sliding window is used in bu er
Congestions at the transport layer is actually the result of congestion at the network layer, which
manifests itself at the transport layer.
fl
ff
fl
ff
fl
fi
ff
ff
Connectionless Service: interdependency between packets. The transport layer treats each
chunk as a single unit without any relation between the chunks. No ow control, error control, or
congestion control can be e ectively implemented.
Connection-Oriented service: client-server logical connection, exchange dependent packets,
tear down connection. the service is end-to-end. only involves the two hosts. Can implement all
controls.

Transport Layer Protocols


Simple Protocol: connectionless protocol, no error, ow control. Assume receiver is always
ready.
ff
fl
fl
Stop and Wait Protocol: connection-oriented protocol. Both ow and error control. Sliding
window of size 1. Checksum for error control, timer for ow control. We need sequencing number
0, 1 only. Acknowledgement numbers always announce the sequence number of the next packet
expected by the receiver.

E ciency: The stop and wait protocol is very ine cient if our channel is thick and long.
Round trip delay is long + large bandwidth -> bandwidth delay product.
No pipelining in stop and wait

Go-Back-N Protocol
(GBN):
We can send several
packets before receiving
acknowledgments, but
the receiver can only
bu er one packet.
Send window: an
imaginary box covering
the sequence numbers of
the data packets that can
be in transit or can be
sent.
Receive window: makes
sure that the correct data
packets are received and
that the correct
acknowledgments are
sent. In GBN the size of
this window is 1.
ffi
ff
ffi
fl
fl
Selective Repeat Protocol:
Simpli es process at the receiver as it keeps track of only one variable. Two windows, the
maximum size of the send window is 2^m-1. The size of the receive window is the same.
Acknowledgment is about sequence received.
Why window size is at most half? This you can read from book, good explanation.

Piggybacking: in two way connections, one direction data is sent with the acknowledgment for
other direction.

User Datagram Protocol (UDP)


connectionless, unreliable transport protocol. Minimum of overhead.
User datagrams - xed header of 8 bytes , 2 bytes source port, 2 bytes destination port, 2 bytes
total length (including header), 2 bytes checksum.
UDP services: process-to-process communication, connectionless service, no ow control, only
checksum error control, no congestion control, encapsulation and decapsulation is there,
multiplexing demultiplexing is there.
fi
fi
fl
checksum: calculation includes three sections: a pseudo-header, the UDP header, and the data
coming from the application layer. The pseudo-header is the part of the header of the IP packet, in
which the user datagram is to be encapsulated with some elds lled with 0s. If the check sum
does not include the pseudo-header, a user datagram may arrive safe and sound. However, if the
IP header is corrupted it may be delivered to the wrong host. The protocol eld is added to ensure
that the packet belongs to UDP. UDP - 17. Sender decides not to calculate checksum, the
checksum eld is lled with all -0s.

In UDP, queues are associated with ports.


The only di erence between UDP and simple protocol is of checksum.

UDP Applications:

• Connectionless service: connectionless service is better if requests and response are short,
delay is an important issue. DNS uses UDP, SMTP cannot use UDP
• Lack of error control: good where uneven delay is not good but some information lost is ne.
Good for video calls, bad for pdfs
• Lack of congestion control: does not create extra tra c in error-prone network.
• UDP is also used with internal ow and error control mechanisms.

Transmission Control Protocol (TCP):


connection-oriented, reliable protocol. Uses combination of GBN and SR protocols to provide
reliability. Uses checksum, retransmission of lost or corrupted packets, cumulative and selective
acknowledgements and timers.
TCP services: process-to-process communication. allows sending process to deliver data as a
stream of bytes. Has sending and receiving bu ers. Uses segments, (group of bytes with a
header). Full-duplex, data can ow in both direction at the same time. Connection oriented
service. Reliable service.
TCP features:
• Numbering System
• Byte number: number is independent in each direction, doesn’t have to start at 0.
• Sequence number: seq no of the rst segments is the initial sequence number, any other
segment is seq no of the previous segment + number of bytes carried by the previous
segment. Sometimes, empty segments with only control data are sent, they are counted as
one byte.
• Acknowledgment number: the number of next byte and is cumulative.
fi
ff
fi
fl
fl
fi
ff
ffi
fi
fi
fi
fi
Segment: header is 20-60 bytes.

HLEN - header length - number of 4-byte words in the TCP.

Window size, is determined by the receiver.


Checksum - mandatory. The same pseudo-header is added. value of protocol is 6
urgent pointer - valid if urgent ag is set.
TCP segment encapsulates the data received from application layer.
fl

You might also like