Acn Imp Q&a
Acn Imp Q&a
Acn Imp Q&a
b. 222.34.7.8.20
- There is an extra octet. An IPv4 address should consist of four octets.
c. 75.45.301.14
- The third octet "301" is not a valid octet in the range of 0 to 255. It should be "75.45.255.14"
or corrected based on the intended value.
d. 11100101.23.14.67
- The first octet is binary representation ("11100101") rather than decimal. It should be
"229.23.14.67" in decimal.
OR
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.
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.
i) Mobile Node (MN): The mobile device that can change its point of attachment to the network
while maintaining communication.
ii) Home Agent (HA): A router on the home network that keeps track of the Mobile Node's
current location (Care-of-Address) and forwards data to it when needed.
iii) Foreign Agent (FA): A router on the visited network that assists in the registration process
and forwards data between the Home Agent and the Mobile Node.
iv) Home Network: The network where the Mobile Node has a permanent IP address (Home
Address) assigned.
v) Foreign Network: The network the Mobile Node is currently connected to, which is not its
home network.
vi) Care-of-Address (CoA): The temporary IP address assigned to the Mobile Node on the
visited network while away from its home network.
vii) Correspondent Node: Any device with which the Mobile Node communicates; it can be on
the home or foreign network.
The host address section is the remaining bits after the network address section.
(ii) 12.12.12.12:
=> 232-n - 2
=> 232-8 - 2
=> 224 - 2
=> 16777216 - 2
=> 16777214
(iii) 192.0.233.26:
=> 232-n - 2
=> 232-24 - 2
=> 28 - 2
=> 256 - 2
=> 254
(iv) 126.123.16.87:
=> 232-n - 2
=> 232-8 - 2
=> 224 - 2
=> 16777216 - 2
=> 16777214
The host address section is the remaining bits after the network address section.
Q. Describe the sub-network address if the destination address is 200.45.34.56 and the
subnet mask is 255.255.240.0.
Ans:
Given,
Destination Address = 200.45.34.56
Subnet Mask = 255.255.240.0
To find subnet address, convert Destination Address and Subnet Mask into binary form and then
perform AND operation:
11001000.00101101.00100010.00111000
11111111 .11111111 .11110000.00000000
--------------------------------------------------
11001000.00101101.00100000.00000000
Q. For the IPV4 addresses given below, calculate subnet mask, broadcast address and number of
hosts possible.
(i) 10.0.199.237/22
(ii) 192.168.14.87/26
Ans:
(i) 10.0.199.237/22:
● Subnet mask: convert the prefix length /22 to binary = 11111111.11111111.11111100.00000000
Convert the binary prefix to decimal = 255.255.252.0
● Network address: obtain the binary network portion of the IP address by setting the host bits to 0
= 00001010.00000000.11000100.00000000
Convert the binary network address to decimal = 10.0.196.0
● Broadcast address: obtain the binary host portion of the IP address by setting the host bits to 1 =
00001010.00000000.11000111.11111111
Convert the binary broadcast address to decimal = 10.0.199.255
● Number of hosts possible: calculate the number of available host addresses by subtracting the
network and broadcast addresses from the total number of possible addresses. In this case, there
are 2(32-22) - 2 = 1022 available host addresses.
(ii) 192.168.14.87/26:
● Subnet mask: convert the prefix length /26 to binary = 11111111.11111111.11111111.11000000
Convert the binary prefix to decimal = 255.255.255.192
● Network address: obtain the binary network portion of the IP address by setting the host bits to 0
= 11000000.10101000.00001110.01000000
Convert the binary network address to decimal = 192.168.14.64
● Broadcast address: obtain the binary host portion of the IP address by setting the host bits to 1 =
11000000.10101000.00001110.01111111
Convert the binary broadcast address to decimal = 192.168.14.127
● Number of hosts possible: calculate the number of available host addresses by subtracting the
network and broadcast addresses from the total number of possible addresses. In this case, there
are 2(32-26) - 2 = 62 available host addresses.
Q. For the IP address given below, find the range of addresses in the following blocks:
(a) 123.56.77.32/29
(b) 200.17.21.128/27
(c) 17.34.16.0/23
(d) 180.34.64.64/30
Ans:
a) (123.56.77.32/29):
=> Subnet Mask: (255.255.255.248)
=> Number of Addresses in Subnet: (232-29 = 8)
=> Starting Address: (123.56.77.32)
=> Ending Address: (123.56.77.39)
=> Total Range: (123.56.77.32 - 123.56.77.39)
=> Usable Range: (123.56.77.33 - 123.56.77.38)
b) (200.17.21.128/27):
=> Subnet Mask: (255.255.255.224)
=> Number of Addresses in Subnet: (232-27 = 32)
=> Starting Address: (200.17.21.128)
=> Ending Address: (200.17.21.159)
=> Total Range: (200.17.21.128 - 200.17.21.159)
=> Usable Range: (200.17.21.129 - 200.17.21.158)
c) (17.34.16.0/23):
=> Subnet Mask: (255.255.254.0)
=> Number of Addresses in Subnet: (232-23 = 512)
=> Starting Address: (17.34.16.0)
=> Ending Address: (17.34.17.255)
=> Total Range: (17.34.16.0 - 17.34.17.255)
=> Usable Range: (17.34.16.1 - 17.34.17.254)
d) (180.34.64.64/30):
=> Subnet Mask: (255.255.255.252)
=> Number of Addresses in Subnet: (232-30 = 4)
=> Starting Address: (180.34.64.64)
=> Ending Address: (180.34.64.67)
=> Total Range: (180.34.64.64 - 180.34.64.67)
=> Usable Range: (180.34.64.65 - 180.34.64.66)
Q. Given an IP address (70.12.100.132) and network mask (255.255.255.192), determine
other information about the IP address such as:
(i) Network address
(ii) Network broadcast address
(iii) Total number of host bits
(iv) Number of hosts
Ans:
i) Network Address:
Perform a bitwise "OR" operation on the network address and inverted host bits:
01000110.00001100.01100100.10000000 (Network address)
00000000.00000000.00000000.00111111 (Inverted host bits)
-------------------------------------------------
01000110.00001100.01100100.10111111 (Network broadcast address)
Therefore, the information about the given IP address and network mask is as follows:
(i) Network address: 70.12.100.128
(ii) Network broadcast address: 70.12.100.191
(iii) Total number of host bits: 6
(iv) Number of hosts: 62
Q. Define home agent and foreign agent with respect to Mobile IP.
Ans: Home Agent: The Home Agent is a router located in the home network that acts as the anchor point
for communication with the mobile node. It facilitates the tunneling of packets from a device on the
Internet, known as a correspondent node, to the roaming mobile node.
Foreign Agent: The Foreign Agent is a router that can serve as the point of attachment for the mobile
node when it moves to a foreign network. It is responsible for delivering packets from the home agent to
the mobile node.
● Traffic Class (8-bits): These 8 bit are divided into two parts. The most significant 6 bits are used
for Type of Service to let the Router Know what services should be provided to this packet. The
least significant 2 bits are used for Explicit Congestion Notification ECN).
● Flow label (20-bits): This label is used to maintain the sequential flow of the packets belonging
to a communication. The source labels the sequence to help the router identify that a particular
packet belongs to a specific flow of information. This field helps avoid reordering of data packets.
It is designed for streaming/real -time media.
● Payload Length (16-bits): This field is used to tell the routers how much information a particular
packet contains in its payload. Payload is composed of Extension Headers and Upper Layer data.
With 16 bits, up to 65535 bytes can be indicated, but if the Extension Headers contain
Hop-by-Hop Extension Header, then the payload may exceed 65535 bytes and this field is set to
0.
● Next Header (8-bits): This field is used to indicate either the type of Extension Header,or if the
Extension Header is not present then it indicates the Upper Layer PDU. The values for the type of
Upper Layer.
● Hop Limit (8-bits): This field is used to stop packets from looping in the network infinitely.This
is the same as TTL in IPV4. The value of Hop Limit field is decremented by 1 as it passes a link
(router/hop). When the field reaches the packet is discarded.
● Source Address (128-bits): This field indicates the address of the originator of the packet.
● Destination Address (128-bits): This field provides the address of intended recipient of the
packet.
Renumbering:
● Renumbering in IPv6 refers to the ability to change the global prefix of an IPv6 network
without individually reconfiguring each device.
● This is particularly important in situations where a network addressing scheme needs to
be updated or modified.
● IPv6 simplifies the renumbering process by allowing routers to advertise the new prefix,
and devices can then update their addresses accordingly.
● This flexibility is crucial for adapting to changes in network topology, addressing plans,
or service provider relationships without causing significant disruptions to ongoing
network operations.
1. Dual Stack:
● In this kind of strategy a station has a dual stack of protocols run IPv4 and IPv6
simultaneously.
● To determine which version to use when sending a packet to a destination, the source host
queries the DNS.
● If the DNS returns an IPv4 address, the source host sends an IPv4 packet.
● If the DNS returns an IPv6 address, the source host sends an IPv6 packet.
2. Tunneling:
● Tunneling 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.
3. Header Translation:
● In this case, the header format must be totally changed through header translation.
● The header of the IPv6 packet is converted to an IPv4 header see figure.
1. Larger Address Space: IPv6 offers a much larger pool of unique addresses compared to
the limited supply in IPv4 (128-bit vs. 32-bit).
2. Addressing Efficiency: IPv6 eliminates the need for NAT, providing globally unique
addresses for devices and improving end-to-end communication.
3. Security and Privacy: IPv6 incorporates built-in security features, including mandatory
IPsec support, enhancing network security.
5. Quality of Service (QoS): IPv6 includes QoS features, improving prioritization and
traffic management for real-time applications.
6. Future-Proofing: IPv6's design accommodates the expanding internet landscape,
supporting new technologies and devices.
● Ensures Order: Sequence control ensures that data is transmitted and received in the correct
order, preventing confusion and maintaining the intended meaning of the information.
● Data Integrity: By maintaining the proper sequence, it enhances the reliability of data transfer,
reducing the chances of misinterpretation and errors caused by out-of-order delivery.
2. Error Control:
● Detects Errors: Error control mechanisms identify errors in transmitted data, enabling the
detection of corrupted information and ensuring the accuracy of received data.
● Corrects Errors: In addition to detection, some error control methods provide mechanisms for
correcting errors, enhancing the overall integrity and reliability of the communication.
3. Flow Control:
● Prevents Congestion: Flow control manages the rate of data transmission, preventing network
congestion and ensuring that the network operates efficiently without overwhelming devices or
causing bottlenecks.
● Optimizes Performance: By regulating the flow of data, flow control optimizes network
performance, prevents packet loss, and ensures a smoother and more reliable communication
process.
Q. Assume a host with Ethernet address (F5-A9-23-11-9B-E2)16 has joined the network.
Build its global unicast address if the global unicast prefix of the organization is
3A21:1216:2165 and the subnet identifier is A245:1232.
Ans:
To build the global unicast address for the host with the Ethernet address (F5-A9-23-11-9B-E2),
we need to convert the Ethernet address to an IPv6 interface identifier and combine it with the
global unicast prefix and subnet identifier.
Next, flip the seventh bit (universal/local bit) of the first byte (F5): F7-A9-23-FF-FE-11-9B-E2
The complete global unicast address for the host with the given Ethernet address would be:
3A21:1216:2165:A245:1232:F7A9:23FF:FE11:9BE2
Q. Difference between Static and Dynamic Routing on the basis of configuration, security,
routing protocols and cost.
Ans:
Parameter Static Routing Protocol Dynamic Routing Protocol
iv) It uses the Bellman Ford Algorithm. iv) It uses the Dijkstra Algorithm.
v) CPU and memory utilization is low. v) CPU and memory utilization is high.
viii) It updates the full routing table. viii) It updates only link states.
ix) It doesn't have hierarchical structure. ix) It works best for hierarchical routing
design.
Example: In the network shown below, there are three routers, A, B, and C, with the
following weights: AB = 2, BC = 3 and CA = 5.
Step 1: In this DVR network, each router shares its routing table with every neighbor. For
example, A will share its routing table with neighbors B and C and neighbors B and C will share
their routing table with A.
From A A B C
A 0 2 3
From B A B C
B 2 0 1
From C A B C
C 3 1 0
Step 2: If the path via a neighbor has a lower cost, then the router updates its local table to
forward packets to the neighbor. In this table, the router updates the lower cost for A and C by
updating the new weight from 4 to 3 in router A and from 4 to 3 in router C.
Step 3: The final updated routing table with lower cost distance vector routing protocol for all
routers A, B, and C is given below:
Router 1:
From A A B C
A 0 2 3
B 2 0 1
C 3 1 0
Router 2:
From B A B C
A 0 2 3
B 2 0 1
C 3 1 0
Router 3:
From C A B C
A 0 2 3
B 2 0 1
C 3 1 0
Q. 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?
Ans: 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 the 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.
Example:
A B C D
A 0, - 1, A 2, B 3, C
B 1, B 0, - 2, C 3, D
C 2, B 1, C 0, - 1, C
D 3, B 2, C 1, D 0, -
B C D
∞ ∞ ∞ ∞
ii) It is based on the Bellman Ford Algorithm. ii) It is based on Dijkstra's Algorithm.
vi) It is suited for smaller networks. vi) It is suited for larger networks.
● Command: 8-bit
○ The type of message: request (1) or response (2)
● Version: 8-bit
○ Defines the RIP version
● All 0s
○ This field is not actually used by RFC 1058 RIP; it was added solely to provide
backward compatibility with pre-standard varieties of RIP. Its name comes from
its defaulted value, zero.
● Family:
○ The 16-bit field defines the family of the protocol used. For TCP/IP, value is 2.
● Distance:
○ 32-bit field defines the hop count from the advertising router to the destination
network.
Expiration Timer:
● The expiration timer governs the validity of a route.
● When a router receives update information for a route, the expiration timer is set to 180 s
for that particular route.
● Every time a new update for the route is received, the timer is reset.
● In normal situations this occurs every 30 s.
● However, if there is a problem on an Internet and no update is received within the allotted
180s, the route is considered expired and the hop count of the route is set to 16, which
means the destination is unreachable.
● Every route has its own expiration timer.
i) Marker:
- The Marker field is 32 Bits in length and is used for synchronization and authentication
purposes during the BGP session establishment. It is typically set to a well-known fixed value.
The Marker field, along with the Length field, precedes the actual BGP message in the BGP
header.
ii) Length:
- The Length field indicates the total length of the BGP message, including the Marker, Length,
Type, and Data fields. It is a 16 bits field, allowing BGP to support variable-length messages.
iii) Type:
- The Type field specifies the type of BGP message, indicating whether it is an Open message,
Update message, Keepalive message, or Notification message. It is a 8 bits field.
3. Campus Networks:
- Reason: OSPF is employed in campus networks, especially in educational institutions or
large corporate campuses. It simplifies routing within the campus, adapting to changes and
optimizing routing based on the network's topology.
5. Telecommunication Networks:
- Reason: Telecommunication networks, which often involve a complex infrastructure and
dynamic changes, benefit from OSPF. Its support for fast convergence and scalability makes it
suitable for managing routing in telecommunications.
6. Multi-Vendor Environments:
- Reason: OSPF's standardized nature allows it to be used in multi-vendor environments where
different routers from various manufacturers are present. Its adherence to industry standards
ensures interoperability.
ii) Low Network Impact. ii) Moderate Network Impact. ii) High Network Impact.
iii) Not Scalable for larger iii) Scalable for moderate - iii) Scalable for large groups.
groups. sized groups.
iv) Individual routing path. iv) Common routing path to iv) No routing, sent to all
multiple recipients. devices directly.
vi) Target is a single specific vi) Target is multiple vi) Target are all devices on
recipient. pre-selected recipients. the network.
● When a router receives a multicast packet, it checks its MOSPF multicast routing table to
determine the outgoing interfaces and paths to forward the packet.
● The multicast routing table is constructed based on OSPF's link state database, which
contains information about network topology and connectivity.
● MOSPF constructs a shared multicast tree that allows routers to share information about
multicast group memberships.
● This tree is rooted at the source and extends to all routers interested in the multicast
group.
● MOSPF operates by extending OSPF's link state advertisements to include information
about multicast group memberships and the associated multicast distribution trees.
● When routers exchange link state advertisements, they also exchange information about
multicast group memberships and the paths to reach the root of the multicast distribution
tree.
● This enables routers to efficiently forward multicast traffic along the shortest paths,
minimizing duplication and reducing network traffic.
Applications of UDP:
i) Process to Process:
● UDP allows communication between processes running on different devices using port
numbers to identify the processes.
● It provides a way for applications to send and receive data without the need for a formal
connection setup.
v) Congestion Control:
● UDP does not include mechanisms for managing network congestion.
● Applications using UDP must manage congestion at the application level to avoid
overloading the network.
vii) Queuing:
● UDP packets are placed in queues briefly before being transmitted, just like any other
data on a network.
● However, the handling of these queues and the priority given to UDP packets can vary
based on the network configuration and the specific application's requirements.
1. VoIP (Voice over Internet Protocol) : UDP provides low latency and fast transmission for real-time
voice communication over the internet.
2. Video Streaming: UDP allows for efficient transmission of large amounts of data with minimal delay,
making it ideal for streaming video content.
3. Online Gaming: UDP's low overhead and fast delivery make it useful in online games where speed and
responsiveness are critical.
4. DNS (Domain Name System): UDP is used to query domain name servers for IP addresses, providing
a quick response time for resolving domain names to their associated IPs.
5. SNMP (Simple Network Management Protocol): UDP is used by network devices to send and receive
management information between devices and management systems.
6. DHCP (Dynamic Host Configuration Protocol): UDP is used for client-server communication in the
process of assigning IP addresses to network devices automatically.
7. TFTP (Trivial File Transfer Protocol): A simple file transfer protocol that uses UDP for data transfer,
often used for transferring firmware to network devices.
8. NTP (Network Time Protocol): UDP is used to synchronize the time between network devices using
the Network Time Protocol.
9. Wake-on-LAN (WoL): UDP is used to send magic packets to wake up network devices remotely from
sleep or hibernation mode.
10. RIP (Routing Information Protocol): A routing protocol that uses UDP for routing updates between
routers on a network.
Q. The dump of a UDP header in hexadecimal format is as follows:
BC82000D002B001D
Obtain the following from it:
(i) Source port number
(ii) Destination port number
(iii) Total length
(iv) Length of the data
Ans:
The UDP header has four parts, each of two bytes.
That means we get the following interpretation of the header.
i) Source port number = BC8216 = 48258
Convert BC82 into decimal:
BC82 => (11 × 163) + (12 × 162) + (8 × 161) + (2 × 160)
=> 45056 + 3072 + 128 + 2
=> 48258
5. Reliability Service:
● TCP is reliable as it uses checksum for error detection, attempts to recover lost or
corrupted packets by re-transmission, acknowledgement policy and timers.
● It uses features like byte number and sequence number and acknowledgement number so
as to ensure reliability. Also, it uses congestion control mechanisms.
2. Reliable: TCP offers reliable delivery of data by providing error detection and correction mechanisms,
acknowledgment of received data, and retransmission of lost or corrupted packets.
3. Flow control: TCP uses flow control to manage the rate at which data is transmitted between
endpoints. This ensures that the receiver can handle the amount of data being sent.
4. Congestion control: TCP employs congestion control to prevent network congestion by slowing down
the rate of data transmission when the network becomes congested.
5. Full-duplex operation: TCP supports full-duplex operation, which means that data can be transmitted
in both directions simultaneously.
6. Windowing: TCP uses windowing to optimize data transmission by allowing multiple packets to be
sent without waiting for an acknowledgment for each packet.
7. Segmentation: TCP breaks up data into segments that can be transmitted across the network more
efficiently.
8. Three-way handshake: TCP uses a three-way handshake to establish a connection between two
endpoints. This involves a SYN message from the initiating endpoint, a SYN-ACK message from the
receiving endpoint, and an ACK message from the initiating endpoint.
9. Port numbers: TCP uses port numbers to identify the application that is sending or receiving data.
10. Multiplexing: TCP supports multiplexing, which allows multiple applications to use the same TCP
connection by using different port numbers.
Q. Explain the TCP connection establishment using a three way handshake mechanism.
Ans:
Connection Establishment:
● TCP uses a Three way handshaking mechanism to establish a connection between client
and server machines.
● The three steps in the three way handshaking mechanism are as follows.
○ SYN:
■ The client sends the first segment, a SYN segment, in which only the SYN
flag is set. This segment is for synchronization of sequence numbers.
○ SYN + ACK
■ The server sends the second segment, a SYN +ACK segment, with 2 flag
bits set.
○ ACK
■ The client sends the third segment. This is just an ACK segment. It
guarantees the completion of three way handshaking.
Q. Explain how TCP connections are established using the 3 way handshake. What
happens when 2 hosts simultaneously try to establish a connection?
Ans:
Connection Establishment:
● TCP uses a Three way handshaking mechanism to establish a connection between client
and server machines.
● The three steps in the three way handshaking mechanism are as follows.
○ SYN:
■ The client sends the first segment, a SYN segment, in which only the SYN
flag is set. This segment is for synchronization of sequence numbers.
○ SYN + ACK
■ The server sends the second segment, a SYN +ACK segment, with 2 flag
bits set.
○ ACK
■ The client sends the third segment. This is just an ACK segment. It
guarantees the completion of three way handshaking.
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.
● The CLOSING state takes the place of FIN-WAIT-2 or CLOSE-WAIT in a common
scenario.
The figure shows the two FSMs used by the TCP client and server combined in one diagram:
● Oval/Rectangle represent 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, which TCP receives.
● The second is the output, which 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.
State Description
CLOSE-WAIT First FIN received, ACK sent; waiting for application to close
TIME-WAIT Second FIN received, ACK sent; waiting for 2MSL time-out.
Q. Explain TCP connection management with the help of TCP connection management
finite state machine.
Ans:
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
State Description
CLOSE-WAIT First FIN received, ACK sent; waiting for application to close
TIME-WAIT Second FIN received, ACK sent; waiting for 2MSL time-out.
1. Checksum: Every segment contains a checksum field which is used to find corrupted
segment.If the segment is corrupted, then that segment is discarded by the destination
TCP and is considered as lost.
2. Acknowledgement:
● TCP has another mechanism called acknowledgement to affirm that the data
segments have been delivered.
● Control segments that contain no data but have sequence numbers will be
acknowledged as well but ACK segments are not acknowledged.
3. Retransmission:
● When a segment is missing, delayed to deliver to the receiver, corrupted when it
is checked by the receiver then that segment is retransmitted again.
● Segments are retransmitted only during two events (when the sender receives
three duplicate acknowledgements (ACK) or when a retransmission timer
expires).
Data Transmission It guarantees that the order of the No guarantee of the data
Order data at the receiving end is the transmission order.
same as the sending end.
Error Handling It checks for errors and reporting. It does error checking but no
reporting.
5) SYN: Synchronize
● When this bit field in present then the sender is attempting to 'synchronize' sequence
numbers
2. Persistent Timer:
● Used in the context of flow control, this timer is associated with the sending of window
probes to check if a receiver's window is open.
● If the sender doesn't receive an acknowledgment within the persistent timer duration, it
assumes the receiver's window is closed and sends a probe.
3. Keepalive Timer:
● Keepalive timers are used to periodically check if a connection is still active, particularly
in idle connections.
● If no data or acknowledgment is received within the keepalive timer interval, the
connection may be considered as timed out and closed.
4. Time-Wait Timer:
● This timer is associated with the TIME_WAIT state of a connection. After a connection is
closed, the Time-Wait timer ensures that any delayed segments lingering in the network
are discarded before the connection is fully closed.
● It prevents new connections from using the same connection identifiers.
Source Port (16-bit): This field represents the port number of the sender. It is a 16-bit field that
identifies the source of the SCTP packet.
Destination Port (16-bit): This field indicates the port number of the intended recipient. Like
the source port, it's a 16-bit field used to identify the destination for the SCTP packet.
Verification Tag (32-bit): The verification tag is a 32-bit field used for endpoint verification
during the initiation of an SCTP association. It helps ensure that the received packet belongs to a
specific association.
Checksum (32-bit): This 32-bit field is used for error-checking purposes. It contains a checksum
value calculated over the entire SCTP packet, including the SCTP header and any included data.
It helps ensure the integrity of the packet during transmission.
Type: This field specifies the type of control chunk being used. Control chunks are used for
various purposes in SCTP, such as association setup, teardown, and error handling. The type field
indicates which specific control function is being performed.
Flags: Flags in the control chunk header provide additional control information. The meaning of
these flags can vary depending on the specific type of control chunk.
Length: The length field indicates the size of the control chunk, including both the header and
the data portion. It is typically a 16-bit field that helps the receiver correctly parse the chunk.
Control Data: This field contains data specific to the control chunk type. The content and
structure of the control data depend on the purpose of the control chunk. For example, during
association setup, it might contain parameters needed to establish the association.
Q. Describe the fields of SCTP packet format. Explain SCTP association established.
Ans:
Source Port (16-bit): This field represents the port number of the sender. It is a 16-bit field that
identifies the source of the SCTP packet.
Destination Port (16-bit): This field indicates the port number of the intended recipient. Like
the source port, it's a 16-bit field used to identify the destination for the SCTP packet.
Verification Tag (32-bit): The verification tag is a 32-bit field used for endpoint verification
during the initiation of an SCTP association. It helps ensure that the received packet belongs to a
specific association.
Checksum (32-bit): This 32-bit field is used for error-checking purposes. It contains a checksum
value calculated over the entire SCTP packet, including the SCTP header and any included data.
It helps ensure the integrity of the packet during transmission.
SCTP Association Establishment:
1. The client sends the first packet, which contains an INIT chunk.
2. The server sends the second packet, which contains an INIT ACK chunk.
3. The client sends the third packet, which includes a COOKIE ECHO chunk. This is a very
simple chunk that echoes, without change, the cookie sent by the server. SCTP allows the
inclusion of data chunks in this packet.
4. The server sends the fourth packet, which includes the COOKIE ACK chunk that
acknowledges the receipt of the COOKIE ECHO chunk. SCTP allows the inclusion of
data chunks with this packet.
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.
Q. Differentiate between TCP, UDP and SCTP on the basis of reliability, connection
management, transmission of message, flow control, security and data delivery.
Ans:
Parameter TCP UDP SCTP
● A static web page is a web page that is delivered to the user exactly as stored.
● Static documents are fixed-content documents that are created and stored in a server.
● The client can get a copy of the document only.
● User cannot do any modification or interact with the information on static web page.
● Static documents are. prepared using one of the several languages such as HyperText
Markup Language (HTML), Extensible Markup Language (XML), Extensible Style
Language (XSL), and Extended Hypertext Markup Language (XHTML).
● A dynamic web page is a web page with web content that varies based on parameters
provided by a user or a computer program.
● A dynamic document is created by a web server whenever a browser requests the
document.
● When a request arrives, the Web server runs an application program or a script that
creates the dynamic document.
● The server returns the output of the program or script as a response to the browser that
requested the document.
● In dynamic web pages, possible to change a portion / content of a web page without
loading the entire web page.
Q. Construct a diagram to show the application of cookies in a scenario in which the server
uses cookies for advertisement.
Ans:
Use of Cookies for advertisements:
● A cookie is also used by advertising agencies.
● An advertising agency can place banner ads on some main website that is often visited by users.
● The advertising agency supplies only a URL that gives the banner address instead of the banner
itself.
● When a user visits the main website and clicks on the icon of an advertised corporation, a request
is sent to the advertising agency.
● The advertising agency sends the banner, a GIF file, for example, but it also includes a cookie
with the ill of the user.
● Any future use of the banners adds to the database that profiles the Web behavior of the user.
● The advertising agency has compiled the interests of the user and can sell this information to
other parties.
● This use of cookies has made them very controversial.
● Hopefully, some new regulations will be devised to preserve the privacy of users.
SMPT POP3
Stands for Simple Mail Transfer Stands for Post Office Protocol
Protocol version 3
Used to send outgoing mail from an Used to retrieve incoming mail from
email client to the mail server the mail server to an email client
Does not allow users to manage their Allows users to manage their inbox
inbox by creating folders or labels by creating folders or labels
Q. Explain about standard and non standard protocols at the application layer.
Ans:
HTTP:
● The Hypertext Transfer Protocol (HTTP) is a Application layer protocol used mainly to
access data on the World Wide Web.
● HTTP uses the services of TCP on well-known port 80.
FTP:
● FTP (File Transfer Protocol) is standard TCP/IP protocol to transfer files.
● It uses the services of TCP. It needs two TCP connections.
● The well-known port 21 is used for the control connection and the well-known port 20
for the data connection.
SMTP:
● It stands for Simple Mail Transfer Protocol. It is a part of the TCP/IP standard protocol.
● Using a process called “store and forward”, SMTP moves your email on and across
networks.
● It works closely with something called the Mail Transfer Agent (MTA) to send your
communication to the right computer and email inbox.
● Port number for SMTP is 25.
TELNET:
● TELNET is an abbreviation for TErminaLNETwork. It is the standard TCP/IP protocol
for virtual terminal service.
● TELNET enables the establishment of a connection to a remote system in such a way that
the local terminal appears to be a terminal at the remote system.
● There are two parties involved: TELNET Client and TELNET server.
DNS:
● It stands for Domain Name Service. Every time you use a domain name, therefore, a
DNS service must translate the name into the corresponding IP address.
● Ex: the domain name www.abc.com might translate to 198.105.232.4.
● Port number for DNS is 53.
DHCP:
● It stands for Dynamic Host Configuration Protocol (DHCP). It gives IP addresses to
hosts.
● There is a lot of information a DHCP server can provide to a host when the host is
registering for an IP address with the DHCP server.
● Port number for DHCP is 67, 68.
POP3:
● Post Office Protocol, version 3 (POP3) is simple and limited in functionality.
● POP works as a Message Access Agent.
● The client POP3 software is installed on the recipient computer; the server POP3
software is installed on the mail server.
● Mail access starts with the client when the user needs to download email from the
mailbox on the mail server.
Status Line
Headers
A Blank Line
RESPONSE MESSAGE
Status Line:
● Status line shows status for the response it indicates response status using a code as well
as a status phrase.
● The status-Line begins with a protocol version, then status code and status phrase.
● Ex: HTTP/1.1 200 OK
Headers:
● Three types of headers are present HTTP Response message which are as follows.
● General Header
○ The general header gives general information about the message and can be
present in both a request and a response.
○ Ex: Date: Mon, 27 Jul 2009 12:28:53 GMT
● Response Header
○ The response header can be present only in a response message. It specifies the
server's configuration and special information about the request.
○ Ex: Server: Apache/2.2.14 (Win32)
● Entity Header
○ The entity header gives information about the body of the document.
○ Ex: Content-Length: 88
○ Ex: Content-Type: text/html
Blank Line:
● An empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the
header fields.
Body:
● It contains actual content. This part is optional.
● Email is often used to spread malware, spam and phishing attacks. Attackers use
deceptive messages to entice recipients to part with sensitive information, open
attachments or click on hyperlinks that install malware on the victim's device.
● Because email is an open format, it can be viewed by anyone who can intercept it. It can
be easily read and the contents of an email by intercepting it.
● Email Security Policies can be established by viewing the contents of emails flowing
through their email servers. It's important to understand what is in the entire email in
order to act appropriately. After these baseline policies are put into effect, an organization
can enact various security policies on those emails.
● These email security policies can be as simple as removing all executable content from
emails to more in-depth actions, like sending suspicious content to a sandboxing tool for
detailed analysis.
● If security incidents are detected by these policies, the organization needs to have
actionable intelligence about the scope of the attack.
● Enforce email encryption policies to prevent sensitive email information from falling into
the wrong hands.
● An email gateway scans and processes all incoming and outgoing email and makes sure
that threats are not allowed in. Because attacks are increasingly sophisticated, standard
security measures, such as blocking known bad file attachments, are no longer effective.
● Deploy a secure email gateway that uses a multi-layered approach.
● It's also important to deploy an automated email encryption solution as a best practice.
This solution should be able to analyze all outbound email traffic to determine whether
the material is sensitive.
● The Pretty Good Privacy (PGP) provides e-mail with privacy, integrity, and
authentication that can be used over non secure channels such as the internet. It is used
for signing, encrypting and decrypting texts, e-mails, files, directories and whole disk
partitions and to increase the security of e-mail communications.
Second Scenario: When the sender and the receiver of an e-mail are on different systems, we
need two UAs and a pair of MTAs (client and server).
Third Scenario: When the sender is connected to the mail server via a LAN or a WAN, we need
two UAs and two pairs of MTAs (client and server).
Fourth Scenario: When both sender and receiver are connected to the mail server via a LAN or
a WAN, we need two UAs, two pairs of MTAs and a pair of MAAs.
Q. Describe SMTP with a suitable diagram.
Ans: SMTP:
● It stands for Simple Mail Transfer Protocol. It is a part of the TCP/IP standard protocol.
● Using a process called “store and forward”, SMTP moves your email on and across networks.
● It works closely with something called the Mail Transfer Agent (MTA) to send your
communication to the right computer and email inbox.
● Port number for SMTP is 25.
Q. Explain the process of resolving the given host name into IP address using DNS.
Ans: Recursive Resolution:
● The client (resolver) can ask for a recursive answer from a name server.
● This means that the resolver expects the server to supply the final answer.
● If the server is the authority for the domain name, it checks its database and responds.
● If the server is not the authority, it sends the request to another server (the parent usually)
and waits for the response.
● If the parent is the authority, it responds; otherwise, it sends the query to yet another
server.
● When the query is finally resolved, the response travels back until it finally reaches the
requesting client.
Iterative Resolution:
● If the client does not ask for a recursive answer, the mapping can be done iteratively.
● If the server is an authority for the name, it sends the answer.
● If it is not, it returns (to the client) the IP address of the server that it thinks can resolve
the query.
● The client is responsible for repeating the query to this second server.
● If the newly addressed server can resolve the problem, it answers the query with the IP
address; otherwise, it returns the IP address of a new server to the client.
● Now the client must repeat the query to the third server.
● This process is called iterative because the client repeats the same query to multiple
servers.
● In Figure the client queries five servers before it gets an answer from the mcgraw.com
server.
Q. Describe DHCP with its operation & static and dynamic allocation.
Ans:
● Dynamic Host Configuration Protocol (DHCP) is a network protocol used to
automatically assign IP addresses and other network configuration parameters to devices
within a network.
● Its primary goal is to simplify the process of network configuration by centrally
managing and distributing IP addresses, subnet masks, default gateways, DNS servers,
and other related settings.
1. DHCP Discover: When a device joins a network and needs an IP address, it sends out a
DHCP Discover packet as a broadcast request. This packet essentially says, "Is there a
DHCP server here that can provide me with an IP address?"
2. DHCP Offer: Upon receiving the DHCP Discover packet, one or more DHCP servers on
the network respond with a DHCP Offer. This offer includes an available IP address
along with other configuration information. The DHCP server reserves the offered IP
address for the requesting device for a certain period of time.
3. DHCP Request: The client, having received one or more DHCP Offers, selects one and
sends a DHCP Request packet to the chosen DHCP server. This packet indicates the
client's acceptance of the offered IP address and configuration settings.
4. DHCP Acknowledgment: The DHCP server responds with a DHCP Acknowledgment
packet, confirming the IP address assignment and providing the client with the
agreed-upon configuration settings. The client then configures its network settings
according to the received information.
Static allocation and dynamic allocation are two methods of IP address assignment within the
DHCP framework:
Static Allocation: The DHCP server allocates an IP address based on a table with MAC address /
IP address pairs, which are manually filled Only requesting clients with a MAC address listed in
this table will be allocated an IP address
● Remote access: Telnet can provide remote access to various types of systems and
services such as email, file transfer, and database management systems.
● Padding: 1 to 8 bytes of padding is added to the packet to make the attack on the security
provision more difficult.
● Type: This 1 byte field defines the type of the packet used by SSH protocols.
● Data: This field is of variable length. The length of the data can be found by deducting the five
bytes from the value of the length field.
● CRC: The cyclic redundancy check filed is used for error detection.
SSH uses client-server architecture in its implementation. An SSH server can be deployed and allow
several SSH clients to connect to it.
The architecture of SSH is shown in Fig. and the SSH process is as follows:
● The SSH client on the left provides authentication to the SSH server on the right. In the initial
connection, the client receives a host key of the server.
● Therefore, in all subsequent connections, the client will know it is connecting to the same SSH
server.
● This places less emphasis on the IP address of the SSH server, which can be easily spoofed, and
more emphasis on the host key of the server, which cannot be spoofed very easily.
● The SSH server determines if the client is authorized to connect to the SSH service by verifying
the username / password or public key that the client has presented for authentication.
● This process is completely encrypted.
● If the SSH server authenticates the client and the client is authorized, the SSH session begins
between the two entities.
● All communication is completely encrypted.
THE END