[go: up one dir, main page]

0% found this document useful (0 votes)
19 views9 pages

Computer Network Notes On TCP UDP and Protocols

The document provides an overview of TCP and UDP, highlighting TCP's reliability and ordered delivery versus UDP's speed and low overhead. It also discusses the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Domain Name System (DNS), Simple Network Management Protocol (SNMP), and Multipurpose Internet Mail Extensions (MIME), outlining their functions and features. Each protocol serves distinct purposes in data communication and management within the internet ecosystem.

Uploaded by

jhonmath009
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)
19 views9 pages

Computer Network Notes On TCP UDP and Protocols

The document provides an overview of TCP and UDP, highlighting TCP's reliability and ordered delivery versus UDP's speed and low overhead. It also discusses the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Domain Name System (DNS), Simple Network Management Protocol (SNMP), and Multipurpose Internet Mail Extensions (MIME), outlining their functions and features. Each protocol serves distinct purposes in data communication and management within the internet ecosystem.

Uploaded by

jhonmath009
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/ 9

UNIT IV

Notes on TCP & UDP:


TCP is a layer 4 core communication protocol within the internet protocol which ensures
reliable, ordered, and error-checked delivery of data between devices. When two devices
establish a TCP connection, they perform a three-way handshake to confirm each other’s
presence and agree on parameters for data exchange. TCP breaks information into packets,
sends them, and then ensures all packets arrive in the correct order. If any packets are lost or
damaged during transmission, TCP automatically requests them to be re-sent. This approach
makes TCP ideal for applications where data accuracy is more important than speed, such as
browsing web pages, sending emails, and downloading files because users receive complete
and correctly sequenced information.

User Datagram Protocol (UDP) is a layer 4 communication protocol used in the


internet’s network layer, transport layer, and session layer. Unlike TCP it sends data as
independent packets called datagrams without first establishing a dedicated connection. This
means UDP does not guarantee delivery, order, or error correction, it simply sends data and
hopes it arrives. Because it skips these checks, UDP has very low overhead and latency which
makes it ideal for applications where speed is more important than perfect reliability.
Examples include live video streaming, online gaming, and voice calls, where a few missed
packets are often less noticeable than the delay that comes from waiting for perfect delivery.

UDP Header

UDP header is an 8-byte fixed and simple header, while for TCP it may vary from 20 bytes to
60 bytes. The first 8 Bytes contain all necessary header information and the remaining part
consists of data. UDP port number fields are each 16 bits long, therefore the range for port
numbers is defined from 0 to 65535; port number 0 is reserved. Port numbers help to
distinguish different user requests or processes.

UDP Header

 Source Port: Source Port is a 2 Byte long field used to identify the port number of the
source.
 Destination Port: It is a 2 Byte long field, used to identify the port of the destined
packet.
 Length: Length is the length of UDP including the header and the data. It is a 16-bits
field.
 Checksum: Checksum is 2 Bytes long field. It is the 16-bit one's complement of the
one's complement sum of the UDP header, the pseudo-header of information from the IP
header, and the data, padded with zero octets at the end (if necessary) to make a multiple
of two octets.

TCP vs UDP
User Datagram Protocol
Basis Transmission Control Protocol (TCP) (UDP)

UDP is the Datagram-


oriented protocol. This is
TCP is a connection-oriented protocol.
because there is no overhead
Connection orientation means that the
for opening a connection,
communicating devices should establish a
maintaining a connection, or
connection before transmitting data and
terminating a connection.
should close the connection after
UDP is efficient for broadcast
transmitting the data.
and multicast types of
Type of Service network transmission.

The delivery of data to the


TCP is reliable as it guarantees the
destination cannot be
delivery of data to the destination router.
Reliability guaranteed in UDP.

TCP provides extensive error-checking UDP has only the basic error-
Error checking mechanisms. It is because it provides flow checking mechanism using
mechanism control and acknowledgment of data. checksums.

Acknowledgme No acknowledgment
An acknowledgment segment is present.
nt segment.

Sequencing of data is a feature of There is no sequencing of


Transmission Control Protocol (TCP). this data in UDP. If the order is
means that packets arrive in order at the required, it has to be
Sequence receiver. managed by the application
User Datagram Protocol
Basis Transmission Control Protocol (TCP) (UDP)

layer.

UDP is faster, simpler, and


TCP is comparatively slower than UDP.
Speed more efficient than TCP.

There is no retransmission of
Retransmission of lost packets is possible
lost packets in the User
in TCP, but not in UDP.
Retransmission Datagram Protocol (UDP).

TCP has a (20-60) bytes variable length UDP has an 8 bytes fixed-
Header Length header. length header.

Weight TCP is heavy-weight. UDP is lightweight.

Handshaking Uses handshakes such as SYN, ACK, It’s a connectionless protocol


Techniques SYN-ACK i.e. No handshake

Broadcasting TCP doesn’t support Broadcasting. UDP supports Broadcasting.

UDP is used by DNS, DHCP,


TCP is used by HTTP,
TFTP, SNMP , RIP,
HTTPs , FTP , SMTP and Telnet .
Protocols and VoIP.

UDP connection is a message


The TCP connection is a byte stream.
Stream Type stream.

Overhead Low but higher than UDP. Very low.

This protocol is used in


This protocol is primarily utilized in situations where quick
situations when a safe and trustworthy communication is necessary
communication procedure is necessary, but where dependability is
such as in email, on the web surfing, and not a concern, such as VoIP,
in military services. game streaming, video, and
Applications music streaming, etc.
Unit V

The Hypertext Transfer Protocol (HTTP)

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,


