Chapter 6 Yearwise Marking
Chapter 6 Yearwise Marking
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative,
hypermedia information systems. HTTP is the foundation of data communication for the World
Wide Web. Hypertext is structured text that uses logical links (hyperlinks) between nodes
containing text. It is a request-response protocol in the client-server computing model. When you
enter http:// in front of the address tells the browser to connect over HTTP. For example, when you
enter a URL in your web browser, this sends an HTTP command to the Web server to fetch and
transfer the requested web page. Here, your web browser is your client and your website host as a
server.
Upon interaction with a website, such as trying to retrieve a webpage, data is sent back and forth
between you and the web server. The S in HTTPS signals the inclusion of the "Secure Sockets
Layer" - more colloquially known as "SSL" - whose function is to encrypt the data that is
exchanged between the client and the website so when the client tries to connect to the website,
6.What do you mean by email server? What are the protocols used on it? [5,6]
Ans: An email server, or simply mail server, is an application or computer in a network whose sole
purpose is to act as a virtual post office. The server stores incoming mail for distribution to local
users and sends out outgoing messages. This uses a client-server application model to send and
receive messages using Simple Mail Transfer Protocol (SMTP).
Mail servers send and receive email using standard email protocols. For example,
the SMTP protocol sends messages and handles outgoing mail requests.
The IMAP and POP3 protocols receive messages and are used to process incoming mail. When
you log on to a mail server using a webmail interface or email client, these protocols handle all the
connections behind the scenes.
What is DNS? Explain the structure of DNS request and response with practical example.
[2+6]
The Domain Name System (DNS) is a hierarchical and decentralized naming system for
computers, services, or other resources connected to the Internet or a private network. It associates
various information with domain names assigned to each of the participating entities. Most
prominently, it translates more readily memorized domain names to the numerical IP addresses
needed for locating and identifying computer services and devices with the underlying network
protocols.
Structure of DNS
Domain name Space
The domain name space consists of a tree data structure. Each node or leaf in the tree has a label
and zero or more resource records (RR), which hold information associated with the domain name.
The domain name itself consists of the label, concatenated with the name of its parent node on the
right, separated by a dot.
The tree sub-divides into zones beginning at the root zone. A DNS zone may consist of only one
domain, or may consist of many domains and sub-domains, depending on the administrative
choices of the zone manager. DNS can also be partitioned according to class where the separate
classes can be thought of as an array of parallel namespace trees.
Domain name syntax, internationalization
The right-most label conveys the top-level domain; for example, the domain name
www.example.com belongs to the top-level domain com.
The hierarchy of domains descends from right to left; each label to the left specifies a subdivision,
or subdomain of the domain to the right. For example, the label example specifies a subdomain of
the com domain, and www is a subdomain of example.com. This tree of subdivisions may have
up to 127 levels. A label may contain zero to 63 characters. The null label, of length zero, is
reserved for the root zone. The full domain name may not exceed the length of 253 characters in
its textual representation.[1] In the internal binary representation of the DNS the maximum length
requires 255 octets of storage, as it also stores the length of the name.
Name servers
The Domain Name System is maintained by a distributed database system, which uses the client–
server model. The nodes of this database are the name servers. Each domain has at least one
authoritative DNS server that publishes information about that domain and the name servers of
any domains subordinate to it. The top of the hierarchy is served by the root name servers, the
servers to query when looking up (resolving) a TLD.
What are the different components of email server? Explain the different types of electronic
mail sending and accessing protocol. [5,6]
The different components of email server are:
i. Mail User Agent
ii. Mail Transfer Agent
iii. Mail Host and Mailboxes
How web server communication and file server communication are possible in network,
explain with used protocols. Define socket programming.
Common Internet protocols include TCP/IP (Transmission Control Protocol/Internet
Protocol), UDP/IP (User Datagram Protocol/Internet Protocol), HTTP (HyperText Transfer
Protocol) and FTP (File Transfer Protocol).
TCP/IP
TCP/IP is a stream protocol. This means that a connection is negotiated between a client
and a server. Any data transmitted between these two endpoints is guaranteed to arrive,
thus it is a so-called lossless protocol. Since the TCP protocol (as it is also referred to in
short form) can only connect two endpoints, it is also called a peer-to-peer protocol.
HTTP
HTTP is the protocol used to transmit all data present on the World Wide Web. This
includes text, multimedia and graphics. It is the protocol used to transmit HTML, the
language that makes all the fancy decorations in your browser. It works upon TCP/IP.
FTP
FTP is the protocol used to transmit files between computers connected to each other by a
TCP/IP network, such as the Internet.
File sharing is something which is part of our daily activities. This is also commonly referred to
as P2P or Peer-to-Peer sharing. This could be sharing files between two nodes in a network or
between a client and a server or between two nodes not within the same network. Any multi-user
environment will require a file sharing mechanism.
There are several applications available which cater to file sharing. Some of these are:
uTorrent
BitTorrent
SoulSeek
eMuke
Shareaza
FTP – FTP stands for File Transfer Protocol. This is a common method used to transfer
files between devices and users within a network. You can access, download and upload
files using FTP. This is mostly used to transfer files between the host computer and a
server or a website. Basic configuration changes with port forwarding enabled can be
used to access FTP outside a network. Some of the popular FTP based applications
include– Transmit, Cyberduck, FileZilla, WinSCP, Coda.
SFTP (SSH based) – As the name suggests this is a variant of FTP and is a more secure
way of using FTP. SFTP stands for Secure File Transfer Protocol. This is SSH-based file
transfer. This has an ability to provide secure connections for file transfer and can be used
for local as well as remote systems. In most cases, SFTP is a more favorable choice
owing to the added security it provides. Most applications which support FTP also
support SFTP.
SCP – This is commonly referred to as Secure Copy protocol. This works on Secure
Shell- SSH protocol and can be used to transfer files between local and remote hosts or
between two remote hosts. SCP is based on BSD RCP protocol. Since it works over SSH,
SCP uses the same mechanism for authentication. SCP runs over TCP port 22 and using
this a client one can either upload or download single or multiple files. There is no RFC
that provides specifications of this protocol.
SMB – SMB stands for Server Message block. This is an application layer network layer
protocol. This is a protocol which is mainly used for shared access to printers, files, and
ports. Additionally, this also provides an authenticated inter-process communication
mechanism. This was mostly used with Windows and was known as Microsoft Windows
Network, before the start of Active Directory. SAMBA is an implementation of SMB.
CIFS is a specific implementation of SMB and stands for Common Internet File System.
NFS – NFS stands for Network File System protocol and is a standard protocol used over
a distributed file system. This is commonly used in a client-server architecture and allows
users to view, store and update files in a remote system. To use this there are a couple of
prerequisites and may require the user to be comfortable using Linux based systems. This
is a popular file system access protocol which works with Linux, FreeBSD, Apple’s
macOS, Solaris, AIX. Apart from this, other file system access protocol includes SMB
(Server Message Block also called as CIFS), AFP (Apple Filing Protocol), NCP (Network
Core Protocol). This is a distributed file system standard for network attached storage-
NAS. The protocol allows users to view, store and update files over a remote network.
The way SAMBA is closely associated with Windows, NFS is a great choice for Linux or
Unix users.
Socket programming is a way of connecting two nodes on a network to communicate with each
other. One socket(node) listens on a particular port at an IP, while other socket reaches out to the
other to form a connection. Server forms the listener socket while client reaches out to the server.
Web Server
A web server is server software or hardware dedicated to running said software, that can
satisfy world wide web client requests. A web server can, in general, contain one or more websites.
The primary function of a web server is to store, process and deliver web pages to clients. The
communication between client and server takes place using the HTTP (Hyper text transfer
protocol).
Web servers can frequently be found in embedded devices such as printers, routers, webcams and
serving only a local network. The web server may then be used as a part of a system for monitoring
or administering the device in question. This usually means that no additional software has to be
installed on the client computer since only a web browser is required.
A web server can be either incorporated into the OS kernel, or in user space . Web servers that run
in user-mode have to ask the system for permission to use more memory or more CPU resources.
Not only do these requests to the kernel take time, but they are not always satisfied because the
system reserves resources for its own usage and has the responsibility to share hardware resources
with all the other running applications. Executing in user mode can also mean useless buffer copies
which are another limitation for user-mode web servers.
7. Which protocols are used in sending and receiving email? Illustrate with necessary
figure.
For sending and receiving an email, SMTP (Simple Mail Transfer Protocol) is a widely
used push protocol.
SMTP Fundamentals
SMTP is an application layer protocol. The client who wants to send the mail opens a
TCP connection to the SMTP server and then sends the mail across the connection. The
SMTP server is always on listening mode. As soon as it listens for a TCP connection
from any client, the SMTP process initiates a connection on that port (25). After
successfully establishing the TCP connection the client process sends the mail instantly.
SMTP Protocol
The end to end model is used to communicate between different organizations whereas
the st
ore and forward method are used within an organization. A SMTP client who wants to
send the m
ail will contact the destination’s host SMTP directly in order to send mail to the
destination. The SMTP server will keep the mail to itself until it is successfully copied
to the receiver’s SMTP.
The client SMTP is the one which initiates the session let us call it the client- SMTP and
the server SMTP is the one which responds to the session request and let us call it
receiver-SMTP. The client- SMTP will start the session and the receiver-SMTP will
respond to the request.
In the SMTP model, user deals with the user agent (UA) for example Microsoft
Outlook, Netscape, Mozilla, etc. In order to exchange the mail using TCP, MTA is used.
The users sending the mail do not have to deal with the MTA it is the responsibility of
the system admin to set up the local MTA. The MTA maintains a small queue of mails
so that it can schedule repeat delivery of mail in case the receiver is not available. The
MTA delivers the mail to the mailboxes and the information can later be downloaded by
the user agents.
Give a comparison of POP3 and IMAP. [3]
Organization of Domain:
It is very difficult to find out the IP address associated to a website because there are millions of
websites and with all those websites we should be able to generate the ip address immediately,
there should not be a lot of delay for that to happen organization of database is very important.
DNS record – Domain name, IP address what is the validity?? what is the time to live and all the
information related to that domain name. These records are stored in tree like structure.
Namespace – Set of possible names, flat or hierarchical. Naming system maintains a collection
of bindings of names to values – given a name, a resolution mechanism returns the
corresponding value.
Top level server – It is responsible for com, org, edu etc and all top level country
domains like uk, fr, ca, in etc. They have info about authoritative domain servers and
know names and IP addresses of each authoritative name server for the second level
domains.
The client machine sends a request to the local name server, which , if root does not find
the address in its database, sends a request to the root name server , which in turn, will
route the query to an intermediate or authoritative name server. The root name server can
also contain some hostName to IP address mappings . The intermediate name server
always knows who the authoritative name server is. So finally the IP
address is returned to the local name server which in turn returns the IP address to the
host.
Why we need proxy servers? What are the importance of DNS and HTTP(S) while you are
browsing any website?
Part1: Mainly the proxy server is used for legal documentation and privacy. A proxy act as an
intermediary between the user's computer and the Internet to prevent from attack and unexpected
access. To implement Internet access control like authentication for Internet connection, bandwidth
control, online time control, Internet web filter and content filter etc. An advantage of a proxy
server is that its cache can serve all users. If one or more Internet sites are frequently requested,
these are likely to be in the proxy's cache, which will improve user response time. A proxy can
also log its interactions, which can be helpful for troubleshooting.
Part2: The importance of DNS while browsing any website are as follows:
Generally DNS is the only system in the entire world that can help us browse the internet.
With the internet becoming an integral part of the society, it has increasingly become
important that DNS Servers remain maintained. Without them, then the internet would not
exist.
No need for memorizing IP addresses -DNS servers provide a nifty solution of converting
domain or sub domain names to IP addresses. Imagine how it would feel having to
memorize the IP addresses of twitter, Facebook, Google or any other site that we frequently
use on a daily basis. It would definitely be horrific. Its system also makes it easy for search
engines to be able to categorize and archive information.
Security enhancement -DNS servers are an important component for the security of our
home or work connections. DNS servers that have been designed for security purposes
usually ensure that attempts to hack our server environment are thwarted before entry into
our machines.
However, it’s important to note that the word used is enhanced. This means that we will
need other security measures put in place to protect our data, especially if it’s a large
organization with tons of sensitive data.
DNS servers have fast internet connections -People and organizations that use DNS servers
can be able to take advantage of high connection speeds that are a key feature in some of
these servers.
DNS servers also have primary and secondary connections. This allows us to have
internet uptime even when one of the servers is down for maintenance.
The importance of HTTP(S) while browsing any website are as follows:
It preserves referrer data.
It prevents tampering by third parties.
It makes our site more secure for visitors.
It encrypts all communication, including URLs, which protects things like browsing history
and credit card numbers.
How web server communication and file server communication are possible in network ?
Explain with protocol used. Define socket programming.[6]
The World Wide Web has a client/server architecture. This means that a client program running on
your computer (your Web browser) requests information from a server program running on another
computer somewhere on the Internet. That server then sends the requested data back over the Net
to your browser program, which interprets and displays the data on your screen. HTTP is a
connectionless text based protocol. Clients (web browsers) send requests to web servers for web
elements such as web pages and images. After the request is serviced by a server, the connection
between client and server across the Internet is disconnected. A new connection must be made for
each request. Most protocols are connection oriented. This means that the two computers
communicating with each other keep the connection open over the Internet. HTTP does not
however. Before an HTTP request can be made by a client, a new connection must be made to the
server.
When you type a URL into a web browser, this is what happens:
If the URL contains a domain name, the browser first connects to a domain name server
and retrieves the corresponding IP address for the web server.
The web browser connects to the web server and sends an HTTP request (via the protocol
stack) for the desired web page.
The web server receives the request and checks for the desired page. If the page exists, the
web server sends it. If the server cannot find the requested page, it will send an HTTP 404
error message. (404 means 'Page Not Found' as anyone who has surfed the web probably
knows.)
The web browser receives the page back and the connection is closed.
The browser then parses through the page and looks for other page elements it needs to
complete the web page. These usually include images, applets, etc.
For each element needed, the browser makes additional connections and HTTP requests
to the server for each element.
When the browser has finished loading all images, applets, etc. the page will be
completely loaded in the browser window.
Another commonly used Internet service is electronic mail. E-mail uses an application level
protocol called Simple Mail Transfer Protocol or SMTP. SMTP is also a text based protocol, but
unlike HTTP, SMTP is connection oriented. SMTP is also more complicated than HTTP. There
are many more commands and considerations in SMTP than there are in HTTP. When you open
your mail client to read your e-mail, this is what typically happens:
The mail client (Netscape Mail, Lotus Notes, Microsoft Outlook, etc.) opens a connection
to it's default mail server. The mail server's IP address or domain name is typically setup
when the mail client is installed.
The mail server will always transmit the first message to identify itself.
The client will send an SMTP HELO command to which the server will respond with a
250 OK message.
Depending on whether the client is checking mail, sending mail, etc. the appropriate
SMTP commands will be sent to the server, which will respond accordingly.
This request/response transaction will continue until the client sends an SMTP QUIT
command. The server will then say goodbye and the connection will be closed.
SOCKET PROGRAMMING
Sockets programming is the fundamental technology behind communications on TCP/IP networks.
A socket is one endpoint of a two-way link between two programs running on a network. The
socket provides a bidirectional communication endpoint to send and receive data with another
socket.
Socket connections normally run between two different computers on a local area network (LAN)
or across the internet, but they can also be used for interprocess communication on a single
computer.
The steps involved in establishing a TCP socket on the server side are as follows:
Web Server
A Web server is software or hardware that uses HTTP (Hypertext Transfer Protocol) and
other protocols to respond to client requests made over the World Wide Web (WWW). Web server
software controls how a user accesses hosted files. It is accessed through the domain
names of websites and ensures the delivery of the site's content to the requesting user. As hardware,
a Web server is a computer that holds web server software and other files related to a website, such
as HTML documents, images and JavaScript files. Web server hardware is connected to the internet
and allows data to be exchanged with other connected devices.
The Web server process is an example of the client/server model. All computers that host Web sites
must have Web server software. Leading Web servers include Apache, Microsoft's Internet
Information Server (IIS) and Nginx -- pronounced engine X. Other Web servers include Novell's
NetWare server, Google Web Server (GWS) and IBM's family of Domino servers.
Web servers often come as part of a larger package of internet- and intranet-related programs that
are used for:
- Sending and receiving emails.
- Downloading requests for File Transfer Protocol (FTP) files.
- Building and publishing Web pages.
Considerations in choosing a Web server include how well it works with the operating system and
other servers; its ability to handle server-side programming; security characteristics; and the
particular publishing, search engine and site building tools that come with it.
- You are a private contractor hired by the large company to setup the network for their
enterprise and you are given a large number of consecutive IP address starting at
202.70.64.0/19. Suppose that four department A, B, C and D request 100, 500, 800 and 400
addresses respectively, how the subnetting can be performed so that wastage will be
minimum?
Solution,