Computer Network Module 4
Computer Network Module 4
The Transport layer is the fourth layer in the OSI model, which provides communication services
between the computers connected in the network. The transport layer is responsible for process-to-
process delivery of the entire message. The ultimate goal of the transport layer is to provide efficient,
reliable, and cost-effective data transmission service to its users. To achieve this, the transport layer
makes use of the services provided by the network layer.
2. Explain UDP
● UDP stands for User Datagram Protocol.
● UDP is a connectionless protocol.
● UDP has a very limited error checking capability.
● This type of protocol is used when reliability and security are less important than speed and size.
● The packet produced by the UDP protocol is known as a user datagram.
● Source port address: It defines the address of the application process that has delivered
a message. The source port address is of 16 bits address.
● Destination port address: It defines the address of the application process that will receive
the message. The destination port address is of a 16-bit address.
● Total length: It defines the total length of the user datagram in bytes. It is a 16-bit field.
● Checksum: The checksum is a 16-bit field which is used in error detection.
Uses of UDP
● UDP protocol is suitable for multitasking.
● UDP is also applicable in the management processes.
● UDP is used to implement RIP (Routing Information Protocol).
4. What is TCP?
TCP stands for Transmission Control Protocol. TCP is a connection oriented protocol; it creates a
virtual connection between two TCPs to send data. In addition, TCP uses flow and error control
mechanisms at the transport level. In brief, TCP is called a connection-oriented, reliable transport
protocol.
5. Explain different TCP Services
1. Numbering System: There are two fields called the sequence number and the
acknowledgment number. These two fields refer to the byte number.
● Byte Number: The bytes of data being transferred in each connection are numbered by
TCP.
● Sequence Number: TCP assigns a sequence number to each segment that is being sent.
● Acknowledgment Number: The value of the acknowledgment field in a segment
defines the number of the next byte a party expects to receive.
2. Flow Control
TCP provides flow control. The receiver of the data controls the amount of data that are to be
sent by the sender.
3. Error Control: To provide reliable service, TCP implements an error control mechanism.
4. Congestion Control: The amount of data sent by a sender is not only controlled by the
receiver (flow control), but is also determined by the level of congestion in the network
7. Explain TCP segment format
● Source port address. This is a 16-bit field that defines the port number of the application
program in the host that is sending the segment.
● Destination port address. This is a 16-bit field that defines the port number of the
application program in the host that is receiving the segment.
● Sequence number. This 32-bit field defines the number assigned to the first byte of data
contained in this segment.
● Acknowledgment number. This 32-bit field defines the byte number that the receiver of the
segment is expecting to receive from the other party.
● Data offset. The number of 32-bit words in the TCP header. It indicates where the data
begins.
● Reserved. This is a 6-bit field reserved for future use.
● Control. This field defines 6 different control bits or flags. These bits enable flow control,
connection establishment and termination, connection abortion, and the mode of data
transfer in TCP.
● Window size. This field defines the size of the window, in bytes, that the other party must
maintain. The maximum size of the window is 65,535 bytes.
● Checksum. This 16-bit field contains the checksum.
● Urgent pointer. This l6-bit field, which is valid only if the urgent flag is set, is used when the
segment contains urgent data.
● Options. There can be up to 40 bytes of optional information in the TCP header.
8. What is TCP Connection?
File Transfer Protocol is a standard network protocol used to exchange and manipulate files
over a TCP/IP-based network, such as the Internet. FTP is built on client-server architecture and utilizes
separate control and data connections between the client and server applications. FTP is used with user-
based password authentication or with anonymous user access.
An FTP Server is a piece of software that is running on a computer and uses the File Transfer
Protocol to store and share files. The client has three components: user interface, client control process,
and the client data transfer process. The server has two components: the server control process and the
server data transfer process. The control connection is made between the control processes. The data
connection is made between the data transfer processes.
Control Connection
It is used to transfer control signals between the client and server. This connection is used by the control
process of client and server. FTP uses port number 21 for control connection. This control connection
remains connected during the entire interactive FTP session.
Data Connection
Data connection is used for actual data transfer. This connection is established between the Data
Transfer Process (DTP) of client and server. FTP uses port number 20 for data connection. The data
connection is opened and then closed for each file transferred. File transfer occurs over the data
connection under the control of the commands sent over the control connection.
FTP operations
When using FTP, the user performs some or all of the following operations:
● Connect to a remote host.
● Navigate and manipulate the directory structure.
● List files available for transfer.
● Define the transfer mode, transfer type, and data structure.
● Transfer data to or from the remote host.
● Disconnect from the remote host.
To use FTP, a user needs an account (user name) and a password on the remote server. Some sites
have a set of files available for public access, to enable anonymous FTP. To access these files, a user
does not need to have an account or password. Instead, the user can use anonymous as the user name
and guest as the password.
11. Explain the architecture of electronic
mail Architecture
a) User Agent
The first component of an electronic mail system is the user agent (VA). It provides service to
the user to make the process of sending and receiving a message easier. A user agent is a software
package (program) that composes reads, replies to, and forwards messages. It also handles mailboxes.
There are two types of user agents: command-driven and GUI-based.
Command-Driven Command-driven user agents belong to the early days of electronic mail. A
command-driven user agent normally accepts a one-character command from the keyboard to perform
its task.
GUI-Based Modern user agents are GUI-based. They contain graphical-user interface (GUI)
components that allow the user to interact with the software by using both the keyboard and the mouse.
MIME: - Multipurpose Internet Mail Extensions (MIME) is a supplementary protocol that allows non-
ASCII data to be sent through e-mail.
b) Message Transfer Agent: SMTP
The actual mail transfer is done through message transfer agents. To send mail, a system must have the
client MTA, and to receive mail, a system must have a server MTA. The formal protocol that defines
the MTA client and server in the Internet is called the Simple Mail Transfer Protocol (SMTP). SMTP
is used two times, between the sender and the sender's mail server and between the two mail servers.
SMTP simply defines how commands and responses must be sent back and forth.
SMTP uses commands and responses to transfer messages between an MTA client and an MTA server.
Commands are sent from the client to the server. It consists of a keyword followed by zero or more
arguments. SMTP defines 14 commands.
Responses are sent from the server to the client. A response is a three-digit code that may be followed
by additional textual information.
The process of transferring a mail message occurs in three phases: connection establishment, mail
transfer, and connection termination.
c) Message Access Agent: POP and IMAP
Currently two message access protocols are available: Post Office Protocol, version 3 (POP3) and
Internet Mail Access Protocol, version 4 (IMAP4).
POP3:- Post Office Protocol, version 3 (POP3) is simple and limited in functionality. Mail access starts
with the client when the user needs to download e-mail from the mailbox on the mail server. The client
opens a connection to the server on TCP port 110. It then sends its user name and password to access
the mailbox. The user can then list and retrieve the mail messages, one by one.
POP3 has two modes: the delete mode and the 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.
IMAP4:-Another mail access protocol is Internet Mail Access Protocol, version4 (IMAP4):- IMAP4
is similar to POP3, but it has more features;
IMAP4 provides the following extra functions
● A user can check the e-mail header prior to downloading.
● A user can search the contents of the e-mail for a specific string of characters prior to
downloading.
● A user can partially download e-mail.
● A user can create, delete, or rename mailboxes on the mail server.
● A user can create a hierarchy of mailboxes in a folder for e-mail storage.
12. What is Congestion in a network?
Congestion in a network may occur if the load on the network-the number of packets sent to the
network-is greater than the capacity of the network-the number of packets a network can
handle.
Congestion control refers to techniques and mechanisms that can either prevent congestion, before it
happens, or remove congestion, after it has happened. In general, we can divide congestion control
mechanisms into two broad categories: open-loop congestion control (prevention) and closed-loop
congestion control (removal)
⮚ Root server
A root name server (also called a DNS root server or a root server for short) is responsible for
fundamental functions when it comes to translating domain names into IP addresses. The root name
server doesn’t execute the name resolution itself and instead informs the requesting client about which
other name server (DNS server) it can obtain further information from regarding the desired IP address.
The IANA breaks up the TLD servers into two main groups:
● Generic top-level domains: These are domains that are not country specific, some of
the best-known generic TLDs include .com, .org, .net, .edu, and .gov.
● Country code top-level domains: These include any domains that are specific to a
country or state. Examples include .uk, .us, .ru, and .jp
⮚ Authoritative nameserver
The authoritative nameserver contains information specific to the domain name. An authoritative
name server is a server that stores DNS records for domain names.
20. How Does DNS Work?
Each device connected to the internet is assigned a unique IP address which helps other computers
identify it. DNS or Domain Name System basically translates those domain names into IP addresses.
A domain name and its matching IP address are called a “DNS record”.
✔ Suppose you want to visit a site you open your browser and type site name in the address bar
and hit Enter on the keyboard.
✔ If the DNS records are found in your computer’s DNS cache it is resolved immediately.
✔ If no DNS records are found, then a query is sent to your local DNS server. Typically this is
your Internet provider’s server and is often called a “resolving nameserver”.
✔ If the records are not cached on the resolving nameserver, then the request is forwarded to
a “root nameserver”.
✔ The root server then responds to the resolver with the address of a Top Level Domain
(TLD) DNS server (such as .com or .net), which stores the information for its domains.
✔ The TLD server then responds with the IP address of the domain’s nameserver,
✔ Lastly The IP address is then returned to the resolver from the nameserver.