MCSE Interview Questions Answers
MCSE Interview Questions Answers
powered by
• What is an IP address?
An IP address (or Internet Protocol address) is a unique address that certain electronic devices
use in order to identify and communicate with each other on a computer network using Internet
protocol. It is a logical address assigned to a device in the network. Current version of IP address
is Ipversion6. it is a 128 bit address. But it is not largely implemented. Current popular version in
Ipv4. it is a 32 bit address. For example 61.11.124.160. IP addresses are managed and created by
the Internet Assigned Numbers Authority (IANA). The IANA generally allocates super-blocks to
Regional Internet Registries, who in turn allocate smaller blocks to Internet Service Providers
(ISP) and enterprises.
A mask used to determine what subnet an IP address belongs to. An IP address has two
components, the network address and the host address. For example, consider the IP address
150.215.017.009. Assuming this is part of a Class B network, the first two numbers (150.215)
represent the Class B network address, and the second two numbers (017.009) identify a
particular host on this network.
What is ARP?
Address Resolution Protocol (ARP) is a network protocol, which maps a network layer protocol
address to a data link layer hardware address. For example, ARP is used to resolve IP address to
the corresponding Ethernet address.
The IP module sends a packet, destined for another host in the network, to the ARP module.
The ARP module looks up the ARP table (cache) to resolve the IP address.
If the supplied IP address is present in the ARP cache, it is resolved into its Ethernet address.
If the ARP module is not able to find an entry for this IP address in the ARP cache, then it sends
an ARP request packet to the Ethernet driver, to resolve the IP address to the Ethernet address.
After the IP address is resolved by the ARP module, the packet is sent to the Ethernet driver for
transmission.
If the IP address to be resolved is for this host, then the ARP module sends an ARP reply packet
with its Ethernet MAC address.
If the IP address to be resolved is for this host, then the ARP module updates its ARP cache with
the source Ethernet MAC address to source IP address mapping present in the ARP request
packet. If the entry is already present in the cache, it is overwritten. If it is not present, it is
added.
If the IP address to be resolved is not for this host, then the ARP module discards the ARP
request packet.
Will a host update its ARP cache upon receiving any ARP request?
A host will update its ARP cache, only if the ARP request is for its IP address. Otherwise, it will
discard the ARP request.
What is the disadvantage if a host updates its ARP cache upon receiving any ARP request?
The host will exhaust the ARP cache with a lot of unused ARP entries, if it updates the ARP
cache for any ARP request.
Is there a separate packet format for ARP request and ARP reply?
No. Both the ARP request and ARP reply packets use the same format.
If a host is not able to get the MAC address of a host, how it knows about its IP address?
A host will either use a static file like /etc/hosts or DNS protocol to get the IP address of another
host.
What will happen if an ARP reply is not received for an ARP request?
If an ARP reply is not received, then that IP address cannot be resolved to an Ethernet address.
Without a Ethernet address, the packets cannot be transmitted.
What will happen if a new ARP request packet is received, but the MAC address to IP
address is already present in the ARP cache?
If a ARP request packet is received and the mapping already exists in the ARP cache, it will be
overwritten with the values present in the request.
+--------+
|Hardware| 2 bytes
|MAC |
|Address |
|Type |
+--------+
|Protocol| 2 bytes
|Address |
|Type |
+--------+
|Hardware| 1 byte
|MAC |
|Address |
|Size |
+--------+
|Protocol| 1 byte
|Address |
|Size |
+--------+
|Op | 2 bytes
+--------+
|Sender | 6 bytes (depends on the above size field)
|MAC |
|Address |
+--------+
|Sender | 4 bytes (depends on the above size field)
|IP |
|Address |
+--------+
|Target | 6 bytes (depends on the above size field)
|MAC |
|Address |
+--------+
|Target | 4 bytes (depends on the above size field)
|IP |
|Address |
+--------+
+---------+-------------------------------------------------------+
|Ethernet |For a ARP request, source MAC address is the MAC |
|Header |address of the host sending the ARP request, |
| |destination MAC address is the Ethernet broadcast |
| |address (FF:FF:FF:FF:FF:FF), frame type field is 0x806.|
| |For ARP reply, source MAC address is the MAC address of|
| |the host replying to the ARP request, destination MAC |
| |address is the MAC address of the host that sent the |
| |ARP request, and the frame type field is 0x806. |
+---------+-------------------------------------------------------+
|Hardware |Type of the hardware MAC address which is being mapped.|
|Address |For Ethernet the value of this field is 1. |
|Type | |
+---------+-------------------------------------------------------+
|Protocol |Type of the protocol address to which the MAC address |
|Address |is mapped. For IP address the value of this field is |
|Type |0x800. |
+---------+-------------------------------------------------------+
|Hardware |Size of the hardware MAC address. For Ethernet, the |
|Address |value of this field is 6. |
|Size | |
+---------+-------------------------------------------------------+
|Protocol |Size of the protocol address. For IP, the value of |
|Address |this field is 4. |
|Size | |
+---------+-------------------------------------------------------+
|Operation|Type of operation being performed. The value of this |
| |field can be 1 (ARP request), 2 (ARP reply) |
+---------+-------------------------------------------------------+
|Source |The hardware MAC address of the host sending the ARP |
|MAC |request or reply. This is same as the source MAC |
|address |address present in the Ethernet header. |
+---------+-------------------------------------------------------+
|Source |The IP address of the host sending the ARP request or |
|IP |reply. |
|address | |
+---------+-------------------------------------------------------+
|Target |The hardware MAC address of the host receiving the ARP |
|MAC |request or reply. This is same as the destination MAC |
|address |address present in the Ethernet header. |
+---------+-------------------------------------------------------+
|Target |The IP address of the host receiving the ARP request |
|IP |or reply. |
|address | |
+---------+-------------------------------------------------------+
How to differentiate between a ARP request packet and a ARP reply packet, as the
Ethernet type field is same on both the packets?
An ARP request packet can be differentiated from an ARP reply packet using the 'operation' field
in the ARP packet. For a ARP request it is 1 and for an ARP reply it is 2.
Why is the hardware MAC address present in both the Ethernet header and the ARP
packet (request and reply)?
The Ethernet header is processed by the data link driver and removed from the packet. When the
ARP layer gets the packet, it needs to know the hardware and protocol addresses in order to
update the table. That is why the hardware MAC address is present in both the Ethernet header
and the ARP packet.
In a properly configured network, there will not be an ARP reply for a gratuitous ARP request.
But if another host in the network is also configured with the same IP address as the source host,
then the source host will get an ARP reply. In this way, a host can determine whether another
host is also configured with its IP address.
When the network interface card in a system is changed, the MAC address to its IP address
mapping is changed. In this case, when the host is rebooted, it will send an ARP request packet
for its own IP address. As this is a broadcast packet, all the hosts in the network will receive and
process this packet. They will update their old mapping in the ARP cache with this new
mapping.
When a source host attempts to communicate with a destination host, the source host uses its
subnet mask to determine whether the destination host is on the local network or a remote
network. This is known as the ANDing process.
The AND function has the following properties:
• Ifthe two compared values are both 1, the result is 1.
• Ifone of the values is 0 and the other is 1, the result is 0.
• Ifboth of the compared values are 0, the result is 0.
The source and destination IP addresses are compared to the source's subnet mask using the
ANDing process. An AND result is created for each of the addresses. If the result is the same,
the hosts are on the same network. If the result is different, the destination host is on a remote
network. All traffic destined for that remote host should be directed to the router indicated in the
source host's routing table. If no explicit route is defined in the routing table, the traffic is
directed to the source host's default gateway.
For example two hosts that want to communicate. Host A (with IP address 172.16.2.4) wants to
communicate with Host B (with IP address 172.16.3.5). If the subnet mask for Host A is
255.255.0.0, will the hosts communicate using local transmissions or will they send information
to the default gateway?
Using the ANDing process.
When converted to binary, the address 172.16.2.4 is as follows:
10101100 00010000 00000010 00000100
When converted to binary, the address 172.16.3.5 is as follows:
10101100 00010000 00000011 00000101
If the ANDing process is performed, the result for Host A using its subnet mask of 255.255.0.0 is
HOST A's IP Address 10101100 00010000 00000010 00000100
Host A's Subnet Mask 11111111 11111111 00000000 00000000
ANDING Result 10101100 00010000 00000000 00000000
The result for Host B is
HOST B's IP Address 10101100 00010000 00000011 00000101
Host A's Subnet Mask 11111111 11111111 00000000 00000000
ANDing Result 10101100 00010000 00000000 00000000
As you can see, the two results match. This indicates that, as far as Host A is concerned, the two
hosts are on the same physical network. Communication can occur directly between the two
hosts. In fact, the same holds true because host B would have the same subnet mask since the
hosts are on the same network.
Day 5, "The Art of Subnet Masking," further examines the art of subnet masking. It also
examines the use of nonstandard subnet masking to further segment a group of IP addresses into
smaller segments. This process, which ignores the default subnet masks used by address classes,
is commonly referred to as Classless Internet Domain Routing (CIDR).
If you don’t have a gateway your network communication have no problem. But you cannot
communicate with other networks. That means your packet will not reach other networks.
• Can a workstation computer be configured to browse the Internet and yet NOT have a default gateway?
No. Never. A work station computer can brows the Internet only if it has a default gateway.
• What is a subnet?
A subnet is a portion of a network that is logically isolated from other parts of the network. Usually it’s divided by a
router.
• What is APIPA?
APIPA stands for Automatic Private IP Addressing. When you configure your computer to obtain IP Address
automatically and a DHCP server cannot be contacted, then the computer will automatically assign an IP address
from a specific range (169.254.0.1 to 169.254.255.254). Then this network will be isolated from all networks.
Because it has no a default gateway and any other configuration parameters.
• What is an RFC?
Short for Request for Comments, a series of notes about the Internet, started in 1969 (when the
Internet was the ARPANET). An Internet Document can be submitted to the IETF by anyone,
but the IETF decides if the document becomes an RFC. Eventually, if it gains enough interest, it
may evolve into an Internet standard.
Each RFC is designated by an RFC number. Once published, an RFC never changes.
Modifications to an original RFC are assigned a new RFC number.
2. The routing tables will become large. A separate routing table entry is needed for each network
resulting in a large number of routing table entries.
• How a large number of IP addresses are wasted using IPv4 address classes?
If a network has slightly more number of hosts than a particular class, then it needs either two IP
addresses of that class or the next class of IP address. For example, let use say a network has 300
hosts, this network needs either a single class B IP address or two class C IP addresses. If class B
address is allocated to this network, as the number of hosts that can be defined in a class B
network is (2^16 - 2), a large number of host IP addresses are wasted. If two class C IP addresses
are allocated, as the number of networks that can be defined using a class C address is only
(2^21), the number of available class C networks will quickly exhaust. Because of the above two
reasons, a lot of IP addresses are wasted and also the available IP address space is rapidly
reduced.
1. IP version 6 (IPv6) or IP next generation (IPng). This is the latest version of IP. This solves a
lot of problems in IPv4. This document doesn't discuss about IPv6.
• What is CIDR?
Classless Inter Domain Routing (CIDR) is a method for assigning IP addresses without using the
standard IP address classes like Class A, Class B or Class C. In CIDR, depending on the number
of hosts present in a network, IP addresses are assigned.
1. What is Ethernet?
Ethernet is a Local Area Network (LAN) cabling and signaling specification for baseband
networks. Ethernet uses a bus or star topology for connecting different nodes in a
network.
2. To which OSI layer does Ethernet belong?
Ethernet belongs to both the Physical Layer (Layer 1) and the Data Link layer (Layer 2)
in the OSI architecture.
3. What are the standard data rates for Ethernet?
The standard data rates for Ethernet are 10 Mbps, 100 Mbps, and 1 Gbps
4. What are the IEEE standards that cover Ethernet?
The following IEEE standards define Ethernet:
5. +--------+----------------------------------------------------+
6. |IEEE | Description |
7. |Standard| |
8. +--------+----------------------------------------------------+
9. |802.2 |Logical Link Control (LLC) Specification. Specifies|
10. | |the general interface between the network layer |
11. | |(IP, IPX, etc) and the data link layer (Ethernet, |
12. | |Token Ring, etc). |
13. +--------+----------------------------------------------------+
14. |802.3 |CSMA/CD Network (Ethernet) Specification. Specifies|
15. | |the frame format, cabling and signaling standards. |
16. +--------+----------------------------------------------------+
Step 1: Before an Ethernet device sends a frame on the Ethernet cable, it listens to
find if another device is already transmitting a frame (Carrier Sense).
Step 2: Once the device finds that other devices are not transmitting any frame, it
starts transmitting the frame. If two devices detect that the Ethernet cable is free at
the same time, then both will start transmitting the frames (Multiple Access). This
will result in collision.
Step 3: The Ethernet devices while transmitting the frames, also listen for the
collision. (Collision Detect).
Step 4: If they detect a collision, both the devices stop sending the frame (back
off).
Step 5: They retry the transmission after a logarithmic time-out period. This
process is repeated till the frame is transmitted successfully, for a maximum of 16
times. The frame is discarded after the 16th retry.
28. +-----------+----------+----------+-----------+----------+
29. |Destination|Source MAC|Frame type|Data | CRC |
30. |MAC Address|Address |(IP, ARP) |(46 to | Checksum |
31. |(6 bytes) |(6 bytes) |(2 bytes) |1500 bytes)| (4 bytes)|
32. +-----------+----------+----------+-----------+----------+
34. +----------+---------+-----------+----------+
35. |802.3 MAC |802.2 LLC|Data | CRC |
36. |Header |Header |(43 to | Checksum |
37. |(14 bytes)|(3 bytes)|1497 bytes)| (4 bytes)|
38. +----------+---------+-----------+----------+
The first two components, MAC Header and LLC Header are further expanded below:
802.3 MAC Header:
+-----------+----------+---------+
|Destination|Source MAC|Length of|
|MAC Address|Address |the frame|
|(6 bytes) |(6 bytes) |(2 bytes)|
+-----------+----------+---------+
40. +----------+---------+----------+-----------+----------+
41. |802.3 MAC |802.2 LLC|802.2 SNAP|Data | CRC |
42. |Header |Header |Header |(38 to | Checksum |
43. |(14 bytes)|(3 bytes)|(5 bytes) |1492 bytes)| (4 bytes)|
44. +----------+---------+----------+-----------+----------+
The 802.2 SNAP header is further expanded below. 802.2 SNAP Header:
+---------------------+---------+
|OUI (Organizationally|Type |
|Unique Id) |(2 bytes)|
|(3 bytes) | |
+---------------------+---------+
50. +-------+-----+
51. |Field |Value|
52. +-------+-----+
53. |SSAP |0xAA |
54. |DSAP |0xAA |
55. |Control|3 |
56. |OUI |0 |
57. +-------+-----+
• What is IP?
Internet Protocol (IP) is an unreliable, best effort delivery, connection-less protocol used for
transmitting and receiving data between hosts in a TCP/IP network.
1. Transmitting data from higher-level protocols like TCP, UDP in IP datagrams, from one
host to another host in the network.
2. Identifying individual hosts in a network using an IP address.
3. Routing datagrams through gateways and
4. Fragmenting and reassembling datagrams based on the MTU of the underlying network.
• What is an IP Datagram?
An IP datagram is a basic unit of information used by the IP layer to exchange data between two
hosts. A IP datagram consists of an IP header and data.
+-------------+
| Version | 4 bits
+-------------+
| IP Header | 4 bits
| Length |
+-------------+
| Type of | 8 bits
| Service |
+-------------+
| Size of the | 16 bits
| Datagram |
+-------------+
| Datagram ID | 16 bits
+-------------+
| Control | 3 bits
| Flags |
+-------------+
| Fragment | 13 bits
| Offset |
+-------------+
| Time to | 8 bits
| Live |
+-------------+
| Protocol | 8 bits
+-------------+
| Header | 16 bits
| Checksum |
+-------------+
| Source IP | 32 bits
| Address |
+-------------+
| Destination | 32 bits
| IP Address |
+-------------+
| Options | Variable Length
+-------------+
+-----------+-----------------------------------------------------+
| Version | IP protocol version. For IPv4, this value is 4. |
+-----------+-----------------------------------------------------+
| IP Header | Length of the IP header in multiples of |
| Length | 32-bit words. |
+-----------+-----------------------------------------------------+
| Type of | Quality of Service(QOS) requested for this datagram.|
| Service | |
| (TOS) | |
+-----------+-----------------------------------------------------+
| Datagram | Length of the entire datagram in bytes, including |
| Size | the header and the payload. |
+-----------+-----------------------------------------------------+
| Datagram | Current datagram identifier. |
| ID | |
+-----------+-----------------------------------------------------+
| Control | Bit 0: Reserved |
| Flags | Bit 1: 0 - Allow fragment, 1 - Don't fragment. |
| | Bit 2: 0 - Last fragment, 1 - More fragments. |
+-----------+-----------------------------------------------------+
| Fragment | Specifies the offset in the original IP datagram, |
| Offset | where this fragment begins. This is a multiple of |
| | 32 bit words. |
+-----------+-----------------------------------------------------+
| Time to | The time upto which this datagram can live in the |
| Live | network. |
| (TTL) | |
+-----------+-----------------------------------------------------+
| Protocol | Indicates to which upper-layer protocol layer this |
| | datagram should be delivered. e.g. TCP, UDP |
+-----------+-----------------------------------------------------+
| Header | IP header checksum. |
| Checksum | |
+-----------+-----------------------------------------------------+
| Source IP | IP address of the source host sending this IP |
| Address | datagram. |
+-----------+-----------------------------------------------------+
| Target IP | IP address of the destination host to which this |
| Address | IP datagram must be delivered. |
+-----------+-----------------------------------------------------+
| Options | Used for timestamps, security, source routing, etc. |
+-----------+-----------------------------------------------------+
• What is the byte order used for transmitting datagram headers in the TCP/IP protocol
suite?
All the datagram headers in the TCP/IP protocol suite are transmitted in the "big endian" byte
order. i.e. The most significant byte is transmitted first. This is also called as "network byte
order".
• Why there are two length fields (IP header length, IP datagram length) in the IP header?
The size of the IP header is not fixed. Depending on the IP options present, the size of the IP
header will vary. A separate field for the IP header length is added, so that the destination system
can separate the IP datagram header from the payload.
• What are the different types of criteria can be specified using the TOS field?
The different types of criteria that can be specified by the TOS field in an IP datagram are:
1. Minimize delay,
2. Maximize throughput
3. Maximize reliability
4. Minimize cost and
5. Normal service.
• What is the use of the Time To Live (TTL) field in the IP header?
The TTL field is used to limit the lifetime of a IP datagram and to prevent indefinite looping of
IP datagrams.
• What is an IP address?
IP address is an network layer protocol address for a host in a TCP/IP network.
• Is there any relation between the MAC address and IP address of a host?
No. There is no relation between the MAC address and the IP address of a host.
• Can a single network interface have more than one IP address associated with it?
Yes. It is possible to associate more than one IP address to a single network interface. This is
discussed in detail in RFC 1122.
1. Class A
2. Class B
3. Class C
4. Class D
5. Class E
• How to determine the class of an IP address?
The class of an IP address can be determined from the first four bits of the first byte of the IP
address.
• How many bytes does each Class of IP address use to represent network and host IDs?
The number of bytes used by each network Class to represent the network and host are shown
below:
+----------+----------------+----------------+
|IP Address| Bytes used for | Bytes used for |
|Class | Network ID | Host ID |
+----------+----------------+----------------+
| Class A | 1 | 3 |
| Class B | 2 | 2 |
| Class C | 3 | 1 |
| Class D | - | - |
| Class E | - | - |
+----------+----------------+----------------+
+----------+-------------------------------------+
|IP Address| IP Address format |
|Class | |
+----------+-------------------------------------+
| Class A | 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH |
| Class B | 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH |
| Class C | 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH |
| Class D | 1110MMMM.MMMMMMMM.MMMMMMMM.MMMMMMMM |
| Class E | 1111RRRR.RRRRRRRR.RRRRRRRR.RRRRRRRR |
+----------+-------------------------------------+
• How many number of networks and hosts can be represented using the IP address
classes?
The maximum number of networks and hosts that can be represented using the various IP
address classes is shown below in the table:
+----------+----------------+---------------------+
|IP Address| Maximum number | Maximum number of |
|Class | of networks | hosts per network |
+----------+----------------+---------------------+
| Class A | 126 (2^7 - 2) | 16777214 (2^24 - 2) |
| Class B | 16384 (2^14) | 65534 (2^16 - 2) |
| Class C | 2097152 (2^21) | 254 (2^8 - 2) |
| Class D | - | - |
| Class E | - | - |
+----------+----------------+---------------------+
1. The numbers are calculated using the number of bits used to represent the network ID
and host ID.
2. The maximum number of networks for Class A IP address is reduced by 2 to account for
the reserved network IP address 0.xxx.xxx.xxx and 127.xxx.xxx.xxx
3. The maximum number of hosts for all the classes is reduced by 2 to account for the
reserved host IP address in which all the host ID address bits are either one or zero.
+----------+-----------------------------------+
|IP Address| Possible range of IP address |
|Class | |
+----------+-----------------------------------+
| Class A | 0.0.0.0 through 127.255.255.255 |
| Class B | 128.0.0.0 through 191.255.255.255 |
| Class C | 192.0.0.0 through 223.255.255.255 |
| Class D | 224.0.0.0 through 239.255.255.255 |
| Class E | 240.0.0.0 through 247.255.255.255 |
+----------+-----------------------------------+
• Does the maximum number of hosts in a network, restrict the class of IP address that can
be used for the network?
No. Any possible class of IP address can be used to represent a network. For example, if a
network has 200 hosts, it can use either a class A or class B or class C IP address.
• What are the various special IP addresses?
The various special IP address are shown below in the table:
+----------------+-------------------------------------------------+
|IP Address | Description |
+----------------+-------------------------------------------------+
|0.0.0.0 | Local host. |
+----------------+-------------------------------------------------+
|127.xxx.xxx.xxx | Local loopback address. The value of the last |
| | 3 bytes are ignored. The datagram with this IP |
| | address is never transmitted over the network. |
+----------------+-------------------------------------------------+
|xxx.0.0.0 | Local host IP address. The x represents the |
|xxx.xxx.0.0 | network ID bits. |
|xxx.xxx.xxx.0 | |
+----------------+-------------------------------------------------+
|0.xxx.xxx.xxx | IP address of a host in the local network. The |
|0.0.xxx.xxx | x represents the host ID bits. |
|0.0.0.xxx | |
+----------------+-------------------------------------------------+
|255.255.255.255 | Limited Broadcast address. Datagram with this |
| | address will be received and processed by all |
| | the hosts in the local network. This datagram |
| | is not forwarded to other networks by routers. |
+----------------+-------------------------------------------------+
|xxx.255.255.255 | Directed broadcast address. The datagram with |
|xxx.xxx.255.255 | this IP address is received by all the hosts in |
|xxx.xxx.xxx.255 | the specified network. The x represents the |
| | network ID bits. |
+----------------+-------------------------------------------------+
• What happens when a datagram must be fragmented to traverse a network, but the
"don't fragment" flag in the datagram is set?
The datagram whose "don't fragment" flag is set is discarded, if it must be fragmented to traverse
a network. Also, a ICMP error message is sent back to the sender of the datagram.
• Will all the fragments of a datagram reach the destination using the same path?
The different fragments of the same IP datagram can travel in either in the same path or in
different paths to the destination.
• Will all the fragments of a datagram arrive at the destination system in the correct order?
The different fragments of a single IP datagram can arrive in any order to the destination system.
• What happens to the original IP datagram when one or more fragments are lost?
When one or more fragments of an IP datagram are lost, then the entire IP datagram is discarded
after a timeout period.
• How is the length of a complete IP datagram calculated from the received IP fragments?
Using the fragment offset field and the length of the last fragment, the length of a complete IP
datagram is calculated.
1. The IP layer creates two new IP datagrams, whose length satisfies the requirements of the
network in which the original datagram is going to be sent.
2. The IP header from the original IP datagram is copied to the two new datagrams.
3. The data in the original IP datagram is divided into two on an 8 byte boundary. The
number of 8 byte blocks in the first portion is called Number of Fragment Blocks (NFB).
4. The first portion of the data is placed in the first new IP datagram.
5. The length field in the first new IP datagram is set to the length of the first datagram.
6. The fragment offset field in the first IP datagram is set to the value of that field in the
original datagram.
7. The "more fragments" field in the first IP datagram is set to one.
8. The second portion of the data is placed in the second new IP datagram.
9. The length field in the second new IP datagram is set to the length of the second
datagram.
10. The "more fragments" field in the second IP datagram is set to the same value as the
original IP datagram.
11. The fragment offset field in the second IP datagram is set to the value of that field in the
original datagram plus NFB.
1. When a host receives an IP fragment, it stores the fragment in a reassembly buffer based
on its fragment offset field.
2. Once all the fragments of the original IP datagram are received, the datagram is
processed.
3. Upon receiving the first fragment, a reassembly timer is started.
4. If the reassembly timer expires before all the fragments are received, the datagram is
discarded.
• What fields are changed in an IP header due to fragmentation?
The following IP header fields are changed due to IP fragmentation:
1. Total Length
2. Header Length
3. More Fragments Flag
4. Fragment Offset
5. Header Checksum
6. Options
• What is RARP?
Reverse Address Resolution Protocol (RARP) is a network protocol used to resolve a data link
layer address to the corresponding network layer address. For example, RARP is used to resolve
a Ethernet MAC address to an IP address.
• Where is the mapping between the MAC address and IP addresses stored in a RARP
server?
The mapping between MAC addresses and IP addresses is usually stored in a configuration file
in the local hard disk in the RARP server.
• Can RARP be used in a network other than Ethernet?
Yes. RARP is a general protocol, which can be used to map any type of hardware MAC address
to any type of network layer protocol address.
1. The MAC address in the request packet is looked up in the configuration file and mapped
to the corresponding IP address.
2. If the mapping is not found, the packet is discarded.
3. If the mapping is found, a RARP reply packet is generated with the MAC and IP address.
This packet is sent to the host, which originated the RARP request.
+--------+
|Hardware| 2 bytes
|MAC |
|Address |
|Type |
+--------+
|Protocol| 2 bytes
|Address |
|Type |
+--------+
|Hardware| 1 byte
|MAC |
|Address |
|Size |
+--------+
|Protocol| 1 byte
|Address |
|Size |
+--------+
|Op | 2 bytes
+--------+
|Sender | 6 bytes (depends on the above size field)
|MAC |
|Address |
+--------+
|Sender | 4 bytes (depends on the above size field)
|IP |
|Address |
+--------+
|Target | 6 bytes (depends on the above size field)
|MAC |
|Address |
+--------+
|Target | 4 bytes (depends on the above size field)
|IP |
|Address |
+--------+
+---------+-------------------------------------------------------+
|Ethernet |For a RARP request, source MAC address is the MAC |
|Header |address of the host sending the RARP request, |
| |destination MAC address is the Ethernet broadcast |
| |address (FF:FF:FF:FF:FF:FF), frame type field is 0x8035|
| |For RARP reply, source MAC address is the MAC address |
| |of the RARP server replying to the RARP request, |
| |destination MAC address is the MAC address of the host |
| |that sent the RARP request, and the frame type field is|
| |0x8035. |
+---------+-------------------------------------------------------+
|Hardware |Type of the hardware MAC address present in the packet.|
|Address |For Ethernet the value of this field is 1. |
|Type | |
+---------+-------------------------------------------------------+
|Protocol |Type of the protocol address requested for the MAC |
|Address |address. For IP address the value of this field is |
|Type |0x800. |
+---------+-------------------------------------------------------+
|Hardware |Size of the hardware MAC address. For Ethernet, the |
|Address |value of this field is 6. |
|Size | |
+---------+-------------------------------------------------------+
|Protocol |Size of the protocol address. For IP, the value of |
|Address |this field is 4. |
|Size | |
+---------+-------------------------------------------------------+
|Operation|Type of operation being performed. The value of this |
| |field can be 3 (RARP request) or 4 (RARP reply). |
+---------+-------------------------------------------------------+
|Source |In a RARP request packet, this is the hardware MAC |
|MAC |address of the source host. In a RARP reply packet, |
|address |this is the hardware MAC address of the RARP server |
| |sending the RARP reply. |
+---------+-------------------------------------------------------+
|Source |In a RARP request packet, this is undefined. In a |
|IP |RARP reply packet, this is the IP address of the RARP |
|address |server sending the RARP reply. |
+---------+-------------------------------------------------------+
|Target |In a RARP request packet, this is the hardware MAC |
|MAC |address of the source host. In a RARP reply packet, |
|address |this is the hardware MAC address of the host, that sent|
| |the RARP request packet. |
+---------+-------------------------------------------------------+
|Target |In a RARP request packet, this is undefined. In a RARP |
|IP |reply packet, this is the IP address of the host |
|address |that sent the RARP request packet. |
+---------+-------------------------------------------------------+
• Is the format of a RARP request packet the same as that of a RARP reply packet?
Yes. The packet format of a RARP request packet is same as that of a RARP reply packet.
• What are the values for the source and destination IP address fields in a RARP request
packet?
In an RARP request packet, the source and destination IP address values are undefined.
• What are the values for the source and destination IP address values in a RARP reply
packet?
In a RARP reply packet, the source IP address is the IP address of the RARP server responding
to the RARP request and the destination IP address is the IP address of the host that sent the
RARP request.
• What will happen if more than one RARP server in a network responds to a RARP
request?
If more than one RARP server respond to a RARP request, then only the first RARP reply
received is used. All other replies are discarded.
• What will happen if a RARP reply is not received for a RARP request?
If a RARP reply is not received within a reasonable amount of time, the host, which sent the
RARP request, will not be able to complete its booting sequence. Usually the host will again
retry sending the RARP request after a timeout period.
• What is an IP sub-network?
A single IP class A, B, or C network is further divided into a group of hosts to form an IP sub-
network.
• How to determine to the network ID, sub-network ID and the host ID, given the IP
address and the subnet mask?
The network class (A or B or C) of a given IP address can be easily determined by looking at the
value of the first 4 bits of the first byte. From the network class, the number of bytes used to
represent the network can be determined and hence the network ID can be determined. By
performing a "AND" logical operation of the IP address and the subnet mask, the sub-network
ID can be determined. In the value resulting from the "AND" operation, by removing the bytes
used for the network ID, the remaining bits for which the corresponding bit in the subnet mask is
one, represents the sub-network ID.
• Is it necessary for hosts in a network "M" to know about the subnetworks in another
network "N" to communicate with hosts in that network?
No. Subnetworks in one network are transparent to hosts in another network.
Example 1:
For example, let us say the IP address is 100.24.124.27 and the subnet mask is 255.255.0.0. As
the most significant bit in the first byte of the IP address is zero, this is a Class A IP address.
Therefore, the first byte represents the network ID. In this case, the network ID is 100. The result
of a logical AND operation between the IP address and the subnet mask is 100.24.0.0. In this
value, the first byte represents the network ID. For all the remaining one bit in the subnet mask,
the corresponding bit in the IP address, represents the sub-network ID. In this case it is 24. The
remaining bits in the IP address represent the host ID. In this case it is 124.27.
Example 2:
IP Address: 187.199.127.5
Sub-net mask: 255.255.255.0
Network Class: B
Network ID: 187.199
Result of logical AND operation: 187.199.127
Sub-network ID: 127
Host ID: 5
Example 3:
IP Address: 187.199.127.5
Sub-net mask: 255.255.240.0
Network Class: B
Network ID: 187.199
Result of logical AND operation: 187.199.112.0
Sub-network ID: 112
Host ID: 15.5
Example 4:
IP Address: 187.199.127.5
Sub-net mask: 255.255.128.0
Network Class: B
Network ID: 187.199
Result of logical AND operation: 187.199.0.0
Sub-network ID: 0
Host ID: 127.5
255.128.0.0
255.192.0.0
255.224.0.0
255.240.0.0
255.248.0.0
255.252.0.0
255.254.0.0
255.255.0.0
255.255.128.0
255.255.192.0
255.255.224.0
255.255.240.0
255.255.248.0
255.255.252.0
255.255.254.0
255.255.255.0
255.255.255.128
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252
1. Static length
2. Variable length