0% found this document useful (0 votes)
5 views

ccn - unit 4 (1)

unit4

Uploaded by

manasa rai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

ccn - unit 4 (1)

unit4

Uploaded by

manasa rai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

2 MARKS

1. Write the various services offered by the transport layer.


Ans: The following are the services provided by the transport layer protocols (TCP &
UDP):-
 End-to-end delivery
 Reliable Best effort delivery
 Flow control
 Error control
 Congestion control
 Multiplexing

2. Expand TCAP , NSAP.
Ans: i) TSAP:- Transport Service Access Point.
ii) NSAP:- Network Service Access Points.

3. What js port mapper?


Ans: A port mapper is the protocol that maps the number or version of an Open Network
Computing Remote Procedure Call (ONC RPC) program to a port used for networking by
that version of the program.

4. List the two main protocols in transport layer.


Ans:TCP:- Transmission control protocol.
UDP:- User Datagram protocol.

5. Expand TCP, UDP.


Ans:TCP:- Transmission control protocol.
UDP:- User Datagram protocol.

6. What is error control?


Ans:Error control is basically process in data link layer of detecting or identifying and re-
transmitting data frames that might be lost or corrupted during transmission.
7. What is flow control.
Ans:Flow control is the management of data flow between computers or devices or between
nodes in a network so that the data can be handled at an efficient pace. Too much data
arriving before a device can handle it causes data overflow, meaning the data is either lost or
must be retransmitted.

8. Draw a neat diagram of UDP header.


Ans:

9. Expand RPC ,RTP.


Ans: RPC=Remote Procedure Call
RTP=Realtime Transport Protocols

10. What is TCP?


Ans: Transmission Control Protocol (TCP) is a standard that defines how to establish and
maintain a network conversation by which applications can exchange data. TCP works with
the Internet Protocol (IP), which defines how computers send packets of data to each other.

11. Expand PAWs ,SACK.


Ans: PAWS=Privileged Access Workstations.
SACK= Selective Acknowledgments.

12. List the states used in TCP connection management finite state machine.
Ans: The states are: , LISTEN SYN-SENT, SYN- RECEIVED, ESTABLI SHED, FIN-
WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT, and the
fictional state CLOSED.
13. Expand DNS , ICANN.
Ans: DNS=Domain Name System
ICANN=Internet Corporation for Assigned Names and Numbers.

14. How DNS is used?


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

15. List the different DNS resource record types.


Ans: SOA record, A record , AAAA record, MX record , NS record, CNAME record, PTR
record, SRV record .

16.What is Name resolution?


Ans: Name resolution is the process of associating names and IP addresses, and it's one of the
most essential services on a network. People understand descriptive names, but network
communications require difficult-to-remember addresses.

17. Expand SMTP, MIME.


Ans: Simple Mail Transport Protocol (SMTP)
(MIME) Multipurpose Internet Mail Extensions

18.what are two kinds of sub systems of Email system?


Ans:- An e-mail system includes two subsystems as under:-
1.User agents
2.Message transfer agents

19.what is meant by user agent?


Ans:-In computing, a user agent is any software, acting on behalf of a user, which "retrieves,
renders and facilitates end-user interaction with Web content". A user agent is a special kind
of software agent. Some examples of user agents are web browsers and email readers.
20.List the different header fields related to message transport in RFC 5322?
Ans:- Unstructured Header Field Bodies
Structured Header Field Bodies
Long Header Fields

21.List the different message headers added by MIME?


Ans:
 MIME-Version.
 Content-Type.
 Content-Transfer-Encoding.
 Content-ID.
 Content-Description.
 Content-Disposition.

22.List different SMTP extensions?


Ans:
 Extension discovery mechanism.
 Binary data transfer.
 Mail delivery mechanism extensions.
 On-Demand Mail Relay.
 Internationalization extension.
 Extensions.
 Security extensions.

23.Expand IMAP , SOAP?


Ans:- IMAP stands for Internet Access Protocol
SOAP stands for Simple Object Access Protocol.

24.List different IMAP commands ?


Ans:-
 CAPABILITY. ...
 LOGIN/AUTHENTICATE: ...
 NAMESPACE. ...
 FETCH (biff) ...
 UID: (Note: Test cases for the UID command are inherent in the tests written for
FETCH, STORE, COPY, and SEARCH test cases.)
 UIDVALIDITY. ...
 CREATE. ...
 DELETE.

25.What is Webmail?

Ans:- Webmail are web-based email accounts. These are usually free email accounts
that are operated from a website. Examples include Hotmail, GMail and Yahoo Mail.

Webmail allows the users to access their emails as long as they have access to an
Internet connection and a web browser. This also means that the user cannot read an old
email or draft a new email offline.

26.Expand HTTP , URL?


