ACN Answer Key Work Book-1
ACN Answer Key Work Book-1
ACN Answer Key Work Book-1
SEMESTER V
Roll No:………………………
UNIT NO I: Network Layer and Protocols
Q C Questions
u O
e
.
N
o
.
1 C State the concept of fragmentation in IPv4.
O
I
5
0
2
.
1
M 2 marks
a
r
k
i
n
g
S
c
h
e
m
e
Fragmentation: When the maximum size of datagram is greater than maximum size of data that can be held a
frame then the network layer divides the datagram received from x-port layer into fragments.
A
Fragmentation is the division of a IP datagram into smaller units. After fragmentation, each fragment will
n have its own header with few fields changed and few fields remaining same.
s
In fragmentation, a datagram is divided into smaller units. Most of the fields of the original header are copied
w into the fragment header. The Three fields Flags, Fragmentation offset and Total length are altered.
e
r
M 2M
a
r
k
i
n
g
S
c
h
e
m
e
No.
1 IPv4 addresses are 32 bits IPv6 addresses are 128 bits i.e.
identification available
M 4 marks
a
r
k
i
n
g
S
c
h
e
m
e
● Mobile IP communication protocol refers to the forwarding of Internet traffic with a fixed IP address even
● outside the home network.
● It allows users having wireless or mobile devices to use the Internet remotely.
● Mobile IP is mostly used in WAN networks, where users need to carry their mobile devices across different
● LANs with different IP addresses. Mobile IP is not a wireless protocol.
● However, it could be employed for the IP infrastructure of cellular networks.
M 2marks
a
r
k
i
n
g
S
c
h
e
m
e
VPN stands for the virtual private network. A virtual private network (VPN) is a technology that creates a safe and encrypted
connection over a less secure network, such as the internet. A Virtual Private Network is a way to extend a private
network using a public network such as the internet. The name only suggests that it is a Virtual “private network”
i.e. user can be part of a local network sitting at a remote location. It makes use of tunneling protocols to establish a
secure connection.
A
n
s
w
e
r
5 C Describe the subnetwork address if the destination address
O is 200.45.34.56 and the subnet mask is 255.255.240.0
I
5
0
2
.
1
M 4 mark
a
r
k
i
n
g
S
c
h
e
m
e
To find the subnet address we have to AND the IP address and the subnet mask as shown below:
200.45.34.56
255.255.240.0 AND
With subnet mask as 255.255.240.0, network bits are 20 and host bits are 12.
Keeping first 20 bits as it is, and making host bits as 0, the subnet address is obtained as given below.
Subnet address 11001000 . 00101101 . 00100000.00000000
Thus subnet address is 200.45.32.0
M 4 Marks
a
r
k
i
n
g
S
c
h
e
m
e
The Internet Control Message Protocol (ICMP) supports the unreliable and connectionless Internet Protocol (IP).
● ICMP messages are encapsulated in IP datagrams. There are two categories of ICMP messages: error-reporting
and query messages. The error-reporting messages report problems that a router or a host (destination) may
encounter when it processes an IP packet. The query messages, which occur in pairs, help a host or
a network manager get specific information from a router or another host.
A ●
The checksum for ICMP is calculated using both the header and the data fields of the ICMP message.
n There are several tools that can be used in the Internet for debugging. We can find if a host or router is alive
s and running. Two of these tools are ping and traceroute
w
e
r
An ICMP message has an 8-byte header and a variable-size data section. Although the general format
of the header is different for each message type, the first 4 bytes are common to all. As Figure shows,
● The first field, ICMP type, defines the type of the message.
● The code field specifies the reason for the particular message type.
● The last common field is the checksum field for checking errors
● The rest of the header is specific for each message type.
● The data section in error messages carries information for finding the original packet that had
the error. In query messages, the data section carries extra information based on the type of the query.
Total Marks
Marks Obtained
Sign
UNIT NO II : Next Generation IP
Que. CO Questions
No.
--Advantages of IPv6:
● Larger address space.
● Better header format.
● New options for additional functionalities.
● Allowance for extension.
● Support for more security.
● More efficient routing
● More efficient packet processing
Answer ● Directed data flows
● Simplified Network configuration
● Support for new services
● Support for Security
● Auto configuration
Marking Scheme 2M
Answer
4 COI502 Explain the transition method of IPV4 to IPV6
.2
Marking Scheme 4 marks
2. Tunnelling
Tunnelling is a strategy used when two computers using IPv6 want to
communicate with each other and the packet must pass through a region
that uses IPv4.
⮚ To pass through this region, the packet must have an IPv4 address.
So the IPv6 packet is encapsulated in an IPv4 packet when it enters the
region.
⮚ To make it clear that the IPv4 packet is carrying an IPv6 packet as
data the protocol value is set to 41.
-
5 COI502 Explain IPV6 extension header?
.2
Marking Scheme 4M
In IPv6, the Fixed Header contains only that much information which is necessary, avoiding
those information which is either not required or is rarely used. All such information is put
between the Fixed Header and the Upper layer header in the form of Extension Headers. Each
Extension Header is identified by a distinct value.
When Extension Headers are used, IPv6 Fixed Header’s Next Header field points to the first
Extension Header. If there is one more Extension Header, then the first Extension Header’s
‘Next-Header’ field points to the second one, and so on. The last Extension Header’s ‘Next-
Header’ field points to the Upper Layer Header. Thus, all the headers points to the next one in
a linked list manner.
Answer
If the Next Header field contains the value 59, it indicates that there are no headers after this
header, not even Upper Layer Header.
The following Extension Headers must be supported as per RFC 2460:
)Dotted decimal
2)Colon hexa decimal
3)Mixed representation
4)CIDR notation
We prefer hexa-decimal notation for IPv6 address.
An IPv6 address is made of 128 bits divided into eight 16-bits blocks. Each block is
then converted into 4-digit Hexadecimal numbers separated by colon symbols.
For example, given below is a 128 bit IPv6 address represented in binary format and
divided into eight 16-bits blocks:
0010000000000001 0000000000000000 0011001000111000 1101111111100001
0000000001100011
Answer 0000000000000000 0000000000000000 1111111011111011
Each block is then converted into Hexadecimal and separated by ‘:’ symbol:
2001:0000:3238:DFE1:0063:0000:0000:FEFB
Even after converting into Hexadecimal format, IPv6 address remains long.
Marking Scheme 4M
A global unicast address provides a unique identity to the interface in the global IPv6
Internet. The following image shows how the format of global unicast
The first three bits of global unicast addresses are always set to 001. The next 45 bits are
allocated by the Internet Register authorities.
Answer The next 16 bits are known as subnet bits. Subnet bits allow network administrators to create
a hierarchy within the organization or the site. Network administrators may define up to 65534
subnets by uniquely assigning values in subnet bits for each subnet.
The next 64 bits are known as interface ID. Interface ID provides a unique identity to the
interface. Interfaces use the modified EUI-64 algorithm to calculate the interface ID. EUI-64
algorithm uses the MAC address of the interface to calculate the interface ID of the interface.
It makes two changes in the original MAC address. First, it changes the universal bit of the
MAC address and then adds extra 16 bits to the MAC address.
MAC addresses are 48 bits in length. The first 24 bits identify the company while the
last 24 bits identify the interface. The EUI-64 algorithm inserts the hexadecimal
value FFFE (16 bits in binary) between the company identifier and the interface identifier.
The seventh bit in the company identifier field is known as the universal (u) bit. The "u" bit
defines the type of MAC address. The EUI-64 algorithm sets this bit to 1. The
value 1 indicates that the address is locally defined
Stateless autoconfiguration for IPv6 is like a “mini-DHCP” server for IPv6. Routers running
IPv6 can give the prefix of the network and a gateway address to clients looking for an IPv6
address. IPv6 uses the NDP (Neighbor Discovery Protocol) and one of the things this
protocol offers is RS (Route Solicitation and (RA) Router Advertisement messages that help
an IPv6 device to automatically configure an IPv6 address. Let’s take a look at a
configuration exam
When we start an IPv6 interface, the interface checks whether a valid IP configuration exists.
Answer If a valid IP configuration does not exist, the interface automatically initiates the address
autoconfiguration process.
In the first step, the autoconfiguration process creates a link-local address. A link-local
address allows the interface to communicate with other interfaces on the same link. To create
a link-local address, the interface uses the following procedure.
To create the network ID, the first 10 bits are set to 1111 1110 10 and the remaining 54 bits
are set to 0. In hexadecimal notation, the binary number 1111111010 is written as the FE80.
In IPv6, a continuous set of 0 can be abbreviated as double colons (::). Because of these two
rules, the network ID of the link-local address always remains as FE80::/64.
To create the interface ID, the interface uses the EUI-64 algorithm. This algorithm uses the
hardware address (MAC) of the interface. The hardware address consists of 48 bits. The first
24 bits identify the company while the last 24 bits identify the interface. The EUI-64 algorithm
inserts the hexadecimal value FFFE (16 bits in binary) between the company identifier and
th
the interface identifier. It also sets the 7 bit of the MAC address to 1 which indicates that the
address is locally defined.
Let's take an example. Suppose the MAC address of an interface is AC:62:E8:49:5F:62. Then
the link-local address created by the autoconfiguration process will
be FE80::AE62:E8FF:FE49:5F62. In this address, FE80:: is the network ID (address)
and AE62:E8FF:FE49:5F62 is the interface ID (address).
The following image shows how the interface ID is calculated in this address.
-
Total Marks
Marks Obtained
Sign
UNIT NO 3 : Unicast and Multicast Routing Protocols
1 COI502.3
Explain ospf messages.
Marking Scheme 4 marks
Hello Packet :
OSPF v2 Hello Packet, Field length in bytes hide
24 4 2 1 1 4 4 4 4
OSPF's Hello messages are used as a form of greeting, to allow a router to discover other adjacent routers
on its local links and networks. The messages establish relationships between neighbouring devices
Answer (called adjacencies) and communicate key parameters about how OSPF is to be used in the autonomous
system or area. During normal operation, routers send hello messages to their neighbours at regular
intervals (the hello interval); if a router stops receiving hello messages from a neighbour, after a set period
(the dead interval) the router will assume the neighbour has gone down.
Database description DBD:
OSPF v2 and v3 Database description, Field length in bytes hide
16 or 24 2 1 1 1 4 Variable
Header
Interface MTU Hello Interval Options Flags DD sequence number LSA Headers
Database description messages contain descriptions of the topology of the autonomous system or area.
They convey the contents of the link-state database (LSDB) for the area from one router to another.
Communicating a large LSDB may require several messages to be sent by having the sending device
designated as a master device and sending messages in sequence, with the slave (recipient of the LSDB
information) responding with acknowledgments.
Link state packets
2 COI502.2
Describe the RIP message format.
Marking Scheme 4 marks
he message format is used to share information among different routers. The RIP
contains the following fields in a message:
Answer
● Command: It is an 8-bit field that is used for request or reply. The value of
the request is 1, and the value of the reply is 2.
● Version: Here, version means that which version of the protocol we are
using. Suppose we are using the protocol of version1, then we put the 1 in this
field.
● Reserved: This is a reserved field, so it is filled with zeroes.
● Family: It is a 16-bit field. As we are using the TCP/IP family, so we put 2
value in this field.
● Network Address: It is defined as 14 bytes field. If we use the IPv4 version,
then we use 4 bytes, and the other 10 bytes are all zeroes.
● Distance: The distance field specifies the hop count, i.e., the number of
hops used to reach the destination.
3 COI502.3
Explain the 3 intra domain routing protocols.
Marking Scheme 6 marks
iii. RIPv2:
_ Runs over UDP port 520
_ Limits networks to 15 hops (16 = 1)
_ Depends on count to infinity for loops
_ Supports split horizon, poison reverse
_ RFC 1812 specifies what options routers should or must have.
Describe modern computer use dynamic routing. Explain with example how distance vector
routing is used to route the packet & why count-to-infinity problem arises and how does it get
solved ?
Dynamic routing uses a dynamic routing protocol to automatically select the best route to
put into the routing table. So instead of manually entering static routes in the routing table,
dynamic routing automatically receives routing updates, and dynamically decides which
routes are best to go into the routing table. This intelligent and hands-off approach that makes
dynamic routing so useful in modern era.
Dynamic routing protocols vary in many ways and this is reflected in the various administrative
distances assigned to routes learned from dynamic routing. These variations take into account
differences in reliability, speed of convergence, and other similar factors.
Distance vector routing:
1. Distance Vector Routing is one of the dynamic routing algorithm.
2. It is suitable for packet switched network.
3. In distance vector routing, each router maintains a routing table.
4. It contains one entry for each router in the subnet.
5. This entry has two parts:
. The first part shows the preferred outgoing line to be used to reach the destination.
a. Second part gives an estimate of the time or distance to the destination.
In distance vector routing, a node tells its neighbor about its distance to every other node in
the network.
Count to infinity problem:
1. One of the important issue in Distance Vector Routing is Count to Infinity Problem.
2. Count to infinity is just another name for a routing loop.
In distance vector routing, routing loops usually occur when an
Fig: Example
C and A, so it corrects its table and changes infinity to 3 (1 for B to C, and 2 for C to A, as C
said).
● Once again, routers exchange their tables.
● When C receives B's routing table, it sees that B has changed the weight of its link to A
from 1 to 3, so C updates its table and changes the weight of the link to A to 4 (1 for C to B,
and 3 for B to A, as B said).
● This process loops until all nodes find out that the weight of link to A is infinity.
● This situation is shown in the table below
● In this way, Distance Vector Algorithms have a slow convergence rate.
● One way to solve this problem is for routers to send information only to the neighbors
that are not exclusive links to the destination.
4 C
O Describe the path vector routing algorithm.
I
5
0
2
.
3
Marking 4 marks
Scheme
● Node Al is the speaker node for ASl, Bl for AS2, Cl for AS3, and Dl for AS4.
● Node Al creates an initial table that shows Al to A5 are located in ASI and can be
reached through it. Node Bl advertises that Bl to B4 are located in AS2 and can be reached
through Bl.
Sharing
● Just as in distance vector routing, in path vector routing, a speaker in an autonomous
system shares its table with immediate neighbors.
● In Figure 1, node Al shares its table with nodes Bl and Cl. Node Cl shares its table with
nodes Dl, Bl, and Al.
● Node Bl shares its table with Cl and Al. Node Dl shares its table with Cl.
Updating
● When a speaker node receives a two-column table from a neighbor, it updates its own
table by adding the nodes that are not in its routing table and adding its own autonomous system
and the autonomous system that sent the table.
● After a while each speaker has a table and knows how to reach each node in other ASs.
● Figure 2 shows the tables for each speaker node after the system is stabilized.
Marking 4 marks
Scheme
RIP OSPF
RIP stands for Routing Information OSPF stands for Open Shortest Path First.
Protocol.
It's a Distance Vector protocol that It is a link-state protocol that determines the
determines the transmission path based on shortest path by analyzing many factors such as
the distance or hops count. speed, cost, and path congestion.
RIP permits a maximum of 15 hops. No such limit on hops
The metric is calculated in terms of Hop The metric is calculated in terms of bandwidth.
Count.
Answer
The User Datagram Protocol (UDP) is OSPF is a protocol that works with IP (Internet
used by RIP. Protocol).
6 C
O Describe modern computer use dynamic routing. Explain with example how distance vector routing
I is used to route the packet & why count-to-infinity problem arises and how does it get solved?
5
0
2
.
3
Marking 4 marks
Scheme
.
Dynamic routing uses a dynamic routing protocol to automatically select the best route to
put into the routing table. So instead of manually entering static routes in the routing table,
dynamic routing automatically receives routing updates, and dynamically decides which
routes are best to go into the routing table. This intelligent and hands-off approach that makes
dynamic routing so useful in modern era.
Dynamic routing protocols vary in many ways and this is reflected in the various administrative
distances assigned to routes learned from dynamic routing. These variations take into account
differences in reliability, speed of convergence, and other similar factors.
Distance vector routing:
1. Distance Vector Routing is one of the dynamic routing algorithm.
2. It is suitable for packet switched network.
3. In distance vector routing, each router maintains a routing table.
4. It contains one entry for each router in the subnet.
Answer 5. This entry has two parts:
. The first part shows the preferred outgoing line to be used to reach the destination.
Second part gives an estimate of the time or distance to the
b. destination.
In distance vector routing, a node tells its neighbor about its distance to every other node in
the network.
Count to infinity problem:
1. One of the important issue in Distance Vector Routing is Count to Infinity Problem.
2. Count to infinity is just another name for a routing loop.
In distance vector routing, routing loops usually occur when an
interface goes down.
4. It can also occur when two routers send updates to each other at the same time.
OR
For a routing protocol to work properly, if a link is broken (cost becomes infinity), every other
router should be aware of it immediately, but in distance vector routing, this takes some time.
The problem is referred to as count to infinity. It takes several updates before the cost for a
broken link is recorded as infinity by all routers.
Fig: Example
C and A, so it corrects its table and changes infinity to 3 (1 for B to C, and 2 for C to A, as C
said).
● Once again, routers exchange their tables.
● When C receives B's routing table, it sees that B has changed the weight of its link to A
from 1 to 3, so C updates its table and changes the weight of the link to A to 4 (1 for C to B,
and 3 for B to A, as B said).
● This process loops until all nodes find out that the weight of link to A is infinity.
● This situation is shown in the table below
● In this way, Distance Vector Algorithms have a slow convergence rate.
● One way to solve this problem is for routers to send information only to the neighbors
that are not exclusive links to the destination.
7 C
O Describe Link State Routing with suitable example
I
5
0
2
.
3
Markin 4 marks
g
Scheme
Link state routing is a method in which each router shares its neighbourhood’s knowledge with every other
router in the internetwork. In this algorithm, each router in the network understands the network topology
then makes a routing table depend on this topology.
Each router will share data about its connection to its neighbour, who will, consecutively, reproduce the
data to its neighbours, etc. This appears just before all routers have constructed a topology of the network.
In LSP, each node transmits its IP address and the MAC to its neighbor with its signature. Neighbors
determine the signature and maintain a record of the combining IP address and the MAC. The Neighbor
Lookup Protocol (NLP) of LSP derives and maintains the MAC and IP address of every network frame
accepted by a node. The extracted data can support the mapping of MACs and IP addresses.
The link-state flooding algorithm prevents the general issues of broadcast in the existence of loops by
having every node maintain a database of all LSP messages. The creator of each LSP contains its identity,
data about the connection that has changed status, and also a sequence number.
Answer
Example
Seq
TTL
C 11
B 7
A 1
Seq
TTL
B 2
D 1
B
Seq
TTL
A 2
D 7
C 3
Seq
TTL
D 11
B 3
Step 2 − Every router flood the link state packets to every offer router
At A −
Link state packet B, C, D
A 2
C 3
D 7
From B
B 3
D 11
From C
A 1
B 7
C 11
From D:
8 COI502.3
Distinguish between Unicast, Multicast and broadcast.
Marking Scheme 4 marks
1. Unicast –
This type of information transfer is useful when there is a participation of a single sender and a single recipient. So, in short,
you can term it as a one-to-one transmission. For example, if a device having IP address 10.1.2.0 in a network wants to send
the traffic stream (data packets) to the device with IP address 20.12.4.2 in the other network, then unicast comes into the
picture. This is the most common form of data transfer over the networks.
2. Broadcast –
Broadcasting transfer (one-to-all) techniques can be classified into two types :
● Limited Broadcasting –
Suppose you have to send a stream of packets to all the devices over the network that you reside, this broadcasting comes in
handy. For this to achieve, it will append 255.255.255.255 (all the 32 bits of IP address set to 1) called as Limited Broadcast
Address in the destination address of the datagram (packet) header which is reserved for information transfer to all the
recipients from a single client (sender) over the network.
●
Multicast:
In multicasting, one/more senders and one/more recipients participate in data transfer traffic. In this method traffic recline
between the boundaries of unicast (one-to-one) and broadcast (one-to-all). Multicast lets servers direct single copies of data
streams that are then simulated and routed to hosts that request it. IP multicast requires the support of some other protocols
like IGMP (Internet Group Management Protocol), Multicast routing for its working. Also in Classful IP
addressing Class D is reserved for multicast groups.
Total Marks
Marks Obtained
Sign
UNIT NO 4 : Transport Layer Protocols
1 COI502.4
The dump of a UDP header in hexadecimal format is as follows :
BC 82000 D 002 B 001 D
Obtain the following from it :
(i) Source port number
(ii) Destination port number
(iii) Total length
(iv) Length of the data
Marking Scheme 4 marks
Answer
2 COI502.4
Explain how TCP connections are established using the 3 way handshake?
What happens when 2 hosts simultaneously try to establish a connection ?
Marking Scheme 4 marks
communication is between two peers that know their local port numbers.
● Both TCPs go through SYN-SENT and SYN-RCVD states before going to the
ESTABLISHED state.
● Both processes act as client and server.
● The two SYN+ACK segments acknowledge the SYN segments and open the
connection.
OR
Simultaneous Close:
● It's permitted in TCP for both sides to do "active close", which is called
"Simultaneous Close". During "Simultaneous Close", 4 packets are exchanged, the
same as in normal situations.
● In this situation, both ends issue an active close.
● Both TCPs go to the FIN-WAIT-1 state and send FIN segments that are in
transit simultaneously.
● After receiving the FIN segment, each end goes to the CLOSING state and
sends an ACK segment.
Answer ● The CLOSING state takes the place of FIN-WAIT-2 or CLOSE- WAIT in a
common scenario.
3 COI502.4
Explain TCP congestion control?
Marking Scheme 6 marks
TCP’s general policy for handling congestion consists of following three phases-
Answer
1. Slow Start
2. Congestion Avoidance
3. Congestion Detection
1. Slow Start Phase-
Threshold
This phase continues until the congestion window size becomes equal to the
receiver window size.
3. Congestion Detection Phase-
When sender detects the loss of segments, it reacts in different ways depending on
how the loss is detected-
Reaction-
Reaction-
Answer
To keep track of all the different events happening during connection establishment,
connection termination, and data transfer, TCP is specified as the Finite State
Machine –FSM
TCP State Machine:
● TCP uses a three way handshake to close connection
● Singled by the FIN bit in the packet header
The figure shows the two FSMs used by the TCP client and server combined in one
diagram.
● Ovals/rectangle represents states.
● Transition from one state to another is shown using directed lines.
● Each line has two strings separated by a slash.
● The first string is the input, what TCP receives.
● The second is the output, what TCP sends.
● The dotted black lines in the figure represent the transition that a server
normally goes through;
● The solid black lines show the transitions that a client normally goes through.
● Sometimes in some situations, a server transitions through a solid line or a
client transitions through a dotted line.
5 COI502
Difference between TCP and SCTP ?
.4
6 COI502.3
Explain TCP Segment header with neat diagram?
Marking Scheme 4 marks
The header of a TCP segment can range from 20-60 bytes. 40 bytes are for options. If there are no options, a header
is 20 bytes else it can be of upmost 60 bytes.
Header fields:
● Sequence Number –
A 32-bit field that holds the sequence number, i.e, the byte number of the first byte that is sent in that particular
segment. It is used to reassemble the message at the receiving end of the segments that are received out of order.
● Acknowledgement Number –
A 32-bit field that holds the acknowledgement number, i.e, the byte number that the receiver expects to receive
next. It is an acknowledgement for the previous bytes being received successfully.
● Control flags –
These are 6 1-bit control bits that control connection establishment, connection termination, connection abortion,
flow control, mode of transfer etc. Their function is:
o URG: Urgent pointer is valid
o ACK: Acknowledgement number is valid( used in case of cumulative acknowledgement)
o PSH: Request for push
o RST: Reset the connection
o SYN: Synchronize sequence numbers
o FIN: Terminate the connection
● Window size –
This field tells the window size of the sending TCP in bytes.
● Checksum –
This field holds the checksum for error control. It is mandatory in TCP as opposed to UDP.
● Urgent pointer –
This field (valid only if the URG control flag is set) is used to point to data that is urgently required that needs to
reach the receiving process at the earliest. The value of this field is added to the sequence number to get the byte
number of the last urgent byte.
Answer
7 COI502.4
List two advantages of using UDP over TCP?
Marking Scheme 2 marks
1) UDP is connection less and unreliable transport layer protocol.
i.e. It does not require to maintain a connection.
2) UDP is transaction oriented and suitable for simple query response protocols.
3) UDP is faster since it does not require acknowledgment.
Useful when time sensitivity is more important
8 COI502.4
Explain the services SCTP services
Marking Scheme 4 marks
SCTP services
Like TCP, SCTP offers full-duplex service, in which data can flow in both
directions at the same time. Each SCTP then has a sending and receiving buffer,
and packets are sent in both directions.
5. Connection-Oriented Service:
9 COI502.5
Explain Flow control in SCTP?
Marking Scheme 4 marks
At Sender Site
Answer
At Reciever site
Flow control in SCTP is similar to that in TCP. In SCTP, we need to handle two
units of data, the byte and the chunk. The values of rwnd and cwnd are expressed in
bytes; the values of TSN and acknowledgments are expressed in chunks. Current
SCTP implementations still use a byte-oriented window for flow control.
Receiver Site:
The receiver has one buffer (queue) and three variables. The queue holds the
received data chunks that have not yet been read by the process. The first variable
holds the last TSN received, cumTSN. The second variable holds the available
buffer size; winsize. The third variable holds the last accumulative
acknowledgment, lastACK. The following figure shows the queue and variables at
the receiver site.
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.
2. When the process reads a chunk, it removes it from the queue and adds the size
of the removed chunk to winSize (recycling).
3. 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, as shown in the following figure. 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 is
the procedure used by the sender.
1. A chunk pointed to by curTSN can be sent if the size of the data is less than or
equal to the quantity rwnd - inTransit. After sending the chunk, the value of
curTSN is incremented by 1 and now points to the next chunk to be sent. The value
of inTransit is incremented by the size of the data in the transmitted chunk.
2. When a SACK is received, the chunks with a TSN less than or equal to the
cumulative TSN in the SACK are removed from the queue and discarded. The
sender does not have to worry about them anymore. The value of inTransit is
reduced by the total size of the discarded chunks. The value of rwnd is updated
with the value of the advertised window in the SACK.
Total Marks
Marks Obtained
Sign
UNIT NO 5 : Application Layer Protocols
1 COI502.6
State the transmission modes of FTP?
Marking Scheme 2 marks
1. Stream Mode
This is called a default mode. In this mode, data transforms from FTP to TCP in the
form of stream bytes. Here TCP is responsible for fragmenting data into small
segments. If transforming data are already in the form of stream bytes, then the data
connection is automatically closed. Otherwise, it is closed by the sender.
2. Block Mode
Block mode transforms data from one host to another in the form of blocks. Each
Answer block is preceded by a 3-byte header. The first byte contains all the information
about the block hence know for the description block. Oher two blocks containing
the size of the block in the form of bytes.
3. Compressed Mode
Compress mode is used in the case of big file size. If the file size is big, it cannot
send over the internet connection because of the size limit. In Compressed mode, a
large file is compressed into a small size and then sends over the internet.
2 COI502.6
Explain FTP with Basic model?
Marking Scheme 4 marks
● File Transfer Protocol (FTP) is an application layer protocol that is used to transfer the files
between the local devices (PC, smartphone, etc.) to a server. It transfers both text and binary files over
the Internet.
Control Connection
A Control Connection is established on Port number 21. It is the primary connection and is
used to send commands back and forth between the client and the server. It is used for sending
the control information like user identification, password, and remote directory, etc., once the
control connection is established.
Data Connection
Data Connection is initiated on Port number 20. Using the established Control Connection, the
client and server will create a separate Data Connection to transfer the requested data.
The Data Connection stays open until the transfer is complete, after that the Data Connection
is closed.
Answer
Marking 4 marks
Scheme
Answer
4 COI502.6
Explain SMTP protocol?
Marking Scheme 2 marks
1. End-to-end method
2. Store-and- forward method
In the SMTP model user deals with the user agent (UA), for example, Microsoft
Answer Outlook, Netscape, Mozilla, etc. In order to exchange the mail using TCP, MTA is
used. The user sending the mail doesn’t have to deal with MTA as it is the
responsibility of the system admin to set up a local MTA. The MTA maintains a
small queue of mails so that it can schedule repeat delivery of mails 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.
Both the SMTP-client and SMTP-server should have 2 components:
1. User-agent (UA)
2. Local MTA
SENDING EMAIL:
Mail is sent by a series of request and response messages between the client and the
server. The message which is sent across consists of a header and a body. A null
line is used to terminate the mail header and everything after the null line is
considered as the body of the message, which is a sequence of ASCII characters.
The message body contains the actual information read by the receipt.
RECEIVING EMAIL:
The user agent at the server-side checks the mailboxes at a particular time of
intervals. If any information is received, it informs the user about the mail. When
the user tries to read the mail it displays a list of emails with a short description of
each mail in the mailbox. By selecting any of the mail users can view its contents
on the terminal.
5 COI502.4
Describe HTTP request message format?
Marking Scheme 4 marks
The request message is sent by the client that e of a request line, headers, and
sometimes a body
Request Lines: The first line in a request message is called a request line
Answer
URL: A client that wants to access the document in an internet needs an address
and to facilitate the access of documents, the HTTP uses the concept of Uniform
Resource Locator (URL).
The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
(b) Header
The header exchanges additional information between the client and the server.
For example, the client can request that the document be sent in a special format,
or the server can send extra information about the document.
The header can consist of one or more header lines. Each header line has a
header name, a colon, a space, and a header value . We will show some header
lines in the examples at the end of this chapter.
6 COI502.4
List and explain web document?
Marking Scheme 2 marks
Static document
Dynamic document
Static. A static web document resides in a file that it is associated with a web
server. The author of a static document determines the contents at the time the
document is written. Because the contents do not change, each request for a static
document results in exactly the same response.
Dynamic. A dynamic web document does not exist in a predifined form. When a
request arrives the web server runs an application program that creates the
document. The server returns the output of the program as a response to the
browser that requested the document. Because a fresh document is created for each
Answer
request, the contents of a dynamic document can vary from one request to another
7 COI502.
Explain the Architecture of Email with neat diagram?
6
Answer In the first scenario, the sender and the receiver of the e-mail are users (or
application programs) on the same system, they are directly connected to a shared
system.
The administrator has created one mailbox for each user where the received
messages are stored A mailbox is part of a local hard drive, a special file with
permission restrictions.
Only the owner of the mailbox has access to it. When Alice, a user, needs to send a
message to Bob, another user, Alice runs a user agent (VA) program to prepare the
message and store it in Bob's mailbox.
The message has the sender and recipient mailbox addresses (names of files). Bob
can retrieve and read the contents of his
In the second scenario, the sender and the receiver of the e-mail are users (or
application programs) on two different systems.
message needs to be sent over the Internet Here we need user agents (VAS) and
message transfer agents (MTAs).
In the third scenario, Bob, as in the second scenario, is directly connected to his
system. Alice, however, is separated from her system.
Either Alice is connected to the system via point-to-point WAN, such as a dial-up
modem Fourth Scenario
In the fourth and most common scenario, Bob is also connected to his mail server
by a WAN or s LAN
Here, we need another set of client/server agents, which we call message access
agents (MAAS) Bob uses an MAA client to retrieve his messages. The client sends
a request to the MAA server, which is running all the time, and requests the
8 COI502.6
Explain IMAP and POP3?
Marking Scheme 4 marks
POP3?
POP3 (or Post Office Protocol Version 3) is an application layer protocol used by
email clients to retrieve email messages from mail servers over TCP/IP network.
POP was designed to move the messages from server to local disk but version 3 has
the option of leaving a copy on the server
POP3 is a very simple protocol to implement but that limits its usage. For example,
POP3 supports only one mail server for each mailbox. It has now has been made
obsolete by modern protocols like IMAP.
IMAP?
The Internet Message Access Protocol (IMAP) is an Internet standard protocol for
retrieving email messages from a mail server via a TCP/IP connection by email
clients. RFC 3501 is the standard that defines IMAP.
Because IMAP was created with the purpose of allowing many email clients to
Answer handle an email box simultaneously, clients typically leave messages on the server
until the user explicitly deletes them. The port number 143 is usually used by an
IMAP server. The port number 993 is given to IMAP via SSL/TLS.
IMAP is designed to retrieve messages from multiple mail servers and consolidate
them all in the user’s mailbox. A typical example is a corporate client handling
multiple corporate accounts through a local mailbox located on her system.
All modern email clients and servers like Gmail, Outlook and Yahoo Mail
support IMAP or POP3 protocol. Following are some of the advantages
that IMAP offers over POP3 −
● Faster response time than POP3
● Multiple mail clients connected to a single mailbox simultaneously
● Keep track of message state like read, deleted, starred, replied, etc.
● Search for messages on the server
9 COI502.6 Explain working of www?
The Web is a repository of information in which the documents, called web pages,
are distributed all over the world and related documents are linked together.
The WWW today is a distributed client-server service, in which a client using a
browser can access a service using a server.
The service provided is distributed over many locations called sites. Each site holds
one or more web pages. Each web page can contain some links to other web pages
in the same or other sites.
• Simple web page has no links to other web pages.
• Composite web page has one or more links to other web pages.
Each web page is a file with a name and address.
The web page is stored at the web server. Each time a request arrives, the
corresponding document is sent to the client.
Answer
10 COI502
.6 What is HTTP protocol? Explain type of messages in http?
The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so
This protocol is known as Hyper Text 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.
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.
Answer Messages:
Request and Response
The formats of the request and response messages are similar, both are shown in
Figure. A request message consists of a request line, a header, and sometimes a
body.