Questions and Answers To Previous Years Papers

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Questions And Answers to previous years papers:-

Q1. What is the ICMP protocol ? Explain the ICMP header format with
Diagram.

Ans:

1. The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet
Protocol suite.
2. It is used by network devices, including routers, to send error messages and
operational information indicating success or failure when communicating with
another IP address.

For example, an error is indicated when a requested service is not available or that
host or router could not be reached.

3. ICMP differs from transport protocols such as TCP and UDP in that it is not typically
used to exchange any data between systems, nor is it regularly employed by end-user
network applications.
4. When something unexpected occurs during packet processing at a router, the event is
reported to the sender by the ICMP.
5. It is used to test the internet.
6. It is a ​NETWORK LAYER PROTOCOL.
7. There is no TCP or UDP port number associated with the ICPM packets as these
numbers are associated with the transport layer above.

HEADER FORMAT:

The ICMP header starts after the IPv4 header and is identified by the IP protocol number ‘1’.
All ICMP packets have an 8 byte header and a varied-size data section. The first 4 bytes of
the header have fixed format, while the last 4 bytes depend on the type/code of that ICMP
packet.

Type - ICMP TYPE

Code - ICMP SUBTYPE


Checksum - Error checking data

Rest of header - Four-bytes field whose content varies based on type and code

Messages:

Message Type Type Code Description

Destination 3 0 Destination network


Unreachable unreachable

Destination 3 1 Destination host


Unreachable unreachable

Echo Reply 0 0 Echo reply used to


ping

Redirect Message 5 0 Redirect datagram


for the network

Redirect Message 5 1 Redirect datagram


for the host

Redirect Message 5 2 Redirect datagram


for the type of
service and network

Example​: Redirect Message

Type = 5 Code = 0,1,2,3IP address = 32 bit address of the gateway to which the
redirection should be sent
IP header and additional data is included to allow the host to match the reply with the request
that caused the redirection reply.

Advantage:

1. ICMP protocol helps network administrators by assisting them in diagnosing


networking issues

Disadvantage:

1. Sending a lot of ICMP packets increases network traffic.


2. A device's performance degrades if it receives a lot of malicious packets that cause it
to respond.

Q2. What is the need to map IP address to MAC address? Explain which
protocol does this. Similarly which protocol does the reverse mapping?

Ans:

1. ​Both ​MAC Address​ and ​IP Address​ are used to uniquely define a device on the
internet. The main difference between MAC and IP address is that, MAC Address is
used to ensure the physical address of a computer.
2. It uniquely identifies the devices on a network.
3. IP addresses are used to uniquely identify the connection of network with that device
which takes part in a network.
4. MAC addresses are required to make a local Ethernet (or wifi) network function.
5. Network switches can use MAC addresses to optimise the flow of network traffic.
6. The switch will use either ​ARP​ or packet sniffing to identify which devices are
connected to which port.

Need for ARP:

Data-link layer NICs like ethernet does not understand IP addresses. We need the physical
address in this case.

Even if the IP software on the destination machine can look at the address and see that the
destination is on it’s own network, it still needs to find the destination Ethernet address to
send the frame. One solution is to keep a configuration file that maps IP addresses onto
Ethernet addresses but is not possible for thousands of machines.

A better solution is to send out a broadcast packet onto destination network and get a
response which is sent back from the destination machine with the MAC address. This can be
done using ARP.
The protocol used to map IP addresses to MAC address is ARP(Address Resolution Protocol)

Address Resolution Protocol is a communication protocol used for discovering physical


address associated with given network address.ARP is a network layer to data link layer
mapping process, which is used to discover MAC address for given Internet Protocol
Address. In order to send the data to destination, having IP address is necessary but not
sufficient; we also need the physical address of the destination machine. ARP is used to get
the physical address (MAC address) of the destination machine.

Procedure​:

1. Before sending the IP packet, the MAC address of destination must be known. If not
so, then sender broadcasts the ARP-discovery packet requesting the MAC address of
the intended destination.
2. Since ARP-discovery is broadcast, every host inside that network will get this
message but the packet will be discarded by everyone except that intended receiver
host whose IP is associated.
3. Now, this receiver will send a unicast packet with its MAC address (ARP-reply) to
the sender of ARP-discovery packet. After the original sender receives the ARP-reply,
it updates ARP-cache and start sending unicast message to the destination.
The protocol used to map MAC addresses to IP address is RARP(Reverse Address
Resolution Protocol)

1. In order to get an IP address for a MAC address, we use the reverse address resolution
protocol.
2. When a new machine is setup, it requests an IP address from the gateway on which
the RARP server is configured to map physical addresses(MAC) to IP addresses.
3. A special host configured inside the local area network, called as RARP-server is
responsible to reply for these kind of broadcast packets.
4. It uses an IP to MAC address mapping table./

Q.3 Differentiate between Aloha and Slotted Aloha.

Ans:​ALOHA and Slotted ALOHA both are the Random Access Protocols, that are
implemented on the Medium Access Control (MAC) layer, a sublayer of Data Link Layer.
The purpose of the ALOHA protocol is to determine that which competing station must get
the next chance of accessing the multi-access channel at MAC layer. Some of the Key
Differences between them are:-

ALOHA Slotted ALOHA

1. In this ALOHA, any station can 1. In this Slotted ALOHA, any station
transmit the data at any time. can transmit the data at the beginning
of any time slot.

2. The time of Sender and Receiver is 2. ​The time of Sender and Receiver is
continuous and not globally discrete and globally synchronized.
synchronized.

3. Vulnerable time for pure aloha 3. ​Vulnerable time for Slotted aloha
= 2 x Tt = Tt

4. In Pure Aloha, Probability of 4. ​In Slotted Aloha, Probability of


successful transmission of data successful transmission of data packe​t ​=
packe​t ​= G x e ^​-2G G x e^​-G

5. In pure aloha, Maximum efficiency 5. ​In slotted aloha, Maximum


= 18.4%. efficiency ​= 36.8%

6. Pure aloha doesn’t reduces the 6. ​Slotted aloha reduces the number of
number of collisions to half. collisions to half and doubles the
efficiency of pure aloha.

7. The maximum throughput occurs at 7. The maximum throughput occurs at


G = 1/2 which is 18%. G = 1 which is 37%.

You might also like