Ans:-HTTP stands for Hyper text Transfer Protocol
URL stands for Uniform Resource Locator.

27.Expand URI , URN.


Ans: URI- Uniform Resource Identifier.
URN- Uniform Resource Name.

28.Expand HTML , CSS.


Ans: HTML- HyperText Markup Language
CSS- Cascading Style Sheets

29.Expand CGI, PHP.


Ans: CGI- Common Gateway Interface or Computer-generated Imagery.
PHP- Hypertext Preprocessor.
30.Expand JSP, AJAX.
Ans: JSP- Java Server Pages
AJAX- Asynchronous JavaScript and XML.

31.Expand DOM , XML.


Ans: DOM- Document Object Model.
XML- Extensible Markup Language.

32.Expand XSLT , XHTML.


Ans: XSLT- Extensible Stylesheet Language Transformation.
XHTML- EXtensible HyperText Markup Language.

33.List the different built-in HTTP request methods.


Ans: The most commonly used HTTP request methods are GET, POST, PUT, PATCH, and
DELETE.

34.List different HTTP message headers.


Ans: Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, TE, Trailer,
Transfer-Encoding, Authentication.

35.Draw a neat diagram of HTTPcaching.


Ans:
3 or more marks
1. Explain elements of transport protocol.
Ans:
 Addressing:- When an application process wishes to set process, it up a connection to