collaborative, hypermedia information systems. This is the foundation for data communication
for the World Wide Web (i.e. internet) since 1990. HTTP is a generic and stateless protocol
which can be used for other purposes as well using extensions of its request methods, error
codes, and headers.

Basic Features of HTTP

The basic features that make HTTP a simple but powerful protocol are mentioned below:

 Stateless: Each request is treated as a new request i.e both client and server forget about
each other after completion of a request unless cookies, tokens or sessions are used.

 Connectionless: The connection between client and server is closed after the completion
of each request making it a connectionless protocol.

 Media Independent: Any type of data can be transferred over web using HTTP protocol,
as long as both the client and server specify the format using MIME types.

 HTTP Methods: HTTP defines various methods for different actions such as GET,
POST, PUT and more.

 Caching Support: HTTP provides support for caching which improves the performance
by storing the copies of responses and reusing them later.
Basic Architecture of HttP

File Transfer Protocol (FTP)


The full form of FTP is File Transfer Protocol. It is a standard internet protocol provided by
TCP/IP which is used for transmitting the files from one system to another system.
The main purpose of FTP is for transferring the web page files from one system to the computer
which acts as a server for other computers on the internet. It is also helpful for downloading the
files to compute from other servers.
The objectives of FTP are as follows −
 FTP provides file sharing.
 FTP helps us to encourage the use of remote computers.
 FTP used to transfer the data reliably and efficiently.
The features of FTP are as follows −
 Data representation
 File organization and Data structures
 Transmission modes
 Error control
 Access control

The domain name system (DNS)


The domain name system (DNS) is a naming database in which internet domain names are
located and translated into Internet Protocol (IP) addresses. The domain name system maps the
name people use to locate a website to the IP address that a computer uses to locate that website.

For example, if someone types "example.com" into a web browser, a server behind the scenes
maps that name to the corresponding IP address. An IP address is similar in structure to
203.0.113.72.

Web browsing and most other internet activities rely on DNS to quickly provide the information
necessary to connect users to remote hosts. DNS mapping is distributed throughout the internet
in a hierarchy of authority. Access providers and enterprises, as well as governments, universities
and other organizations, typically have their own assigned ranges of IP addresses and an
assigned domain name. They also typically run DNS servers to manage the mapping of those
names to those addresses. Most Uniform Resource Locators (URLs) are built around the domain
name of the web server that takes client requests.

How DNS works

DNS servers convert URLs and domain names into IP addresses that computers can understand
and use. They translate what a user types into a browser into something the machine can use to
find a webpage. This process of translation and lookup is called DNS resolution.

The basic process of a DNS resolution follows these steps:

1. The user enters a web address or domain name into a browser.


2. The browser sends a message, called a recursive DNS query, to the network to find out
which IP or network address the domain corresponds to.
3. The query goes to a recursive DNS server, which is also called a recursive resolver, and
is usually managed by the internet service provider (ISP). If the recursive resolver has the
address, it will return the address to the user, and the webpage will load.
4. If the recursive DNS server does not have an answer, it will query a series of other
servers in the following order: DNS root name servers, top-level domain (TLD) name
servers and authoritative name servers.
5. The three server types work together and continue redirecting until they retrieve a DNS
record that contains the queried IP address. It sends this information to the recursive DNS
server, and the webpage the user is looking for loads. DNS root name servers and TLD
servers primarily redirect queries and rarely provide the resolution themselves.
6. The recursive server stores, or caches, the A record for the domain name, which contains
the IP address. The next time it receives a request for that domain name, it can respond
directly to the user instead of querying other servers.
7. If the query reaches the authoritative server and it cannot find the information, it returns
an error message.

Simple Network Management Protocol (SNMP)

SNMP is an application-layer protocol that transmits management data between network devices.
SNMP belongs to the Transmission Control Protocol/Internet Protocol (TCP/IP) family and is
one of the most widely used network protocols for managing and monitoring network
components across a variety of industries.

The majority of network components come with an integrated SNMP agent. To connect
with network monitoring tools or the network management system, these agents have to be
activated and set up. Afterward, SNMP can be used to gather and organize data about each
device.To maintain constant uptime and high-bandwidth network operations, network
administrators control network devices and assign interfaces and ports. By strategically assigning
the optimal ports that devices can use to communicate, IT teams make it easier for traffic to flow
through the network more freely. Otherwise, there will be data “log jams” that result
in latency and poor performance. SNMP device monitoring is a significant element of this
process.

Multipurpose Internet Mail Extension (MIME) Protocol

MIME (Multipurpose Internet Mail Extensions) is a standard used to extend the format of email
messages, allowing them to include more than just text. It enables the transmission of multimedia
content such as images, audio, video, and attachments, within email messages, as well as other
types of content types.

It was designed to make email messages more versatile and allow a wider variety of content to
be sent over email systems that traditionally only supported plain ASCII text. MIME works by
encoding the message content in a way that ensures it can be transmitted over email protocols
like SMTP (Simple Mail Transfer Protocol) without loss of data or corruption. It breaks down
the data into a format that's safe for email transmission and provides metadata that helps identify
the type of content.

Characteristics of MIME

 Text Encoding: It allows email messages to contain characters from character sets
beyond ASCII (such as UTF-8).

 Attachments: It enables emails to include multimedia content such as images, video, and
audio files as attachments.

 Multipart Messages: It allows the message to be divided into multiple parts, such as
plain text and HTML content, or different types of media files.

 Header Fields: It introduces special header fields that define how the content should be
interpreted (e.g., Content-Type, Content-Disposition).

You might also like