Bcs 052 1
Bcs 052 1
Communication is a vital part of personal life and is also important in business, education, and any other situation
where people encounter each other. Communication between two people is an outgrowth of methods developed
over centuries of expression. Gestures, the development of language, and the necessity to engage in joint action all
play a part.
ARPANET : In the mid 1960s, the Advanced Research Projects Agency (ARPA) in the US Department of Defence
(DoD) wanted to find a way to connect computers so that their funded researchers could share their findings. In
1967, ARPA proposed its idea for ARPANET, a small network for connecting computers.
TCP/IP LAYERS AND PROTOCOLS : The TCP/IP model is made up of four layers: interface layer, network, transport,
and application. The first layer of TCP/IP (Application layer) is similar to the first three layers (Application,
presentation and Session layer) of the OSI model. The services of transport layers of both the models are similar.
Further, the services of network layers in both models are also similar, while some time network layer is also
known as Internet layer. The last layer of TCP/IP is interface layer, which includes the services of data link layer and
physical layer of OSI model. In OSI model, each layer takes the services of the lower layer.
Layers of TCP/IP Protocol Suite : As we know TCP/IP contains four layers and each layer has its specific functions,
in the following section lets find out the functions of each layer of TCP/IP.
Interface layer or (Physical + Data Link Layer) : The physical layer deals with the hardware level like, transmission
media, connections and the voltage for digital signals. The data link layer deals with media access and control
strategies, frame format etc.
Internet Layer or Network Layer : The Internet layer is an important layer in the protocol suite. At this layer,
TCP/IP supports Internetworking Protocol (IP). IP is a host-to-host protocol. This layer is responsible for the format
of datagrams as defined by IP, and routing a datagram or packet to the next hop, but is not responsible for the
accurate and timely delivery of datagrams to the destination in proper sequence.
TCP/IP supports four other protocols: ARP, RARP, ICMP and IGMP in this layer.
• Address Resolution Protocol (ARP) : On a LAN, each machine is identified with a unique physical address
imprinted on the network interface card. ARP is used to find the physical address of a machine when its IP address
is known.
• Reverse Address Resolution Protocol (RARP) : It is used to find the IP address of a machine when its physical
address is known. It is used when a diskless computer is booted or a computer is connected to the network for the
first time.
• Internet Control Message Protocol (ICMP) : IP is unreliable are best effort delivery. In case of failures ICMP is
used to send notifications to the sender about packet problems. It sends error and query messages.
• Internet Group Message Protocol (IGMP) : It is used for multicasting, which is transmission of a single message
to a group of recipients.
Transport Layer : At this layer, TCP/IP supports two protocols: TCP, UDP, IP is host-to-host protocol, which can
deliver the packet from one physical device to another physical device. TCP, UDP, are transport level protocols,
responsible for delivering a packet from one process on a device to another process on the other device.
User Datagram Protocol (UDP) : It is simpler of the two protocols. It does not provide reliability. It is, therefore
faster, and using for applications in which delay is intolerable (in case of audio and video).
Transmission Control Protocol (TCP) : TCP is reliable, connection oriented protocol. By connection oriented, we
mean that a connection must be established between both ends before either can transmit data. It ensures that
communication is error-free and in sequence.
Application Layer : As said earlier, it is closer to combined session, presentation, and application layer of OSI
model. It allows the user to run various applications on Internet. These applications are File Transfer Protocol
(FTP), remote login (TELNET), email (SMTP), WWW (HTTP). The session layer of OSI model is almost dropped in
TCP/IP.
Internet layer is an important layer in the protocol suite. At this layer, TCP/IP supports Internetworking Protocol
(IP). IP is host-to-host protocol. This layer is responsible for the format of datagrams as defined by IP, and routing
and forwarding a datagram or packet to the next hop, but is not responsible for the accurate and timely delivery of
datagrams to the destination in proper sequence.
Problem with computer communications:
Dealing with incompatibility: incompatibility issues are handled at two levels:
i) Hardware Issues :At the hardware level, an additional component called router is used to connect physically
distinct networks as shown in Figure 1. A router connects to the network in the same way as any other computer.
Any computer connected to the network has a Network Interface Card (NIC), which has the address (network
id+host id), hard coded into it. A router is a device with more than one NICs. Router can connect incompatible
networks as it has the necessary hardware (NIC) and protocols (TCP/IP).
ii) Software Issues : The routers must agree about the way information would be transmitted to the destination
computer on a different network, since the information is likely to travel through different routers, there must be a
predefined standard to which routers must confirm. Packet formats and addressing mechanism used by the
networks may differ.the Internet communication follows one protocol, the TCP/IP protocol suite. The basic idea is
that it defines a packet size, routing algorithms, error control, flow control methods universally.
Architecture of the Internet : Internet is organised to form a hierarchy. At the top, there is a very high-speed
backbone and at the other end, there are users. There are Network Access Providers (NAP) and Internet Service
Providers (ISP) at the intermediate level.
Network Access Layer is one of the layers in the OSI (Open Systems Interconnection) model and is responsible for
providing a link between the data link layer and the physical layer. This layer is crucial for enabling communication
between network devices and ensuring that data is transmitted reliably across a physical network medium.
Key functions and features of the Network Access Layer include: Data framing, addressing, MAC (Media access
control),Flow control, Error Detection and Correction, logical link control, media dependent interface, physical
medium dependence.
Internet layer is an important layer in the protocol suite. At this layer, TCP/IP supports Internetworking Protocol
(IP). IP is host-to-host protocol. This layer is responsible for the format of datagrams as defined by IP, and routing
and forwarding a datagram or packet to the next hop, but is not responsible for the accurate and timely delivery of
datagrams to the destination in proper sequence. IP allows raw transmission functions allowing user to add
functionalities necessary for given application, ensuring maximum efficiency.
Need of an IP address: identifying a computer on Internet is a challenge. To have uniform addressing for
computers over the Internet, IP software defines an IP address which is a logical address. Now, when a computer
wants to communicate to another computer on the Internet, it can use logical address and is not bothered with
the physical address of the destination and hence the format and size of data packet.
Classes of IP address: Internet addresses are 32 bits long, written as four bytes separated by periods (full stops).
They can range from 0.0. 0.0 to 223. 255. 255. 255. It’s worth noting that IP addresses are stored in big-endian
format, with the most significant byte first, read left to right. .IP addresses comprise two parts, the network ID and
the host ID. An IP address can identify a network (if the host part is all zero) or an individual host. IP addresses are
split into five classes.
Class A Introduction to TCP/IP addresses have a first byte in the range 0 to 127. The remaining three bytes can be
used for unique host addresses. This allows for 126 networks each up to 16 million hosts.
Class B addresses can be distinguished by first byte values in the range 128 to 191 in these addresses, the first two
bytes are used for the net ID, and the last two for the host ID, giving addresses for 16,000 networks, each with up
to 65536 hosts.
Class C addresses have a first byte in the range 192 to 223. Here, the first three bytes identify the network, leaving
just one byte for the individual hosts. This provides for 2 million networks of up to 256 hosts each.
Class D addresses have a first byte in the range 224 to 239. It is designed fo multicasting.
Class E addresses have a first byte in the range 240 to 255.It is reserved for future purposes.
Who Decides the IP Addresses? IP address of two Computers over the Internet is never same. To ensure this,
there is a central authority that issues the IP address. An organisation or individual wanting to connect to the
Internet needs to contact local ISP for obtaining a unique IP address at the Metadata the global level, Internet
Assigned Number Authority (IANA) allocates a net id to the ISP.
Internet Protocol : IP is the transmission mechanism used by TCP/IP protocols for host-to-host communication
Packets in IP layer are called datagrams.
Version (4 bits): It defines the version of IP protocol. Currently, the version is 4(IPv4), indicated by value 4. In
future it would contain 6, for IPv6.
• HLEN (4 bits): It is needed because length of header is variable. When the header size is 20 bytes, its value is
5(5*4=20). With options, the maximum size is 60 bytes, when the value is 15 (15*4=60). Each value represents
number of 32-bit words.
• Service Type (8 bits): It is used to define type of service in terms of reliability, precedence, delay and cost.
• Total length (16 bits): it defines the total length of IP datagram. The maximum value can be 216=65536 bytes.
• Identification (16 bits): This field is used to unusually identify a datagram. It is useful to know the fragments
belonging to same datagram fragments that are part of a datagram which contain same value in identification
fields, so that they can be put together in the order to reassemble the datagram at receiver.
• Flags (3 bits): This field is used to uniquely identify a datagram. It is useful to know the fragments belonging to
same datagrams.
• Fragmentation Offset (13 bits): It is a pointer that indicates the offset of the fragment in the original datagram
before fragmentation.
Time to Live (8 bits): It is used to control the maximum number of hops visited by the datagram. It is needed to
restrict a datagram from continuing to travel in infinite loop without reaching the destination.
Protocol (8 bits): An IP datagram may encapsulate data from various higher-level protocols like TCP, UDP, ICMP,
and IGMP. This field specifies the final destination protocol to which the IP datagram should be delivered. Each
protocol TCP, UDP etc. identified with a unique number. • Source Address (32 bits): It stores the IP address of the
source. • Destination Address (32 bits): It stores the IP address of the final destination. • Options: This field
contains optional information such as routing details, timestamp etc.
Define the datagram, which is the basic unit of transmission in the Internet: The TCP/IP protocols were built to
transmit data over the ARPANET, which was a packet switching network. A packet is a block of data that carries
with it the information necessary to deliver it in a manner similar to a postal letter that has an address written on
its envelope. A packet switching network uses the addressing information in the packets to switch packets from
one physical network to another, moving them towards their final destination.Datagram is the packet format
defined by IP.
Define the Internet addressing scheme: IP delivers the datagram by checking the destination address in the
header. If the destination address is the address of a host on the local network, the packet is delivered directly to
the destination. If the destination address is not on the local network, the packet is passed to a router for delivery.
Router is a devices that switch packets between the different physical networks. Deciding which router to use is
called routing. IP makes the routing decision for each individual packet.
ARP: communication in a local network is broadcast, which is done using physical address. Therefore, when the
packet reaches the destined network, there must be a process of obtaining the physical address corresponding to
its IP address, of a computer in order to finally deliver the datagram to the destined computer. The physical
address corresponding to an IP address is resolved by using address resolution protocol (ARP). ARP maps given IP
address to a physical address. It takes host’s IP address as input and gives its physical address as output.
RARP: This protocol performs the job exactly opposite to ARP.It maps a physical address to its IP address. Where is
this needed? A node is supposed to have its IP address stored on its harddisk. However, there are situations when
the host may not have hard disk at all, for example a diskless workstation. But also when a host is being connected
to the network for the first time, at all such times, a host does not know its IP address. In that case RARP find out
the IP address.
ICMP, or Internet Control Message Protocol, is a network layer protocol within the Internet Protocol (IP) suite.
ICMP is primarily designed to report errors and provide diagnostic information about network conditions. It
operates at the network layer (Layer 3) and is an integral part of the IP protocol suite.
characteristics and functions of ICMP include:
Error Reporting: ICMP is commonly used to report errors or issues that occur during the delivery of IP packets. For
example, if a router encounters a problem forwarding a packet, it may generate an ICMP error message to inform
the source device.
Ping and Traceroute: ICMP includes utilities such as Ping and Traceroute. The Ping utility uses ICMP Echo Request
and Echo Reply messages to check the reachability of a host on an Internet Protocol (IP) network. Traceroute, on
the other hand, utilizes ICMP Time Exceeded messages to trace the route that packets take through a network.
Network Testing and Troubleshooting: System administrators use ICMP to perform network testing and
troubleshooting. ICMP messages provide information about network connectivity and can help identify issues such
as packet loss, unreachable hosts, or network congestion.
Destination Unreachable: ICMP Destination Unreachable messages are sent by routers or hosts to indicate that a
destination host or network is unreachable.
ICMP message consists of an 8-bit type, an 8-bit code, an 8-bit checksum, and contents which vary depending on
code and type. ICMP is used for many different functions, the most important of which is error reporting. Some of
these are “port unreachable”, “host unreachable”, “network unreachable”, “destination network unknown”, and
“destination host unknown”. Some not related to errors are: • Timestamp request and reply allows one system to
ask another one for the current time. • Address mask and reply is used by a diskless workstation to get its subnet
mask at boot time. • Echo request and echo reply is used by the ping program to see if another host is reachable.
Thus two types of ICMP messages are defined: Error messages and Query messages.
Transport layer runs on top of the Internet layer and is concerned with process-to-process delivery of data
packets. Here, process is a running application program on a host. The main task of transport layer is to ensure
correct delivery of packets. This introduces several responsibilities like flow control mechanism. The transport layer
also provides connection mechanism. It establishes connection with the receiver, transfers data, and terminates
the connection. The transport layer includes acknowledgement service to check for packet loss in the network. In
TCP/IP transport layer is represented by two protocols: TCP and UDP.UDP is simpler of the two protocols. It is
unreliable, connectionless transport protocol.
TCP: IP packets may travel through different routes and may arrive out of sequence. TCP puts the packets in
sequence. An intermediate router may discard the IP packets and they may not arrive at the destination at all. TCP
checks for missing packets and handles this issue retransmission request. Some packets may get duplicated due to
hardware malfunction. TCP discards duplicate packets. Hence, TCP takes care of all these situations and makes the
Internet reliable.
Sockets : The term Socket is used to identify the IP address and Port number concatenated together. Socket=IP
address + port no.
Socket Address : A client socket identifies a client process uniquely and a server socket identifies server process
uniquely. Hence, a pair of sockets identifies a TCP connection between two applications on two different hosts.
Services Provided by TCP
• Process to process communication: TCP provides process-to-process communication.
• Stream Delivery Service: TCP is stream oriented protocol. It allows the sending process to deliver data as a
stream of bytes and allows receiving process to obtain data as a stream of bytes. For this, TCP needs two buffers,
the sending buffer, and the receiving buffer, one for each direction.
Reliability: TCP is a reliable transport protocol. TCP incorporates error control, flow control, and acknowledgement
services.
Connection Oriented Service: When a process host A wants to communicate to a process on host B, the two TCPs
establish a connection, data is exchanged, and the connection is terminated. This connection is virtual and not
physical.
Source port number (16 bit): It specifies the source port number corresponding to the application which is sending
the segment.
Destination Port Number (16 bit): It specifies the port number of the destination computer, corresponding to the
receiving applications.
Sequence Number (4 bytes): It specifies the number assigned to the first byte of the data portion contained in this
TCP packet. Each byte to be transmitted is numbered in an increasing sequence. It tells the destination host which
byte comprises the first byte of the TCP segment. During the connection establishment phase, the source and the
destination generate a unique random number. If this random number is 3000, and the first segment contains
2000 bytes, then the sequence no. will be 3002. 3000 and 3001 are used in connection establishment. The second
segment would have a sequence number of 5002(3002+2000), and so on.
Acknowledgement Number (4 bytes): On receiving a packet with sequence number X, the receiver sends back X+1
as the acknowledgement number. It defines the sequence number which the receiver is expecting next.
Header length (4 bits): The header length can be between 20 to 60 bytes. therefore, the value of this field can be
between 5 (5*4=20) and 15(15*4=20)
Reserved: These 6 bits are reserved for future use.
Flag (6 bits): This field signifies 6 control flags, each one of them occupying one bit. Out of these, two are most
important. The SYN flag indicate that the source wants to establish a connection with the destination. The FIN flag
means that the sender wants to close the TCP connection.
Window Size (2 bits): This field determines the size of the window the other party must maintain. It is useful for
flow control.
Checksum (16 bits): It contains the checksum for error detection.
Urgent Pointer: This field is used in situations when the segment contains urgent data. It specifies the number that
must be added to obtain the number of the first urgent byte in the data section of the segment.
Pseudoheader: It is the part of the header of the IP packet in which the segment is encapsulated with some fields
set to zero. It is added to have better error control. This way we ensure that if the IP header is corrupted, the
segment is not delivered to the wrong host.
User Datagram Protocol (UDP): The other protocol in transport layer is UDP. UDP is connectionless protocol. It
allows a computer to send data without needing to establish a virtual connection. There is no error checking
except for checksum. It does not provide sequencing, flow control or acknowledgements. Thus, UDP packets may
be lost, arrive out of sequence, or duplicated. It is left to the application program to take care of these issues.
Source port number (16 bit): It specifies the source port number corresponding to the application which is sending
the segment.
Destination Port Number (16 bit): It specifies the port number of the destination computer, corresponding to the
receiving applications.
Total Packet Length (16 bits): It defines the total length of the UDP packet. However, this field is redundant,
because there is a packet length field in IP, which encapsulates the UDP packet. Therefore UDP packet length=IP
packet length-IP header length. This field is retained as an additional check.
Application Layer Protocols like DNS, HTTP, TELNET, and FTP.
Email is one of the most popular Internet services. At the beginning of the Internet era, emails were short and
consisted of text only. Today it is much more complex allowing to send text, audio and video. It also allows to send
a message to more than one recipient. In a typical scenario, both the sender and recipient are users on two
different systems, and are connected to the system via a point to point WAN, or a LAN, which uses an email server
for handling emails. Hence the message needs to be sent over the internet.
email transfer protocols : For email messaging, every domain maintains an email server. The server runs protocols
software that enable email communication. There are two main emails protocols: POP and SMTP. Because both
the email protocol software programs run on server computers, the server computers are themselves called POP
server and SMTP server. A single server can host both the POP and SMTP server programs.
SMTP server (Simple Mail Transfer Protocol) : SMTP is the Internet protocol used to transfer electronic mail
between computers. The second generation of SMTP is called ESMTP (for Extended SMTP), but the differences are
not important for this introduction. It actually transfers the email message from the SMTP server of the sender to
the SMTP server of the recipient. Its main job is to carry the message between the sender and the receiver. It uses
TCP/IP underneath. That is, it runs on top of TCP/IP. At the sender’s site, an SMTP server takes the message sent by
a user’s computer.The SMTP server at the sender’s end then transfers the message to the SMTP server of the
recipient. The SMTP server at the recipient’s end takes the message and stores it in the appropriate user’s mailbox.
POP server : The Post Office Protocol provides a standard mechanism for retrieving emails from remote server for
a mail recipient. Suppose that a home user X usually connects to the Internet using a dial–up connection to an
ISP.Also, another person Y has sent an email to X, when X is not connected to the Internet. Now, the email
message gets stored in the mailbox of the user provided by the ISP.
POP3 (version 3). This is simple and limited in its functionality. It has two modes: the delete mode and the keep
mode. In delete mode, mail is deleted from the mailbox after retrieval. It is used when the user is working at his
personal computer and can save and organise the information after reading or replying.
IMAP Protocol : Another mail access protocol is the Internet Mail Access protocol, version 4(IMAP4). It is similar to
POP3, but it has more features as given below. In this, a user can- • check the email header before downloading. •
search the contents of the email for a specific keyword prior to downloading. • partially load the email it is helpful
if the bandwidth is limited. • create, rename, and delete mailboxes on the mail server. • create a hierarchy of
mailboxes in a folder for email storage.
FTP (File Transfer Protocol) is a standard network protocol used for transferring files between a client and a server
on a computer network. FTP operates on a client-server model where the client initiates a connection to the server
to perform file transfer operations. FTP basics: FTP differs from other application layer protocols in one respect. All
the other application layer protocols use a single connection between client and server. However, FTP uses two
TCP/IP connections. One connection is used for actual data transfer, and the other is used for control information.
FTP Site? An FTP site is like a large filing cabinet. With a traditional filing cabinet the person who does the filing
has the option to label and organise the files, however they see fit. They also decide which files to keep locked and
which remain public. It is the same with an FTP site.
The virtual ‘key’ to get into FTP site is the UserID and Password. If the creator of the FTP site is willing to give
everyone access to the files, the UserID is ‘anonymous’ and the Password is your e-mail address (e.g.
name@domain.com). If the FTP site is not public, there will be a unique UserID and Password for each person who
is granted access. To make FTP connection you can use a standard Web browser (Internet Explorer, Netscape, etc.)
or a dedicated FTP software program, referred to as an FTP ‘Client’.
Domain name servers translate domain names to IP addresses. That sounds like a simple task, and it would be able
to handle four things: • There are billions of IP addresses currently in use, and most machines have a human-
readable name as well. • There are many billions of DNS requests made every day. A single person can easily make
a hundred or more DNS requests a day, and there are hundreds of millions of people and machines using the
Internet daily. • Domain names and IP addresses change daily. • New domain names get created daily.
DNS namespace refers to the hierarchical and distributed naming structure used in the Domain Name System
(DNS). The DNS is a decentralized system that translates human-readable domain names into IP addresses,
allowing users to access resources on the internet using easy-to-remember names instead of numerical IP
addresses. The DNS namespace is organized into a tree-like structure, with each level in the hierarchy representing
a different domain. The root of the DNS namespace is represented by a dot ("."). Below the root, the namespace is
divided into top-level domains (TLDs), second-level domains, and subdomains.
Root Domain (.): The root domain is represented by a dot ("."). It is the topmost level in the DNS hierarchy. There
is only one root domain, and it is not visible in typical domain names.
Top-Level Domains (TLDs): TLDs are the next level below the root and represent the highest level of domain
names in the DNS hierarchy. Examples of TLDs include ".com," ".org," ".net," ".gov," and country-code TLDs like
".us" or ".uk."
Second-Level Domains (SLDs): SLDs are the level below TLDs and are directly to the left of the TLD. For example, in
the domain "example.com," "example" is the SLD.
Subdomains: Subdomains are additional levels in the hierarchy that can be created below SLDs. They allow for
further organization and segmentation of the namespace. For example, in the domain "blog.example.com," "blog"
is a subdomain of "example.com."
Security levels with basic SNMP : Different Security levels (like authentication and authorization) are implemented
in SNMP, let find out what we meant by authentication and authorization.
Authentication : Trivial authentication based on plain text community name is exchanged in SNMP messages.
Authentication is based on the assumption that the message is not tampered with or interrogated.
Authorization : Once community name is validated then agent or manager checks to see if sending address is
permitted or has the rights for the requested operation. “View” or “Cut” of the objects together with permitted
access rights is then derived for that pair (community name, sending address).
Underlying Communication Protocols : SNMP assumes that the communication path is a connectionless
communication subnetwork. In other words, no prearranged communication path is established prior to the
transmission of data. As a result, SNMP makes no guarantees about the reliable delivery of the data.
Remote Login: TELNET: Telnet allows remote login services. TELENT has two parts: client and server. Once a user
using the services of a TELNET client connects to the remote TELNET server the keystrokes type by the user on the
client are sent to the remote server to be interpreted upon to give the impression that the user is working on the
remote computer.
Local login : When a user logs on to a local time sharing system, it is called local login. As user types at a terminal,
the keystrokes are accepted by the terminal driver and passed to the operating system. The operating system
interprets the combination of characters, and invokes the desired application.
Remote login: When a user logs on to a access an application on a remote computer, the users need to perform
remote login. Here the telnet client and server come into use. The user sends the keystrokes to the terminal driver
where the local operating system accepts the characters but does not interpret them. The characters are sent to
the TELNET client, which transform the characters to a universal character set called Network Virtual Terminal
(NVT) and delivers them to the local TCP/IP stack. This is necessary because telnet is a general purpose application,
and was designed to work between any terminal and any host. Thus, the client maps the terminal type to NVT. At
the other end, server maps the NVT on to the actual terminal type the server is serving.
Communication in Telnet: TELNET server is quite complicated. It has to handle many clients at the same time, and
respond in real time. To handle this issue, TELNET server uses the principle of delegation. Whenever there a new
client request for a TELNET connection, it creates a child process and lets the child handle the particular client. TCP
uses only one TCP connection. The same TCP connection is used to transfer both the control and data characters.
World Wide Web: HTTP : The WWW project was initiated by CERN to create a system to handle distributed
resources necessary for scientific research. Apart from email, the most popular applications running on Internet is
the World Wide Web (WWW). It is so popular that people confuse it with Internet. However, it is just an
application such as email, FTP that uses TCP/IP. The WWW today is a distributed client-server service. The client
using a browser can access a service using a server. The service provider is distributed over many locations called
sites.
Web server : A web server is a program running on a server computer, additionally, it consists of the web site,
consisting of many web pages. It is simply a file written in HTML (Hypertext Markup Language). It can consist of
text, graphics, sound, video, animation. Every web site has a server process that passively listens for TCP
connection requests at port 80. After the connection is established, the client sends one request and the server
sends one response. The request – response model is governed by Hyper Text Transfer Protocol (HTTP).
Web browser : A web browser acts as a client in WWW interaction. Using this program, user can request for a web
page on a web server. The browser then interprets and displays the document. A variety of vendors offer
commercial browsers. A browser usually consists of three parts: a controller, client protocol and interpreters. The
controller receives the input from the keyboard or the mouse and uses client programs to access the document.
After the document has been accessed, the controller uses one of the interpreters to display the document on
screen. The client protocol can be one of the protocols described previously like FTP, TELNET, or HTTP.
Uniform Resource Locator (URL) : A client that wants to access a web page needs to specify the address. The
Uniform Resource locator is the standard for specifying any kind of information on the Internet. It has four things:
protocol, host computer, port, and path.
Anatomy of URL : http://www.ignou.ac.in/80/index
Protocol host port part
The protocol is the client-server program used to retrieve the document. Most common is HTTP. • Host is the
name of the computer on which the information resides. • Port number is transport address of the client or server
program on a website. • Path is the pathname of the file on the website, and can consists of slashes.
HTTP : Hyper Text Transfer Protocol (HTTP) is a used mainly to transfer data on World Wide Web. The commands
from the client are embedded in a request message .The contents of the request message are embedded in a
response message. HTTP uses the services of TCP at port 80. HTTP is a stateless protocol since each transaction is
independent of the previous transaction. The TCP connection between the client and the server is established for
every page. It does not remember anything about the previous request.
HTTP stateless was aimed at making the Web simple.
Recursive resolution in DNS involves a DNS resolver (typically operated by an Internet Service Provider or other
DNS service) performing the entire process of querying authoritative DNS servers to resolve a domain name to its
corresponding IP address on behalf of the user. Here are the steps involved in recursive resolution:
User Query: A user or a device initiates a DNS query to resolve a domain name (e.g., www.example.com) into an IP
address.
Local DNS Resolver: The user's device forwards the DNS query to its local DNS resolver, which is responsible for
handling DNS resolution.
Recursive Query to DNS Server: The local DNS resolver, acting on behalf of the user, sends a recursive DNS query
to a DNS server. This DNS server is typically provided by the user's ISP or another DNS service.
Iterative Query to Root DNS Servers: The recursive DNS server starts the resolution process by sending an iterative
query to the root DNS servers, asking for the authoritative DNS servers for the top-level domain (TLD) of the
requested domain.
Iterative Queries to Authoritative DNS Servers: Based on the response from the root DNS servers, the recursive
DNS server sends iterative queries to the authoritative DNS servers for each subsequent level of the domain name
until it reaches the authoritative DNS servers for the specific domain.
DNS Server Obtains Information:The authoritative DNS servers respond to each iterative query with the necessary
information, such as the IP address associated with the domain name.
Caching: The recursive DNS server may cache the obtained information, including the IP address, for a certain
period (Time to Live, TTL). Caching helps to speed up future queries for the same domain.
Response to Local Resolver: Once the recursive DNS server has fully resolved the query, it sends the final answer
back to the local DNS resolver.
Response to User: The local DNS resolver provides the resolved IP address to the user's device.
Iterative resolution in DNS involves a DNS resolver actively querying authoritative DNS servers at each level of the
domain hierarchy until it obtains the final answer. Unlike recursive resolution, where a DNS resolver performs the
entire resolution process on behalf of the user, iterative resolution requires the resolver to make multiple queries
to different DNS servers, iterating through the DNS hierarchy. Here are the steps involved in iterative resolution:
User Query: A user or a device initiates a DNS query to resolve a domain name (e.g., www.example.com) into an IP
address.
Local DNS Resolver: The user's device forwards the DNS query to its local DNS resolver, which is responsible for
handling DNS resolution.
Iterative Query to DNS Server: The local DNS resolver sends an iterative DNS query to a DNS server. This DNS
server is typically provided by the user's ISP or another DNS service.
Iterative Queries to Root DNS Servers:The recursive DNS server sends an iterative query to the root DNS servers,
asking for the authoritative DNS servers for the top-level domain (TLD) of the requested domain.
Iterative Queries to Authoritative DNS Servers: Based on the response from the root DNS servers, the recursive
DNS server sends iterative queries to the authoritative DNS servers for each subsequent level of the domain name.
The process continues until it reaches the authoritative DNS servers for the specific domain.
DNS Server Provides Referral: At each level, the authoritative DNS server responds to the iterative query with a
referral, indicating which authoritative DNS server the resolver should query next.
Iterative Queries Continue: The iterative process continues until the DNS resolver reaches the authoritative DNS
servers for the specific domain. At this point, the authoritative DNS servers provide the necessary information,
such as the IP address associated with the domain.
Caching: The local DNS resolver may cache the obtained information, including the IP address, for a certain period
(Time to Live, TTL). Caching helps to speed up future queries for the same domain.
Response to Local Resolver: Once the iterative DNS resolver has obtained the final answer, it returns the IP
address to the local DNS resolver.
Response to User: The local DNS resolver provides the resolved IP address to the user's device.The TCP/IP model is
made up of four layers: interface, network, transport, and application. Layers of TCP/IP Protocol Suite are
explained below in detail:
i) Interface Layers: The physical layer deals with the hardware level, voltages. The data link layer deals with media
access and control strategies, frame format etc. At this level, TCP/IP does not define any protocol. It supports all
standards and protocols.
ii) Internet Layer or Network Layer: The Internet layer is an important layer in the protocol suite. At this layer.
TCP/IP supports Internetworking Protocol (IP). IP is a host-to host protocol. This layer is responsible for the format
of data-grams as defined by IP, and routing a datagram or packet to the next hop, but is not responsible for the
accurate and timely delivery of datagrams to the destination in proper sequence. IP allows raw transmission
functions allowing user to add functionalities necessary for given application. An ensuring maximum efficiency,
TCP/IP supports four other protocols: ARP, RARP, ICMP, IGMP.
iii) Transport Layer: At this layer, TCP/IP supports two protocols: TCP, UDP, IP is host-to-host protocol, which can
deliver the packet from one physical device to another physical device. TCP, are UDP, are transport level protocols,
responsible for delivering a packet from one process on a device to another process on the other device. User
Datgram Protocol (UDP) It is simpler of the two protocols. It does not provide reliability. It is, therefore faster, and
using for applications in which delay is intolerable (in case of audio and video) Transmission Control Protocol (TCP).
TCP is reliable, connection oriented protocol. By connection oriented, we mean that a connection must be
established between both ends before either can transmit data. It ensures that communication is error-free and in
sequence.
iv) Application Layer: As said earlier, it is closer to combined session, presentation, and application layer of OSI
model. It allows user to run various applications on Internet. These applications are File Transfer Protocol (FTP),
remote login (TELNET), email (SMTP), WWW (HTTP). The session layer of OSI model is almost dropped in TCP/IP.
Internet Protocol is the network (internet) layer protocol used by both TCP and UDP, transport layer protocols. The
entire TCP or UDP datagrams (header + payload) travel through the network as a part of the IP datagrams. TCP or
UDP datagram is encapsulated in IP datagram.
IP HEADER : The IP datagram consists of a header part and a data part. The IP header is six 32-bit words in length
(24 bytes total) when all the optional fields are included in the header. The shortest header allowed by IP uses five
words (20 bytes total). To understand all the fields in the header, it is useful to remember that IP has no hardware
dependence but must account for all versions of IP software it can encounter
.Version (4 bits): Indicates the IP protocol version, and for IPv4, this field is set to 4.
Internet Header Length (IHL) (4 bits):Specifies the length of the IP header in 32-bit words. The minimum value is 5,
indicating a header length of 20 bytes. The maximum value is 15.
Type of Service (TOS) (8 bits): Originally designed for specifying Quality of Service (QoS), this field is rarely used
and has been largely replaced by Differentiated Services Code Point (DSCP) and Explicit Congestion Notification
(ECN).
Total Length (16 bits): Indicates the total length of the IP packet, including both header and payload. The
maximum value is 65,535 bytes.
Identification (16 bits): A unique value assigned to each fragment of an IP packet to facilitate reassembly at the
destination.
Flags (3 bits): Contains control flags for fragmentation: Bit 0: Reserved, must be zero. * Bit 1: Don't Fragment (DF)
* Bit 2: More Fragments (MF) *
Fragment Offset (13 bits):Specifies the position of the fragment within the original unfragmented packet in 8-byte
units.
Time to Live (TTL) (8 bits):Represents the maximum number of hops the packet is allowed to traverse before being
discarded. It helps prevent packets from circulating indefinitely in the network.
Protocol (8 bits):Identifies the higher-layer protocol (e.g., TCP, UDP, ICMP) used in the data payload.
Header Checksum (16 bits):Provides error-checking for the header, helping ensure the integrity of the transmitted
packet.
Source Address (32 bits): Specifies the IP address of the sender.
Destination Address (32 bits): Specifies the IP address of the intended recipient.
Options (Variable): Optional and rarely used field that can include additional information or configuration settings.
IP ADDRESSES : The Internet Protocol moves data between hosts in the form of datagrams. Each datagram is
delivered to the address contained in the Destination Address (word 5) of the datagram’s header. The Destination
Address is a standard 32-bit IP address that contains sufficient information to uniquely identify a network and a
specific host on that network.
An IP address contains a network part and a host part, but the format of these parts is not the same in every IP
address. The number of address bits used to identify the network, and the number used to identify the host, vary
according to the prefix length of the address.
IP address classes: Class A: If the first bit of an IP address is 0, it is the address of a class A network. The first bit of
a class A address identifies the address class. The next 7 bits identify the network, and the last 24 bits identify the
host. There are fewer than 128 class A network numbers, but each class A network can be composed of millions of
hosts.
• Class B: If the first 2 bits of the address are 1 0, it is a class B network address. The first 2 bits identify class; the
next 14 bits identify the network, and the last 16 bits identify the host. There are thousands of class B network
numbers and each class B network can contain thousands of hosts.
Class C: If the first 3 bits of the address are 1 1 0, it is Internet Protocol a class C network address. In a class C
address, the first 3 bits are class identifiers; the next 21 bits are the network address, and the last 8 bits identify
the host. There are millions of class C network numbers, but each class C network is composed of fewer than 254
hosts.
• Class D: If the first 4 bits of the address are 1 1 1 0, it is a multicast address. These addresses are sometimes
called class D addresses, but they don’t really refer to specific networks. Multicast addresses are used to address
groups of computers all at one time. Multicast addresses identify a group of computers that share a common
application, such as a video conference, as opposed to a group of computers that share a common network.
• Class E: If the first four bits of the address are 1 1 1 1, it is a special reserved address. These addresses are called
class E addresses, but they don’t really refer to specific networks. No numbers are currently assigned in this range.
Less than 128, the address is class A; the first byte is the network number, and the next three bytes are the host
address.
• From 128 to 191, the address is class B; the first two bytes identify the network, and the last two bytes identify
the host.
• From 192 to 223, the address is class C; the first three bytes are the network address, and the last byte is the
host number.
• From 224 to 239, the address is multicast. There is no network part. The entire address identifies a specific
multicast group.
Subnetting: Networks can also be enlarged through the use of a technique known as “supernetting,” which works
by extending the host portion of a subnet mask to the left, into the network portion of the address. Using this
technique, a pair of networks with 24-bit subnet masks can be turned into a single large network with a 23-bit
subnet mask.
Subnet mask: IP addresses are actually 32-bit binary numbers. Each 32-bit IP address consists of two
subaddresses, one identifying the network and the other identifying the host to the network, with an imaginary
boundary separating the two. The location of the boundary between the network and host portions of an IP
address is determined through the use of a subnet mask. A subnet mask is another 32-bit binary number, which
acts like a filter when it is applied to the 32-bit IP address. By comparing a subnet mask with an IP address, systems
can determine which portion of the IP address relates to the network, and which portion relates to the host.
Internet legal addressing refers to IP addresses that are globally routable on the public internet. These addresses
are unique and must be obtained from Internet Assigned Numbers Authority (IANA) or one of its regional
registries, such as the American Registry for Internet Numbers (ARIN), RIPE Network Coordination Centre (RIPE
NCC), or Asia-Pacific Network Information Centre (APNIC). Internet legal addressing includes both IPv4 and IPv6
addresses.
IPv4 Internet Legal Address Ranges: Class A: 1.0.0.0 to 126.255.255.255 , Class B: 128.0.0.0 to 191.255.255.255 ,
Class C: 192.0.0.0 to 223.255.255.255 , Class D (Multicast): 224.0.0.0 to 239.255.255.255 , Class E (Reserved):
240.0.0.0 to 255.255.255.255
Private addressing, on the other hand, refers to IP addresses that are reserved for use within private networks.
These addresses are not routable on the public internet. Instead, they are meant to be used internally within an
organization or a network and are typically translated to a single public IP address when communicating with the
internet.
IPv4 Private Address Ranges: Class A: 10.0.0.0 to 10.255.255.255 , Class B: 172.16.0.0 to 172.31.255.255 , Class C:
192.168.0.0 to 192.168.255.255
IP ROUTING : An important function of the IP layer is IP routing. It provides the basic mechanism for routers to
interconnect different physical networks. This means that an internet host can function as a normal host and a
router simultaneously. A basic router of this type is referred to as a router with partial routing information,
because the router only has information about four kinds of destination: • Hosts which are directly attached to
one of the physical networks to which the router is attached. • Hosts or networks for which the router has been
given explicit definitions. • Hosts or networks for which the router has received an ICMP redirect message. • A
default destination for everything else.
Routing Protocol : The Routing protocols evolved in different phases. There are some references are as below: •
RFC 1074 - The NSFNET Backbone SPF Based Interior Gateway Protocol. • RFC 1092 - EGP and Policy Based Routing
in the New NSFNET Backbone. • RFC 1093 - The NSFNET Routing Architecture. • RFC 1104 - Models of Policy
Based Routing. • RFC 1133 - Routing between the NSFNET and the DDN. • RFC 1222 - Advancing the NSFNET
Routing Architecture
Link-State, Shortest Path First : The growth in networking over the past few years has pushed the currently
available Interior Gateway Protocols, which use distance-vector algorithms, past their limits. The primary
alternative to vector-distance schemes is a class of protocols known as Link State, Shortest Path First.
The important features of these routing protocols are: • A set of physical networks is divided into a number of
areas. • All routers within an area have an identical database. • Each router’s database describes the complete
topology (which routers are connected to which networks) of the routing domain. The topology of an area is
represented with a database called a Link State Database describing all of the links that each of the routers in the
area has. • Each router uses its database to derive the set of optimum paths to all destinations from which it
builds its routing table. The algorithm used to determine the optimum paths is called a Shortest Path First (SPF)
algorithm.
link state protocol works as follows each router periodically sends out a description of its connections (the state of
its links) to its neighbours (routers are neighbours if they are connected to the same network). This description,
called a Link State Advertisement (LSA), includes the configured cost of the connection. The LSA is flooded
throughout the router’s domain. Each router in the domain maintains an identical synchronised copy of a database
composed of this link state information. This database describes both the topology of the router’s domain and
routes to networks outside of the domain such as routes to networks in other autonomous systems. Each router
runs an algorithm on its topological database resulting in a shortest-path tree. This shortest-path tree contains the
shortest path to every router and network the gateway can reach. From the shortest-path tree, the cost to the
destination and the next hop to forward a datagram is used to build the router’s routing table.
Distance vector routing protocol: The term Distance-Vector refers to a class of algorithms that gateways use to
update routing information. Each router begins with a set of routes for those networks or subnets to which it is
directly attached, and possibly some additional routes to other networks or hosts if the network topology is such
that the routing protocol will be unable to produce the desired routing correctly. This list is kept in a routing table,
where each entry identifies a destination network or host and gives the “distance”' to that network. The distance is
called a metric and is typically measured in “hops”. Periodically, each router sends a copy of its routing table to any
other router it can reach directly. When a report arrives at router B from router A, B examines the set of
destinations it receives and the distance to each. B will update its routing table if: • A knows a shorter way to
reach a destination. • A lists a destination that B does not have in its table. • A’s distance to a destination, already
routed through A from B, has changed.
Ports: When a process starts up, it registers a port number with the protocol stack. The port numbers are specified
by a 16-bit number i.e., the overall available set of port numbers are 216, ranging from 0 to 65535. The various
categories of ports are as under:
Well Known Ports: The Port numbers in the range 0-1023 are called ‘Well Known Ports’. These port numbers are
assigned to the server side of an application and are already reserved for specific applications by IANA (Internet
Assigned Number Authority).
Registered Ports: Port numbers in the range 1024-49151 are called Registered Ports. These port numbers have
been publicly defined as a convenient service for the Internet community to help them avoid vendor conflicts.
3) Dynamic and/or Private Ports: The remaining port numbers in the range 49152-65535, are called Dynamic
and/or Private Ports and can be used freely by any client or server application.
Transmission control protocol (TCP) of the transport layer provides end-to-end reliable communication. TCP is a
connection oriented communication service. As the IP layer of TCP/IP protocol stack is connectionless, the TCP
layer adds the reliability feature along with connection-oriented service. Basically, TCP establishes a virtual circuit
between the source and the destination and the stream of bytes are transferred through that circuit such that the
order of the segments remains integral.services being offered by TCP to the processes running on application layer
are as under:
1) Stream data transfer: With stream data transfer, TCP delivers an unstructured stream of bytes identified by
sequence numbers. This service benefits applications because they do not have to chop data into blocks before
handing it off to TCP. Instead, TCP groups bytes into segments and passes them to IP for delivery.
2) Reliability: TCP offers reliability by providing connection-oriented, end-to-end reliable packet delivery through
an internetwork. It does this by sequencing bytes with a forwarding acknowledgement number that indicates to
the destination, the next byte the source expects to receive. Bytes not acknowledged within a specified time
period are retransmitted. The reliability mechanism of TCP allows devices to deal with lost, delayed, duplicate or
misread packets.
Efficient flow control: TCP offers efficient flow control, which means that, when sending acknowledgements back
to the source, the receiving TCP process indicates the highest sequence number it can receive without overflowing
its internal buffers.
4) Full-duplex operation: TCP offers full-duplex operation, wherein TCP processes can both send and receive data
at the same time.
5) Multiplexing: TCP’s multiplexing provides numerous simultaneous upper-layer conversations multiplexed over a
single connection.
TCP header: Source Port Number: This is a 16-bit number which defines the source port number for a particular
application program that is sending the TCP segments.
2) Destination Port Number: This is a 16-bit number which defines the destination port number for a particular
application program that is receiving the TCP segments.
3) Sequence Number: As the unit of data transfer in TCP is termed as segment, each segment’s first data byte
number denotes the 32-bit sequence number. Since the sequence number refers to a byte count rather than a
segment count, sequence numbers in contiguous TCP segments are not numbered sequentially.
4) Acknowledgement Number: This is used by the sender to acknowledge the received data. This 36-bit field
indicates the sequence number of the next byte expected from the receiver. For example, if host A has sent a
segment having sequence number 2000 to host B, host B would send an acknowledgement with acknowledgement
number field set to 2001 (one plus the sequence number of last received segment).
5) Header Length: The HLEN field consists of 4 bits. It indicates the length of the TCP header. The length of the TCP
header can be between 20 bytes to 60 bytes i.e., HLEN field can have binary values ranging from 0101-1111 (5 to
15, 32 bit words) (5 x 4 =20, 15 x 4 =60).
6) Reserved: This 6 bit field is reserved for future use. The value set in this field must be zero.
Control Flags: This field contains six different control flags that can control certain aspects of the TCP connection
such as connection establishment, connection termination and flow control. The flags include:
a) Urgent Pointer URG: When set, the ACK indicates that the current segment contains urgent (or high-priority)
data and that the Urgent Pointer field value is valid.
b) Acknowledgement (ACK): When set, indicates that the value contained in the Acknowledgement Number field
is valid. This bit is usually set, except during the first message during connection establishment.
c) Push (PSH): PSH is used when the transmitting application wants to force TCP to immediately transmit the data
that is currently buffered to the application without waiting for the buffer to fill. It is useful for transmitting small
units of data.
d) Reset (RST): When set, RST immediately terminates the end-to-end TCP connection.
e) Synchronize (SYN): SYN is set in the initial segments used to establish a connection, indicating that the segments
carry the initial sequence number.
f) Finish (FIN): FIN is set to request normal termination of the TCP connection in the direction this segment is
travelling. Complete closure of the connection requires one FIN segment in each direction.
8) Window Size: The window size 16 bits field is used for flow control. It contains in bytes, the size of the window
that the receiver has to maintain i.e., the value of the receive window size. It is basically the number of transmitted
bytes that the sender of this segment is willing to accept from the receiver.
9) Checksum: This is a 16-bit field that provides bit error detection for the segment (including the header and
data).
10) Urgent Pointer: Urgent data is information that has been marked as high-priority by a higher layer application.
The data sent under high-priority usually bypasses the normal TCP buffering and is placed in a segment between
the header and normal data. When the URG flag of control flag is set, then the urgent pointer 16-bit number
indicates the position of the first octet of non-priority data in the segment.
11) Options: The option field contains 40 bytes of optional information about connection establishment. The
maximum segment size (MSS) is the most commonly used option and if absent, defaults to an MSS of 536. Another
option is Selective Acknowledgement (SACK), which allows out-of-sequence segments to be accepted by a receiver.
The further discussion about options is beyond the scope of this book.
Characteristics of TCP : 1) It employs a connection-oriented service for communication. 2) It is a reliable source of
communication i.e. guarantees delivery of messages. 3) It splits the messages into segments and keeps track of the
order (sequence) of segments. 4) It employs the checksums for detecting any errors in data as well as the TCP
header.
TCP Connection Establishment :In order to connect two machines, first of all both machines must initialize the
communication and get a formal approval from each other before the start of data transfer. The establishment of
such a connection by exchange of control messages is known as the three-way handshake. The process of the
three-way handshake is as under:
1) The initiator of the session (source machine) sends a segment with SYN flag set to the destination node along
with the proposed initial sequence number (ISN) in the sequence number field of the segment. Remember, the
segment includes the source and destination port numbers. Upon receipt of the segment, the recipient sends a
segment with SYN flag set to the initiator with the acknowledgement number set to the sequence number (ISN) + 1
and the ACK flag is also set. The sent segment is assigned a new sequence number (ISN) for its own segment.The
initiator after receiving the segment sends a segment with ACK flag set in response to the recipient’s SYN, with the
acknowledgement number set to the recipient’s sequence number (ISN) + 1.
On receipt of this segment, the initiator sends an ACK segment, to confirm the FIN segment from the recipient
(destination).
Flow control in TCP : The flow control coordinates the amount of data that can be sent by the source between the
terminals before receiving acknowledgement from the destination.TCP sends data in accordance with sliding
window protocol – a Flow Control Mechanism.
Sliding Window Protocol :In the sliding window protocol, a window is maintained for each connection. The
window defines the size of the buffer i.e. the total number of bytes that can be sent by a terminal at a given time,
this also shows the total number of blocks signifies the total size of the window. The sliding window also keeps
track of bytes which have been sent but are unacknowledged, bytes still stored in buffer but haven’t been sent etc.
Error Control in TCP :The major tasks of error control in TCP include detection of out-of-order segments, lost
segments, duplicate segments and corrupted segments. The above-mentioned problems are deciphered using the
aid of acknowledgements, checksum and time-out period.
Out-of-Order segment : As IP is a connectionless service, IP datagrams might arrive out of order. The TCP in turn
assures that the receiver does not acknowledge the received out of order segment until and unless it receives all
those expected segments which precede.
Duplicate Segment If the receiver receives a duplicate segment, it simply discards that segment, as a TCP segment
with the same sequence number has already arrived.
Corrupted Segments : Whenever a segment gets corrupted, it is simply discarded by the destination and has to be
retransmitted by the source.
Lost Acknowledgements : An acknowledgement for a segment can be lost in between. However, in TCP, the
functioning of acknowledgement is as follows: An acknowledgement is a confirmation that everything up to the
bytes specified by the acknowledgement number in TCP header has been received. Thus, a latest
acknowledgement overrides the previous reached /lost acknowledgements .
UDP is an unreliable transport layer based protocol. It uses the connectionless service for providing the
communication between the nodes of similar and/or different networks. The IP layer provides host-to-host
communication. However, UDP provides process-to-process communication. As UDP is connectionless, it means
that no overheads will be incurred in terms of connection establishment, connection termination,
acknowledgement of packets, sequence number assigned to each packet etc. Similar to the services offered by IP,
UDP does not provide flow control and error control. In UPD, whenever the message is ready for transmission, it is
simply transferred to the lower layers without bothering about establishment of connection. UDP is an unreliable
source of communication. It does not guarantee accuracy, reachability and timeliness. Sequence numbers are not
assigned to the packets, therefore, order of packets is not maintained and packets are unacknowledged. UDP is a
convenient protocol for multimedia and multicasting applications.
UDP Header : The UDP packets are termed as User Datagrams and the header part of the user datagram has a
fixed size of 8 bytes.
1) Source Port Number: A 16-bit number which defines the source port number for a particular application
program that is sending the UDP datagrams.
2) Destination Port Number: A 16-bit number that defines the destination port number for a particular application
program that is receiving the UDP datagrams.
3) Length Transport Layer Protocols : The 16-bit field denotes the size of UDP header combined with payload data.
It can range between 0 to 65,535 bytes.
4) Checksum: This is 16-bit field that provides detection of errors over the entire user datagram.
Characteristics of UDP : 1. UDP is a connectionless service. 2. It adds no non-reliable flow control to IP. 3. It serves
as a multiplex/demultiplexer for sending and receiving datagrams. 4. The communication ends (end terminals)
need not be synchronized. 5. There is no provision for acknowledgement of datagrams.
Applications of UDP: • Trivial File Transfer Protocol (TFTP) • Domain Name System (DNS) name server •
Remote Procedure Call (RPC) used by the Network File System (NFS) • Simple Network Management Protocol
(SNMP).
Internet Control Message Protocol (ICMP) : The Internet Control Message Protocol notifies the sender of IP
datagrams about abnormal events. ICMP is important in the connectionless environment. ICMP messages are
carried in IP packets. The most commonly employed ICMP message types include:
• Destination Unreachable: This message type indicates that a packet cannot be delivered because the destination
host cannot be reached. The reason for the non-delivery may be that the host or network is unreachable or
unknown, the protocol or port is unknown or unusable.
• Echo and Echo Reply: These two messages are used to check whether hosts are reachable on the network. One
host sends an Echo message to the other, optionally containing some data and the receiving host responds with an
Echo Reply containing the same data. These messages are the basis for the Ping command.
• Source Quench: Sent by a router to indicate that it is experiencing congestion and is discarding datagrams.
• TTL Exceeded: This message indicates that a datagram has been discarded because the TTL field reached 0 or
because the entire packet was not received before the fragmentation timer expired.
• Timestamp and Timestamp Reply: These messages are similar to the Echo messages, but place a timestamp
(with millisecond granularity) in the message, yielding a measure of how long remote systems spend buffering and
processing datagrams and providing a mechanism so that hosts can synchronize their clocks.In order to assign the
names to various machines, some kind of naming system was required. Thus, a hierarchical name space was
designed such that each domain name was divided into several parts of the tree, e.g., the domain name
‘yahoo.com’ consists of two parts. First the domain name is read from right to left, i.e., com signifies a commercial
website (upper level of hierarchical system) and yahoo denotes the name of the website (lower level of
hierarchical system) .
In DNS, a tree structure has been designed such that root of the tree binds the complete tree. The maximum levels
of the tree are 128 and each label of the tree can have a string of 63 characters. The root of the DNS hierarchy
(tree) is designated with a period ‘.’. Thereafter the tree contains a group of top-level domains including familiar
names like com, org, edu, various country-level domains like in (India) etc.
Domain server: domain name information has been distributed among various servers known as Domain Servers.
The server is responsible or has an authority over a specific region called a zone i.e., the DNS database is divided
into zones. The servers in their respective zones are responsible for answering queries for their zones and are
called name servers.
A name server is a server program that holds a master or a copy of a name-to-address mapping database, or
otherwise points to a server that does and that answers requests from the client software, called a name resolver.
Conceptually, all Internet domain servers are arranged in a tree structure that corresponds to the naming
hierarchy.
A zone is simply a sub-tree of DNS and is administered separately. There are multiple name servers for a zone.
There is usually one primary name server and one or more secondary name servers. A name server may be
authoritative for more than one zone.
Domain Name Resolution : The concept of mapping a domain name to an IP address and vice-versa is known as
resolution process. The resolution process is basically a client server platform. Whenever a user needs to map an
address to a domain or vice-versa, the DNS calls a client program called resolver. The resolver subsequently
contacts the nearest DNS server (name server) with a request. In case the server has the desired information, it
replies back with the results. Otherwise it suggests the resolver to other domain servers or asks other servers to
provide the desired information. The resolver, after receiving the results asserts the information and thereafter
delivers the desired information to the specific host process.
Dynamic Domain Name System (DDNS) is a protocol that defines extensions to the DNS in order to enable the DNS
servers to accept the requests to add, update and delete entries in the DNS database dynamically. Because DDNS
offers a functional superset to existing DNS servers, a DDNS server can serve both static and dynamic domains at
the same time. Rather than allowing any host to update its DNS records, the secure version of DDNS uses public
key security and digital signatures to authenticate update requests from DDNS hosts.
Three common utilities for querying name servers are provided with many DNS implementations: 1) Host
obtains an IP address associated with a host name or a host name associated with an IP address. 2) Nslookup
allows you to locate information about network nodes, examine the contents of a name server database and
establish the accessibility of name servers. 3) Hig allows you to exercise name servers, gather large volumes of
domain name information, and execute simple domain name queries. DIG stands for Domain Internet Groper.
Electronic mail (e-mail) is probably the most popular service of TCP/IP. For most people, it has become an integral
part of everyday life. Electronic mail provides a platform for exchanging information between two end users. It is
basically used for sending and receiving mails/messages, e.g., textual, voice, graphical and video messages
between end users. This section provides an overview of the TCP/IP application protocol dealing with electronic
mail.
Simple Mail Transfer Protocol (SMTP) The standard mechanism for electronic mail in the Internet is Simple Mail
Transfer Protocol (SMTP). It provides mail and message exchange between TCP/IP hosts. SMTP is based on end-to-
end delivery i.e., an SMTP client contacts the destination host’s SMTP server directly for delivering the mail. The
destination host’s SMTP server keeps the mail until the mail has been successfully copied into the recipient’s
SMTP. The SMTP is a connection service based on client-server environment and runs on port number 25 at the
server side . The various components of SMTP are: 1) Mail Transfer Agent (MTA) 2) User Agent (UA)
Post Office Protocol (POP) : As SMTP is based on TCP/IP protocol, a TCP connection is required to be established
between both ends. However, user machines cannot be expected to be online 24 x 7, especially a desktop machine
owned by a home user. Therefore, there was a need for developing a system by which a user could receive his/her
e-mails even though the machine was powered off. Therefore, most of the organisations install a SMTP server
which is always online and receives e-mails on the behalf of each and every user of the organisation on its
network. Basically the SMTP server acts as a “post office”. In order to retrieve the e-mails stored in the SMTP
server on the behalf of the users, a protocol called Post Office Protocol (POP) has been devised. It assists in
downloading the e-mails from the SMTP server .
Internet Mail Access Protocol (IMAP) : In POP, whenever a user accesses the mails from the mail server, i.e.,
downloads the mails, instantantly those accessed mails are deleted from the mail server. Thus, POP is not suitable
for people accessing their mails from various locations, i.e., cyber cafe, home, hotel etc. POP does not provide the
facility for creating folders, organising the mails on the mail server etc. In order to avoid the deletion of the mails
from the mail server, another protocol called Internet Mail Access Protocol (IMAP) has been devised. In addition to
services offered by POP, IMAP provides the following services: 1) The user can create, rename or delete the
mailbox on the mail server. 2) The user can check the header part of the mail before downloading the message.
MIME: A protocol called Multipurpose Internet Mail Extension (MIME) supports transfer of Non-ASCII formats
through SMTP. Primarily, MIME converts the non-ASCII formats into ASCII format and passes the data to SMTP.
Consequently, the SMTP sends the ASCII form of data to the destination machine. The SMTP service at the
destination machine passes the ASCII form of data to MIME which in turn converts the data into non-ASCII format.
Remember that MIME is simply an extension of SMTP and is not a mail protocol.
TELNET : The most fundamental method of data communication employed on a network is the ability to perform
remote execution i.e. calling an application on a remote terminal. TELNET is a widely known application protocol
that provides remote execution capability. TELNET is a popular client server application program. TELNET is an
abbreviation for TErminal NETwork. TELNET is a standard application protocol that provides an interface, through
which a program on a host i.e., TELNET client can access the resources of another host i.e., TELNET server. TELNET
provides an environment such that the client acts as a local terminal connected to the server . Basically, TELNET is
a utility whereby a user first logs into a remote machine and thereafter the user can access the files / programs
located remotely.
FILE TRANSFER PROTOCOL : The transfer of files between two machines is one of the most common operations in
a network. The standard mechanism for copying files from one machine to another is known as File Transfer
Protocol (FTP). Although it might seem quite simple to transfer data between two hosts, there are many issues
which are to be resolved in such a transfer. For instance, two systems may use different file name conventions,
different representation of data, different directory structures etc. These issues have been resolved with the help
of FTP. FTP employs a client server environment. In order to access remote files in FTP, the user must firstly
authenticate to the server before it allows the file transfer.
getsockname() : It obtains the name assigned to a socket, which is the address of the local endpoint and was
assigned with a bind() function.
getsockname() returns the current name for the specified socket. The namelen parameter should be initialized to
indicate the amount of space pointed to by name. On return, it contains the actual size of the name returned (in
bytes). If getsockname() is successful, a value of 0 is returned. A return value of -1 indicates an error, and the error
code stored in the global integer errno indicates the nature of the error.
Socket Options : It is possible to set and get a number of options on sockets via the setsockopt and getsockopt
system calls. These options include such things as marking a socket for broadcasting, not to route, to linger on
close, etc. The general forms of the calls are: setsockopt(sockfd, level, optname, optval, optlen); and
getsockopt(sockfd, level, optname, optval, optlen);
setsockopt() : The setsockopt() function is used to manipulate options associated with a socket.
getsockopt(): The getsockopt() function is used to retrieve options currently associated with a socket.
Select System Call : The select() system call is used to synchronise processing of several sockets operating in non-
blocking mode. When an application calls recv or recvfrom it is blocked until data arrives for that socket. While the
incoming data stream is empty program can do some other job or the situation when a program receives data
from multiple sockets. The select function call solves this problem by allowing the program to choose all the socket
handles to see if they are available for non-blocking reading and writing operations.
Raw sockets are those sockets, which offer the programmer the possibility to have absolute control over the data,
being sent or received through the network.
Unicasting :Unicast is the term used to describe communication where a piece of information is sent from one
point to another point. In this case there is just one sender, and one receiver. In unicast transmission a packet is
sent from a single source to a specified destination, is still the predominant form of transmission on LANs and
within the Internet. For example in our earlier sections we have given the implementation of unicasting.
Broadcasting : Broadcast is the term which is very familiar to all of us, and it has a traditional meaning associated
with TV and radio. It generally means as a transmission that can be received by everyone having the correct
equipment. In this case there is just one sender, but the information is sent to all connected receivers. Broadcast
transmission is supported by most of the LANs, for example the ARP (address resolution protocol) uses this to send
an address resolution query to all computers on a LAN.
Multicasting is the term used to describe communication where a piece of information is sent from one point to a
set of other points. In this case there is one sender, and the information is distributed to a set of receivers. One
example of this we can see in email and chatting groups on the Internet.IP multicast provides dynamic many-to-
many connectivity between a set of senders (at least 1) and a group of receivers. The format of IP multicast
packets are identical to that of unicast packets and is distinguished only by the use of a special class of destination
address (class D IP address), which denotes a specific multicast group.
“Quality of service” has become a big buzzword. This term conveys about as much useful information about what
the technology offers as being told that it is “high performance”.
Quality of service features : * Bandwidth Reservation: The ability to reserve a portion of bandwidth in a network
or interface for a period of time, so that two devices can count on having that bandwidth for a particular
operation. This is used for multimedia applications where data must be streamed in real-time and packet rerouting
and retransmission would result in problems. This is also called resource reservation.
• Latency Management: A feature that limits the latency in any data transfer between two devices to a known
value.
• Traffic Prioritization: In conventional networks, “all packets are created equal”. A useful QoS feature is the ability
to handle packets so that more important connections receive priority over less important one.
• Traffic Shaping: This refers to the use of buffers and limits that restrict traffic across a connection to be within a
pre-determined maximum.
• Network Congestion Avoidance: This QoS feature refers to monitoring particular connections in a network, and
rerouting data when a particular part of the network is becoming congested.