remote application must satisfy which one to connect t The method. normally used is
to define tramp addresses to which processes can listen for connection requests. In
internet, these endpoints. are called Thene are two types of access points. (3) TSAP
(Transport Service access points to mean a specific endpoint in the transport layer.
The analogous endpoints in network layer are not Surprisingly called examples of
NSAP

 Connection establishment:- with packet lifetimes bounded, it is possible to devise


fool proof way to estabish connection a Packet lifetime can be bounded to known
maxim using one of following techniques:
-> restricted subnet design
-> putting a hop counter in each packet
-> time stamping each packet
 Connection Release- A connection is released Using either asymmetric or symmetric
variant But, the Improved protocol for Releasing a connection is a 3- way handshake
protocol.
There are 2 styles of terminating a connection:
 Asymmetric release is the way the telephone system work: when one parity
hang up, the connection is broken
 Symmetric release treats the connection as two seperate unidirectional
connections and requires each one to be released separately.
 Flow control & Buffering:-
Flow control is done by having a sliding window on each connection to fast transmitter than
over running a slow receiver Buffering must be a slow done by the gender, entity
networks service is unreliable.
The sender buffers all the TPDUs sent to receiver The buffer size varies for different They
are:
-> Chained fixed size buffers
->Chained Variable size Buffers
-> One large circular Buffer per connection

 Multiplexing: --
In networks that use virtual circuits within the subnet, each open connection
consumes some table space in routers for entire duration of connections. If buffers
are dedicated to the virtual circuit in each router as well, a user who left a terminal
logged into a remote machine, there is need for multiply.
There are 2 kind of multiplexing.

 Upward multiplexing
 Downward multiplexing

 Crash Recovery:-
TCP is very reliable protocol. It provides sequence number to each of byte
sent in segment. It provides the feedback mechanism i.e. when a host receives
a packet, it is bound to ACK that packet having the next sequence number
expected (if it is not the last segment).
When a TCP Server crashes mid-way communication and re-starts its process
it sends TPDU broadcast to all its hosts. The hosts can then send the last data
segment which was never unacknowledged and carry onwards.

2. Explain the concept of addressing.


Ans: When an application (e.g., a user) process wishes to set up a connection to a remote
application process, it
must specify which one to connect to. The method normally used is to define transport
addresses to which
processes can listen for connection requests. In the Internet, these endpoints are called
ports.
There are two types of access points.
TSAP (Transport Service Access Point) to mean a specific endpoint in the transport layer.
The analogous endpoints in the network layer (i.e., network layer addresses) are not
surprisingly called
NSAPs (Network Service Access Points). IP addresses are examples of NSAPs.
Application processes, both clients and servers, can attach themselves to a local TSAP to
establish a connection to a remote TSAP. These connections run through NSAPs on each
host. The purpose of having TSAPs is that in some networks, each computer has a single
NSAP, so some way is needed to distinguish multiple transport endpoints that share that
NSAP.
A possible scenario for a transport connection is as follows:
1. A mail server process attaches itself to TSAP 1522 on host 2 to wait for an incoming call.
How a
process attaches itself to a TSAP is outside the networking model and depends entirely on
the local operating
system. A call such as our LISTEN might be used, for example.
2. An application process on host 1 wants to send an email message, so it attaches itself to
TSAP 1208 and
issues a CONNECT request. The request specifies TSAP 1208 on host 1 as the source and
TSAP 1522 on
host 2 as the destination. This action ultimately results in a transport connection being
established between
the application process and the server.
3. The application process sends over the mail message.
4. The mail server responds to say that it will deliver the message.
5. The transport connection is released.

3. Explain the process of connection establishment in transport layer.


Ans: To make the transport services reliable, TCP hosts must establish a connection-oriented
session with one another. Connection establishment is performed by using the three-way
handshake mechanism. A three-way handshake synchronizes both ends of a network by
enabling both sides to agree upon original sequence numbers.
This mechanism also provides that both sides are ready to transmit data and learn that the other
side is available to communicate. This is essential so that packets are not shared or
retransmitted during session establishment or after session termination. Each host randomly
selects a sequence number used to track bytes within the stream it is sending and receiving.
The three-way handshake proceeds in the manner shown in the figure below:-
The requesting end (Host A) sends an SYN segment determining the server's port number that
the client needs to connect to and its initial sequence number (x).
The server (Host B) acknowledges its own SYN segment, including the servers initial
sequence number (y). The server also responds to the client SYN by accepting the sender's
SYN plus one (X + 1).
An SYN consumes one sequence number. The client should acknowledge this SYN from the
server by accepting the server's SEQ plus one (SEQ = x + 1, ACK = y + 1). This is how a TCP
connection is settled.

4. Explain the process of connection release in transport layer.


Ans: While it creates three segments to establish a connection, it takes four segments to
terminate a connection. During a TCP connection is full-duplex (that is, data flows in each
direction independently of the other direction), each direction should be shut down alone.
The termination procedure for each host is shown in the figure. The rule is that either end can
share a FIN when it has finished sending data.
When a TCP receives a FIN, it should notify the application that the other end has terminated
that data flow direction. The sending of a FIN is usually the result of the application issuing a
close. The receipt of a FIN only means that there will be no more data flowing in that direction.
A TCP can send data after receiving a FIN. The end that first issues the close..
5. With neat diagram the Explain User datagram protocol.
Ans: User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the
Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and
connectionless protocol. So, there is no need to establish a connection prior to data
transfer. The UDP helps to establish low-latency and loss-tolerating connections establish
over the network. The UDP enables process to process communication.

Though Transmission Control Protocol (TCP) is the dominant transport layer protocol used
with most of the Internet services; provides assured delivery, reliability, and much more but
all these services cost us additional overhead and latency. Here, UDP comes into the picture.
For real-time services like computer gaming, voice or video communication, live
conferences; we need UDP. Since high performance is needed, UDP permits packets to be
dropped instead of processing delayed packets. There is no error checking in UDP, so it also
saves bandwidth.
User Datagram Protocol (UDP) is more efficient in terms of both latency and bandwidth.

UDP Header –

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

1. Source Port: Source Port is a 2 Byte long field used to identify the port number of
the source.
2. Destination Port: It is a 2 Byte long field, used to identify the port of the destined
packet.
3. Length: Length is the length of UDP including the header and the data. It is a 16-
bits field.
4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of
the one’s complement sum of the UDP header, the pseudo-header of information
from the IP header, and the data, padded with zero octets at the end (if necessary) to
make a multiple of two octets.
6. Explain the technique of Remote Procedure Call.
Ans: RPC is a protocol that one program can use to request a service from a program located
in another computer on a network without having to understand the networks details.
when a process on machine 1 calls a procedure on machine 2, the calling process on 1 is
suspended and execution of the called procedure take place on 2.
Information can be transported from the caller (sender) to the callee(receiver) in the
parameter and can come back in the procedure result.
No message passing is visible to the application programmer. this technique is known as
RPC.
Traditionally the calling procedure is known as the client and the called procedure is know as
server.
To call a remote procedure the client program must be bound with a small library procedure
called the client stub, the represents the server procedure in the client address space. The
server is bound with a procedure call the server stub.
step1: Is a client calling the client stub this is the local procedure called with the parameters
pushed onto the stack in normal way.
step2: Is the client stub packing the parameter into a message and making a system called to
send the message.
step3: Is the OS (operating system) passing the message from the client machine to the server
machine.
step4: Is the OS passing the incoming packet to the server stub
step5: Is the server stub calling the server procedure with the unmarshalled parameter. The
reply traces the save path the other direction.

6. Explain Real Time Transport Protocol.


Ans: Real-time Transport Protocol (RTP) is a network standard designed for transmitting
audio or video data that is optimized for consistent delivery of live data. It is used in
internet telephony, Voice over IP and video telecommunication. It can be used for one-
on-one calls (unicast) or in one-to-many conferences (multicast).RTP was standardized
by the Internet Engineering Task Force (IETF)
IETF designed RTP for sending live or real-time video over the internet. All network data
is sent in discrete bunches, called packets. Because of the distributed nature of the
internet, it is expected for some packets to arrive with different time spacing
(called jitter), in the wrong order (called out-of-order delivery), or to not be delivered at
all (called packet loss).
RTP can compensate for these issues without severely impacting the call quality. It favors the
quick delivery of packets over ensuring all data is received. This helps the video stream to be
consistent and always playing, instead of buffering or stopping playback.

To illustrate this difference, imagine a user wanted to watch a video on the internet. The
video streaming service would use RTP to send the video data to their computer. If some of
the data packets were lost, RTP would correct for this error and the video may lose a few
frames or a fraction of a second of audio. This could be so brief as to be unnoticeable to the
viewer.

Application of RTP

I. RTP mainly helps in media mixing, sequencing and time-stamping.


II. Voice over Internet Protocol (VoIP)
III. Video Teleconferencing over Internet.
IV. Internet Audio and video streaming.

8. Explain TCP service model.


Ans: TCP service is obtained by both the sender and the receiver creating end points called
sockets. Each socket has a socket number (Address) consisting of the IP address of the host
and a 16 -bit number local to that host, called a port. A port is the TCP name for a TSAP. For
TCP service to be obtained , a connection must be explicitly established between a socket on
one machine and a socket on another machine. A socket may be used for multiple
connections at the same time . In other words, two or more connection may terminate at the
same socket. Connection are identified by the socket identifiers at both ends, that is
(socket1,socket2). No virtual circuit numbers or other identifiers are used.
All TCP connections are full duplex and point -to-point. Full duplex means that traffic can go
in both direction at same time. Point-to-point means that each connection has exactly two end
points. TCP does not support multicasting or broadcasting. A TCP connection is byte stream,
not a message stream. Message boundaries are not preserved end to end. For example, if the
sending process does four 512-byte writes to a TCP streams, these data may be delivered to
the receiving process as four 512- byte chunks, two 1024-byte chunks, one 2048-byte chunk
or some other way. There is no way for the receiver to detect the unit(s) in which the data
were written, no matter how hard it tries.
We explain some of the sockets calls with their respectful meaning in the following table. It
also should know that TCP does not support multicasting & broadcasting.
Different Socket Calls
The table given below explains the socket calls in TCP service model −
Socket Calls Meaning

Socket It creates a new


socket call
connection.

Bind It gives a local


location to a socket.

Listen In response to
making a new
connection, and it
shows a willingness
to accept new
connections.

Accept It can block the


caller unit when a
connection attempt
arrives.

Send It can send data over


the connection.

Receive It can receive data


over the connection.

Connect It can attempt to


make a connection.

Close It can release the


connection.

9. With a neat diagram explain TCP segment header.


Ans: Every TCP segment consists of a 20 byte fixed format header. Header options may follow
the fixed header. With a header so that it can tag up to 65535 data bytes.
The TCP header format is shown in the figure below −
Source Port
It is a 16-bit source port number used by the receiver to reply.
Destination Port
It is a 16-bit destination port number.
Sequence Number
The sequence number of the first data byte in this segment. During the SYN Control bit is set,
and the sequence number is n, and the first data byte is n + 1.
Acknowledgement Number
If the ACK control bit is set, this field contains the next number that the receiver expects to
receive.
Data Offset
The several 32-bit words in the TCP header shows from where the user data begins.
Reserved (6 bit)
It is reserved for future use.
URG
It indicates an urgent pointer field that data type is urgent or not.
ACK
It indicates that the acknowledgement field in a segment is significant, as discussed early.
PUSH
The PUSH flag is set or reset according to a data type that is sent immediately or not.
RST It Resets the connection.
SYN
It synchronizes the sequence number.
FIN
This indicates no more data from the sender.
Window
It is used in Acknowledgement segment. It specifies the number of data bytes, beginning with
the one indicated in the acknowledgement number field that the receiver is ready to accept.
Checksum
It is used for error detection.
Options
The IP datagram options provide additional punctuality. It can use several optional parameters
between a TCP sender and receiver. It depends on the options used. The length of the field
may vary in size, but it can't be larger than 40 bytes due to the header field's size, which is 4
bit.
The most typical option is the maximum segment size MASS option. A TCP receiver
communicates to the TCP sender the total length of the segment it can accept with this option.
The other various options are used for flow control and congestion control, each explained in
the table shown in the table.
Table of Options
The table of options in TCP segment header is as follows −

Kind Length Meaning

0 - End of
option list

1 - No
operation

2 4 Maximum
segment size

3 3 Window
Scale
Kind Length Meaning

4 2 Sack-
permitted

5 X Sack

8 10 Time
Stamps

Padding
Options in each may vary in size, and it may be necessary to "pad" the TCP header with zeros
so that the segment ends on a 32-bit word boundary as per the standard.
Data
Although in some cases like acknowledgement segments with no data in the reverse direction,
the variable-length field carries the application data from sender to receiver. This field,
connected with the TCP header fields, constitute a TCP segment.

10. Explain the process of TCP connection establishment.


Ans: TCP is a connection-oriented protocol and every connection-oriented protocol needs to
establish a connection in order to reserve resources at both the communicating ends.

Connection Establishment –

1. Sender starts the process with the following:

 Sequence number (Seq=521): contains the random initial sequence number


generated at the sender side.
 Syn flag (Syn=1): request the receiver to synchronize its sequence number with the
above-provided sequence number.
 Maximum segment size (MSS=1460 B): sender tells its maximum segment size, so
that receiver sends datagram which won’t require any fragmentation. MSS field is
present inside Option field in TCP header.
 Window size (window=14600 B): sender tells about his buffer capacity in which he
has to store messages from the receiver.

2. TCP is a full-duplex protocol so both sender and receiver require a window for
receiving messages from one another

 Sequence number (Seq=2000): contains the random initial sequence number


generated at the receiver side.
 Synflag (Syn=1): request the sender to synchronize its sequence number with the
above-provided sequence number.
 Maximum segment size (MSS=500 B): sender tells its maximum segment size, so
that receiver sends datagram which won’t require any fragmentation. MSS field is
present inside Option field in TCP header.
Since MSSreceiver < MSSsender, both parties agree for minimum MSS i.e., 500 B to
avoid fragmentation of packets at both ends.

Therefore, receiver can send maximum of 14600/500 = 29 packets.


This is the receiver's sending window size.

 Window size (window=10000 B): receiver tells about his buffer capacity in which he
has to store messages from the sender.

Therefore, sender can send a maximum of 10000/500 = 20 packets.


This is the sender's sending window size.

 Acknowledgement Number (Ack no.=522): Since sequence number 521 is received


by the receiver so, it makes a request for the next sequence number with Ack
no.=522 which is the next packet expected by the receiver since Syn flag consumes
1 sequence no.
 ACK flag (ACk=1): tells that the acknowledgement number field contains the next
sequence expected by the receiver.

3. Sender makes the final reply for connection establishment in the following way:

 Sequence number (Seq=522): since sequence number = 521 in 1st step and SYN flag
consumes one sequence number hence, the next sequence number will be 522.
 Acknowledgement Number (Ack no.=2001): since the sender is acknowledging
SYN=1 packet from the receiver with sequence number 2000 so, the next sequence
number expected is 2001.
 ACK flag (ACK=1): tells that the acknowledgement number field contains the next
sequence expected by the sender.

Since the connection establishment phase of TCP makes use of 3 packets, it is also
known as 3-way Handshaking (SYN, SYN + ACK, ACK).

11. Explain the process of TCP connection release.


Ans: A TCP connection is a full-duplex connection. To understand the connection release, we
can consider them to be a pair of simplex connections. We can then imagine that each simplex
connection is being released independently. Releasing a TCP connection is symmetric. Either
port can send a TCP segment with the FIN bit set, meaning it has no more information to send
when the FIN is acknowledged that direction is shut down. Still, data can continue to flow
continually in the other direction.If a FIN response is not taken within two maximum packet
lifetimes, the FIN's sender releases the connection. The receiver will ultimately notice that it
gets no more data and time-out as well. Typically, four TCP segments are required to release
a connection, i.e., one FIN and one ACK in each direction.
Although TCP connections are full duplex, to understand how connections are released it is
best to think of them as a pair of simplex connections. Each simplex connection is released
independently of its sibling. To release a connection, either party can send a TCP segment
with the FIN bit set, which means that it has no more data to transmit. When the FIN is
acknowledged, that direction is shut down for new data. Data may continue to flow
indefinitely in the other direction, however. When both directions have been shut down, the
connection is released. Normally, four TCP segments are needed to release a connection: one
FIN and one ACK for each direction. However, it is possible for the first ACK and the
second FIN to be contained in the same segment, reducing the total count to three. Just as
with telephone calls in which both people say goodbye and hang up the phone
simultaneously, both ends of a TCP connection may send FIN segments at the same time.
These are each acknowledged in the usual way, and the connection is shut down. There is, in
fact, no essential difference between the two hosts releasing sequentially or simultaneously.
To avoid the two-army problem (discussed in Sec. 6.2.3), timers are used. If a response to a
FIN is not forthcoming within two maximum packet lifetimes, the sender of the FIN releases
the connection. The other side will eventually notice that nobody seems to be listening to it
anymore and will time out as well. While this solution is not perfect, given the fact that a
perfect solution is theoretically impossible, it will have to do. In practice, problems rarely
arise.
12.Explain the process of TCP sliding window?
Ans: sliding window allows the sender to transmit multiple segments without receiving an
acknowledgement. A device can send successive segments without for an acknowledgement
that a program segment has been received.

 The available window advertised by the receiver is 6. This means that receiver
can accept 6 bytes as of now.
 The window at sender side covers bytes ranging from 13 to 18 (I.e. 6 bytes in
total).
 Out of this range, 13-15 are the bytes which have been sent but no
acknowledgement is yet received for them.
 Bytes 16-18 are the bytes that sender can send as soon as possible.
 If sender starts receiving acknowledgement for bytes 13 to 15, the left end of the
window starts closing in.
 The right end starts opening up as more and more window size is advertised by
the receiver.
 This window slides towards right depending upon how fast receiver consumes
data and sends acknowledgement and hence known as sliding window.
13. Explain the architecture of Email system?
Ans: The architecture of the email system is shown in the figure:-

Email architecture consists of two components:

 User Agent (UA)


 Message Transfer Agent (MTA)
User Agent:
A user agent is a Package “or in simple words a program” of a software that composes, Reads,
Responds to, and forward messages. It also handles user computers with local mailboxes.

A user agent is nothing but client thus the complete handling of mailbox is done by user agent.

Sending Mail:
In order to send a mail, the user creates mail through the UA which looks very similar to
Postal Mail.

Receiving Mail:
The User agent, or a timer, is triggered by the User. Where a user has mail, the UA will notify
the user with a notice if the user is ready to read the mail, a list will be shown in which each
line includes a description of a particular message’s mailbox information.

Addresses:
A mail handling system must use a system address with unique addresses to deliver mails. Each
user has a unique email address which is selected the time a person sign up for an email ID.
Mailing List or Group List:
Electronic mail allows for the one name to represent several different email addresses; this is
called a mailing list. The system checks the name of the recipient against the alias database
whenever a message is to be sent; if there is a mailing list for the defined alias, separate
messages, one for each entry in the list, must be prepared and given to the Mail Transfer

Agent “MTA”:
it means sending and forwarding email , in another word message transfer is agents, which
move the messages from the source to the destination with the help of SMPT. They run in the
background of mail server machine and are intended to be always available

14.Explain the format of Internet message?


Ans: Messages consist of a primitive envelope, some header fields and a blank line, and the
message body. Each header field logically includes a single line of ASCII text which contains
the field name, a colon and a field. RFC 822 is an old standard. Usually, the user agent builds
a message and passes it to be the message transfer agent with the user’s header fields to
construct an envelope.
The following table shows the principal header fields related to message transport.

The To − field

The field gives the DNS address of the primary recipient. It is allowed to have multiple
recipients.

The Cc − field

This field gives the addresses of any secondary recipients.

The Bcc

The long form of Bcc is Blind Carbon Copy. This field is such as the Cc field, except that this
is removed from all the copies shared with the primary and secondary recipients. This feature
allows people to send copies to third parties without primary and secondary recipients
knowing this.
From − and Sender fields

These fields tell about who wrote the message and who sent the message, respectively,
because the person who creates the message and the person who sends it can be different.

The from the field is required, but the sender field can be omitted if it is the same as the one
from the field. These fields are required in case the message is undeliverable and is to be
returned to the sender.

Received field

A-line containing the Received field is added by each message transfer agent along the way.
This line carries the agent’s identity, date and time at which they received the message. It also
contains some other information that can be used to find bugs in the routing system.

The Return-Path− field

The final message transfer agent adds this field, and it is predetermined to tell how to receive
back to the sender. It can gather this information from all the received headers.

Other header fields

In addition to the field to table below, RFC 822 messages may contain various header fields
used by user agents or human recipients. Many of them are shown in the table below.

Header Meaning

Date: The date and time of the message.

Reply− To The E-mail address to which the reply is to be sent.

Message-Id: Message identifying number

In− Reply − To: Message-Id of the message to which this is a reply.

References: Other relevant messages identifying numbers.

Keywords: Keywords chosen by users.

Subject: Summary of the message for the one-line display.

15.Write a note on MIME?


Ans: MIME represents Multi-Purpose Internet Mail Extensions. It is a development to the
Internet email protocol that enables its users to exchange several kinds of data files over the
Internet, including images, audio, and video.
The MIME is required if the text in character sets other than the American Standard Code for
Information Interchange (ASCII). Virtually, all human-written Internet email and a fairly large
proportion of automated email is transmitted via Simple Mail Transfer Protocol (SMTP) in
MIME format.
MIME was designed mainly for SMTP, but the content types defined by MIME standards are
important also in communication protocols outside of email, such as Hypertext Transfer
Protocol (HTTP).

MIME Header

There are five header fields represented in MIME which are as follows −
 MIME-version − It denotes the MIME version being used. The current version
is 1.1. It is defined as MIME-version: 1.1.
 Content-type − It defines the type and subtype of the data in the body of the
message. The content type and content subtype are divided by a slash. This field
defines how the object in the body is to be executed. The default value is
plaintext in US ASCII.
The content-type field is represented as follows −
Context-type: <type/subtype; parameters>
 Content-transfer encoding − It defines how the object inside the body has been
encoded to US ASCII to create it acceptable for mail transfer. Thus, it
determines the method used to encode the message into 0s and 1s for transport.
The content transfer encoding field is represented as follows −
Content-transfer-encoding : <type>
 Content-Description − This field tells what the message is. It is the form of
ASCII recipient will know whether it is worth decoding and reading the
message.
 Content-ID − This field identifies the contents. Its format is the same as the
format of the standard Message-Id header.

16.Write a note on SMTP?


o Ans: SMTP stands for Simple Mail Transfer Protocol.
o SMTP is a set of communication guidelines that allow software to transmit an electronic
mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on e-mail
addresses.
o It provides a mail exchange between users on the same or different computers, and it
also supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers. The
servers have a way of identifying themselves and announcing what kind of
communication they are trying to perform. They also have a way of handling the errors
such as incorrect email address. For example, if the recipient address is wrong, then
receiving server reply with an error message of some kind.

Components of SMTP

First, we will break the SMTP client and SMTP server into two components such as user
agent (UA) and mail transfer agent (MTA). The user agent (UA) prepares the message,
creates the envelope and then puts the message in the envelope. The mail transfer agent
(MTA) transfers this mail across the internet.

o SMTP allows a more complex system by adding a relaying system. Instead of just
having one MTA at sending side and one at receiving side, more MTAs can be added,
acting either as a client or server to relay the email.
o The relaying system without TCP/IP protocol can also be used to send the emails to
users, and this is achieved by the use of the mail gateway. The mail gateway is a relay
MTA that can be used to receive an email.
17.Write a note on IMAP?

Ans:IMAP stands for Internet Message Access Protocol. It is an application layer protocol
which is used to receive the emails from the mail server. It is the most commonly used protocols
like POP3 for retrieving the emails.

It also follows the client/server model. On one side, we have an IMAP client, which is a process
running on a computer. On the other side, we have an IMAP server, which is also a process
running on another computer. Both computers are connected through a network.

The IMAP protocol resides on the TCP/IP transport layer which means that it implicitly uses
the reliability of the protocol. Once the TCP connection is established between the IMAP
client and IMAP server, the IMAP server listens to the port 143 by default, but this port
number can also be changed.
Features of IMAP :
 It is capable of managing multiple mailboxes and organizing them into various
categories.
 Provides adding of message flags to keep track of which messages are being seen.
 It is capable of deciding whether to retrieve email from a mail server before
downloading.
 It makes it easy to download media when multiple files are attached.

18.Write a note on World Wide Web.


Ans: World Wide Web, which is also known as a Web, is a collection of websites or web
pages stored in web servers and connected to local computers through the internet. These
websites contain text pages, digital images, audios, videos, etc. Users can access the content
of these sites from any part of the world over the internet using their devices such as
computers, laptops, cell phones, etc. The WWW, along with internet, enables the retrieval
and display of text and media to your device.
The building blocks of the Web are web pages which are formatted in HTML and connected
by links called “hypertext” or hyperlinks and accessed by HTTP. These links are electronic
connections that link related pieces of information so that users can access the desired
information quickly. Hypertext offers the advantage to select a word or phrase from text and
thus to access other pages that provide additional information related to that word or phrase.
A web page is given an online address called a Uniform Resource Locator (URL). A
particular collection of web pages that belong to a specific URL is called a website, e.g.,
www.facebook.com, www.google.com, etc. So, the World Wide Web is like a huge
electronic book whose pages are stored on multiple servers across the world.
Small websites store all of their WebPages on a single server, but big websites or
organizations place their WebPages on different servers in different countries so that when
users of a country search their site they could get the information quickly from the nearest
server.So, the web provides a communication platform for users to retrieve and exchange
information over the internet. Unlike a book, where we move from one page to another in a
sequence, on World Wide Web we follow a web of hypertext links to visit a web page and
from that web page to move to other web pages. You need a browser, which is installed on
your computer, to access the Web.

19.Write a note on Static webpages.


Ans: Web pages are called Static websites as they remain the same whenever it is visited.
Examples of static websites are website owned by small business organizations, school
websites etc.
Static Web pages are very simple. It is written in languages such as HTML, JavaScript, CSS,
etc. For static web pages when a server receives a request for a web page, then the server
sends the response to the client without doing any additional process. And these web pages
are seen through a web browser. In static web pages, Pages will remain the same until
someone changes it manually.
•The content and layout of a web page is fixed.
• Static web pages never use databases.
• Static web pages directly run on the browser and do not require any server side application
program.
•Static web pages are easy to develop.

20.Write a note on HTTP.


Ans: HTTP stands for HyperText Transfer Protocol.
•It is a protocol used to access the data on the World Wide Web (www).
•The HTTP protocol can be used to transfer the data in the form of plain text, hypertext,
audio, video, and so on.
•This protocol is known as HyperText Transfer Protocol because of its efficiency that allows
us to use in a hypertext environment where there are rapid jumps from one document to
another document.
•The common use of HTTP is between a web browser (client) and a web server (server).
•HTTP facilitates access of hypertext from the World Wide Web by defining how
information are formatted and transmitted, and how the Web servers and browsers should
respond to various commands.
•HTTP is similar to the FTP as it also transfers the files from one host to another host. But,
HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection to
transfer the files.
•HTTP is used to carry the data in the form of MIME-like format.
•HTTP is similar to SMTP as the data is transferred between client and server. The HTTP
differs from the SMTP in the way the messages are sent from the client to the server and from
server to the client. SMTP messages are stored and forwarded while HTTP messages are
delivered immediately.

21.List and explain the built-in HTTP request methods.


Ans:HTTP (Hypertext Transfer Protocol) specifies a collection of request methods to specify
what action is to be performed on a particular resource. The most commonly used HTTP
request methods are GET, POST, PUT, PATCH, and DELETE. These are equivalent to the
CRUD operations (create, read, update, and delete).
•GET: GET request is used to read/retrieve data from a web server. GET returns an HTTP
status code of 200 (OK) if the data is successfully retrieved from the server.
•POST: POST request is used to send data (file, form data, etc.) to the server. On successful
creation, it returns an HTTP status code of 201.
•PUT: A PUT request is used to modify the data on the server. It replaces the entire content at
a particular location with data that is passed in the body payload. If there are no resources that
match the request, it will generate one.
•PATCH: PATCH is similar to PUT request, but the only difference is, it modifies a part of
the data. It will only replace the content that you want to update.
•DELETE: A DELETE request is used to delete the data on the server at a specified location.

22.List and explain HTTP message headers.


Ans: •The User-Agent header allows the client to inform the server about its browser
implementation (e.g., Mozilla/5.0 and Chrome/5.0.375.125). This information is useful to let
servers tailor their responses to the browser, since different browsers can have widely varying
capabilities and behaviors.
•The four Accept headers tell the server what the client is willing to accept in the event that it
has a limited repertoire of what is acceptable.
• The first header specifies the MIME types that are welcome (e.g., text/html).
•The second gives the character set (e.g., ISO-8859-5 or Unicode-1-1).
• The third deals with compression methods (e.g., gzip).
• The fourth indicates a natural language (e.g., Spanish).
•If the server has a choice of pages, it can use this information to supply the one
the client is looking for. If it is unable to satisfy the request, an error code is returned and the
request fails.
•The If-Modified-Since and If-None-Match headers are used with caching. They let the
client ask for a page to be sent only if the cached copy is no longer valid.
•The Host header names the server. It is taken from the URL. This header is mandatory.
•The Authorization header is needed for pages that are protected. In this case, the client may
have to prove it has a right to see the page requested.
•The client uses the misspelled Referer header to give the URL that referred to the URL that
is now requested. Most often this is the URL of the previous page.

23.Write a note on HTTP caching.


Ans: People often return to Web pages that they have viewed before, and related Web pages
often have the same embedded resources. Some examples are the images that are used for
navigation across the site, as well as common style sheets and scripts. It would be very
wasteful to fetch all of these resources for these pages each time they are displayed because
the browser already has a copy.
•Squirreling away pages that are fetched for subsequent use is called caching.
•The advantage is that when a cached page can be reused, it is not necessary to repeat the
transfer.
•HTTP has built-in support to help clients identify when they can safely reuse pages. This
support improves performance by reducing both network traffic and latency.
•The difficult issue with HTTP caching is how to determine that a previously cached copy of
a page is the same as the page would be if it was fetched again.
•This determination cannot be made solely from the URL. For example, the URL may give a
page that displays the latest news item.
• The contents of this page will be updated frequently even though the URL stays the same
.
HTTP uses two strategies to tackle this problem: They are shown in Fig. 7-40
As forms of processing between the request (step 1) and the response (step 5).
•The First strategy is page validation (step 2).
•The cache is consulted, and if it has a copy of a page for the requested URL that is known to
be fresh (i.e., still valid), there is no need to fetch it anew from the server. Instead, the cached
page can be returned directly.
•The Expires header returned when the cached page was originallly fetched and the current
date and time can be used to make this determination.

You might also like