CN Iae1 Set A Answer Key
CN Iae1 Set A Answer Key
5. Socket Address:
Socket is an end point of a two way communication link between two programs
running on a network.
Connection of IP address and Port number.
IP address + Port number = Socket address
Socket Address
190.10.10.20:21
PART – B
(16 Marks)
11. a) OSI: (Open System Interconnection)
1. PHYSICAL LAYER:
Physical characteristics of interfaces and media
Representation of bits
Signals:
Synchronization of bits
Line Configuration
Physical Topology
Transmission Mode
2. DATA LINK LAYER
Framing
Physical addressing
Flow control
Error control
Medium Access control
3. NETWORK LAYER
Logical addressing
Routing
4. TRANSPORT LAYER
Port addressing / Service Point addressing
Segmentation and reassembly
Connection control
Flow control
Error Control
5. SESSION LAYER
Dialog control
Synchronization
6. PRESENTATION LAYER
Translation
Compression and expansion
7. APPLICATION LAYER
FTAM (File Transfer, Access, Management)
Mail services
Directory services
11.b.i) HTTP: (Hypertext Transfer Protocol)
The Hypertext Transfer Protocol (HTTP) is used to define how the client-
Server programs can be written to retrieve web pages from the Web.
It is a protocol used to access the data on the World Wide Web (WWW).
An HTTP client sends a request; an HTTP server returns a response.
The server uses the port number 80; the client uses a temporary port number.
HTTP uses the services of TCP, a connection-oriented and reliable protocol.
Each HTTP message has the general form
START_LINE <CRLF>
MESSAGE_HEADER <CRLF>
<CRLF> MESSAGE_BODY <CRLF>
Where <CRLF> stands for carriage-return-line-feed.
Features of HTTP
Connectionless protocol
Media independent
Stateless
Http request and response messages:
HTTP REQUEST MESSAGE
HTTP CONNECTIONS
Non-persistent connections
Persistent connections
11.b.ii) SMTP: Simple Mail Transfer Protocol
SMTP is the standard protocol for transferring mail between hosts in the
TCP/IP protocol suite.
SMTP is not concerned with the format or content of messages themselves.
SMTP uses information written on the envelope of the mail (message header),
but does not look at the contents (message body) of the envelope.
SMTP clients and servers have two main components
User Agents(UA) – Prepares the message, encloses it in an envelope.
Mail Transfer Agent (MTA) – Transfers the mail across the internet
SMTP also allows the use of Relays allowing other MTAs to relay the mail.
SMTP COMMANDS AND RESPONSES:-
The operation of SMTP consists of a series of commands and responses
exchanged between the SMTP sender and SMTP receiver.
The initiative is with the SMTP sender, who establishes the TCP connection.
Once the connection is established, the SMTP sender sends commands over the
connection to the receiver.
The command is from an MTA client to an MTA server; the response is from
an MTA server to the MTA client.
SMTP OPERATIONS
Basic SMTP operation occurs in three phases:
1. Connection Setup
2. Mail Transfer
3. Connection Termination
12.a) working of an E-Mail:-
EMAIL (SMTP, MIME, IMAP, POP)
One of the most popular Internet services is electronic mail (E-mail).
Email is one of the oldest network applications.
The three main components of an Email are
1. User Agent (UA)
2. Messsage Transfer Agent (MTA) – SMTP
3. Messsage Access Agent (MAA) - IMAP , POP
When the sender and the receiver of an e-mail are on the same system, we need
only two User Agents and no Message Transfer Agent
When the sender and the receiver of an e-mail are on different system, we need
two UA, two pairs of MTA (client and server), and two MAA (client and
server).
WORKING OF EMAIL
When Alice needs to send a message to Bob, she runs a UA program to
prepare the message and send it to her mail server.
The mail server at her site uses a queue (spool) to store messages waiting to be
sent. The message, however, needs to be sent through the Internet from Alice’s
site to Bob’s site using an MTA.
Here two message transfer agents are needed: one client and one server.
The server needs to run all the time because it does not know when a client will
ask for a connection.
The client can be triggered by the system when there is a message in the queue
to be sent.
The user agent at the Bob site allows Bob to read the received message.
Bob later uses an MAA client to retrieve the message from an MAA server
running on the second server.
The following six steps shows the working of a DNS. It maps the host name to an IP
address:
1. The user passes the host name to the file transfer client.
2. The file transfer client passes the host name to the DNS client.
3. Each computer, after being booted, knows the address of one DNS server. The
DNS client sends a message to a DNS server with a query that gives the file
transfer server name using the known IP address of the DNS server.
4. The DNS server responds with the IP address of the desired file transfer server.
5. The DNS server passes the IP address to the file transfer client.
6. The file transfer client now uses the received IP address to access the file
transfer server.
NAME SPACE
To be unambiguous, the names assigned to machines must be carefully selected
from a name space with complete control over the binding between the names
and IP address.
The names must be unique because the addresses are unique.
A name space that maps each address to a unique name can be organized in
two ways: flat (or) hierarchical.
Domain Name
Each node in the tree has a label called as domain name.
A full domain name is a sequence of labels separated by dots (.)
The domain names are always read from the node up to the root.
The last label is the label of the root (null).
This means that a full domain name always ends in a null label, which
means the last character is a dot because the null string is nothing.
If a label is terminated by a null string, it is called a fully qualified domain
name (FQDN).
If a label is not terminated by a null string, it is called a partially qualified
domain name (PQDN).
Slow Start
Slow start is used to increase Congestion Window exponentially from a cold start.
Source TCP initializes Congestion Window to one packet.
TCP doubles the number of packets sent every RTT on successful transmission.
When ACK arrives for first packet TCP adds 1 packet to CongestionWindow and
sends two packets.
When two ACKs arrive, TCP increments CongestionWindow by 2 packets and sends
four packets and so on.
Instead of sending entire permissible packets at once (bursty traffic), packets are sent
in a phased manner, i.e., slow start.
Initially TCP has no idea about congestion, henceforth it increases
CongestionWindow rapidly until there is a timeout. On timeout:
CongestionThreshold = CongestionWindow/ 2
CongestionWindow = 1
When the site receives a data chunk, it stores it at the end of the buffer (queue) and
subtracts the size of the chunk from winSize.
The TSN number of the chunk is stored in the cumTSN variable.
When the process reads a chunk, it removes it from the queue and adds the size of the
removed chunk to winSize (recycling).
When the receiver decides to send a SACK, it checks the value of lastAck; if it is less
than cumTSN, it sends a SACK with a cumulative TSN number equal to the
cumTSN.
It also includes the value of winSize as the advertised window size.
Sender Site
The sender has one buffer (queue) and three variables: curTSN, rwnd, and inTransit.
We assume each chunk is 100 bytes long. The buffer holds the chunks produced by
the process that either have been sent or are ready to be sent.
The first variable, curTSN, refers to the next chunk to be sent.
All chunks in the queue with a TSN less than this value have been sent, but not
acknowledged; they are outstanding.
The second variable, rwnd, holds the last value advertised by the receiver (in bytes).
The third variable, inTransit, holds the number of bytes in transit, bytes sent but not
yet acknowledged.
The following figure shows the queue and variables at the sender site.