ccn - unit 4 (1)
ccn - unit 4 (1)
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.
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.
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.
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.
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
Listen In response to
making a new
connection, and it
shows a willingness
to accept new
connections.
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.
Connection Establishment –
2. TCP is a full-duplex protocol so both sender and receiver require a window for
receiving messages from one another
Window size (window=10000 B): receiver tells about his buffer capacity in which he
has to store messages from the sender.
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).
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:-
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
The To − field
The field gives the DNS address of the primary recipient. It is allowed to have multiple
recipients.
The Cc − field
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 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.
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
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.
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.