0% found this document useful (0 votes)
29 views10 pages

AN Assignment 1 2023

The document provides information about classful IP addressing and the Address Resolution Protocol (ARP). It defines key terms like IP address, multi-homed hosts, and multicasting. It then explains the classful addressing scheme, including Class A, B, C, D and E addresses. It also describes ARP and the ARP cache, noting that ARP maps IP addresses to MAC addresses and the cache optimizes communication by storing these mappings.

Uploaded by

khurs195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views10 pages

AN Assignment 1 2023

The document provides information about classful IP addressing and the Address Resolution Protocol (ARP). It defines key terms like IP address, multi-homed hosts, and multicasting. It then explains the classful addressing scheme, including Class A, B, C, D and E addresses. It also describes ARP and the ARP cache, noting that ARP maps IP addresses to MAC addresses and the cache optimizes communication by storing these mappings.

Uploaded by

khurs195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MCA-14: Advanced Networking MCA Semester - I

S. K. Patel Institute of Management & Computer Studies


Master in Computer Application (MCA)
Semester – I
ASSIGNMENT - 1
Subject Code : MCA 14
Subject Name : Advanced Networking

Chapter: Classful Internet Addresses


Q-1. Define the following terms:
a) IP address:- IP stands for "Internet Protocol address," is a numerical label assigned to each
device connected to a computer network that uses the Internet Protocol for communication
(b) multi homed hosts:-Multi-homing is a method of configuring one computer, called the host,
with more than one network connection and IP address.
(c) multicasting:- multicast is group communication where data transmission is addressed to a
group of destination computers simultaneously. Multicast can be one-to-many or many-to-many
distribution.
Q-2. Explain in detail the classful addressing scheme of IP addresses.
ANSWER:-The first eight bits of an IP address formerly identified the network that a particular host
belonged to. This is known as classful addressing.

An IP address is 32-bit long. An IP address is divided into sub-classes:

● Class A Addresses (1.0.0.0 to 126.0.0.0):


○ Class A addresses were used for large networks. The first bit of a Class A address is
always set to 0, which means the range for the first octet is 0 to 127.
○ The format of a Class A address is N.H.H.H, where N is the network portion, and H.H.H
represents the host portion.
○ There were 128 possible Class A networks, with each network having 16,777,214 (2^24 -
2) host addresses.
○ Class A addresses were often assigned to organizations or entities that required a large
number of hosts.
● Class B Addresses (128.0.0.0 to 191.0.0.0):
○ Class B addresses were used for medium-sized networks. The first two bits of a Class B
address are 10, which means the range for the first octet is 128 to 191.
○ The format of a Class B address is N.N.H.H, where N.N is the network portion, and H.H
represents the host portion.
○ There were 16,384 possible Class B networks, with each network having 65,534 (2^16 -
2) host addresses.
○ Class B addresses were assigned to organizations that needed a substantial number of
host addresses.
● Class C Addresses (192.0.0.0 to 223.0.0.0):
○ Class C addresses were used for smaller networks. The first three bits of a Class C
address are 110, which means the range for the first octet is 192 to 223.
○ The format of a Class C address is N.N.N.H, where N.N.N is the network portion, and H
represents the host portion.
○ There were 2,097,152 possible Class C networks, with each network having 254 (2^8 - 2)
host addresses.
○ Class C addresses were commonly allocated to small organizations or businesses.
● Class D Addresses (224.0.0.0 to 239.0.0.0):
○ Class D addresses are reserved for multicast groups and are not used for traditional
unicast communication. Multicast allows data to be sent to multiple recipients
simultaneously.
● Class E Addresses (240.0.0.0 to 255.0.0.0):
○ Class E addresses are reserved for experimental or research purposes and are not
intended for regular use on the public internet.

Q-3. What is Loopback Address?


ANSWER:- The IP address 127.0. 0.1 is called a loopback address. Packets sent to this address
never reach the network but are looped through the network interface card only. This can be used for
diagnostic purposes to verify that the internal path through the TCP/IP protocols is working.
Q-4. Answer the following –
1. Datagrams in network are send through ____________ paths. (Dependent / Independent) 2. When the
hop-count field reaches zero and destination has not been reached, the datagram is ________. (sent /
discarded / updated).
3. Length of IP address is 4 to 16 octets and length of MAC address is 6 octets. 4. IP address
in a network _______ be duplicated. (can / cannot)
5. A host with IP address 128.23.67.3 sends a message to a host with IP address 128.45.23.7 does the
message travel through any router? (Yes / No)
6. An IP datagram arrives whose fragmentation offset is 0 and the M bit (More Fragment Bit) is 0. Is this a
fragment? (Yes / No)
7. Find the error if any in the following IP addresses:
a. 225.34.7.6.25
b. 75.55.401.14
Both of the provided IP addresses have errors:
a. 225.34.7.6.25
- This IP address has too many segments. An IPv4 address should consist of four segments
separated by periods. In this case, there are five segments, which makes it invalid.
b. 75.55.401.14
- The third segment, "401," is out of the valid range for an IPv4 address segment. Each segment of
an IPv4 address should be a decimal number between 0 and 255. "401" is greater than 255, so this is
an invalid segment.
To correct these errors:
a. If you intended to provide a valid IPv4 address, you should remove the extra segment (the ".25" at
the end).
b. If you intended to provide a valid IPv4 address, you should replace "401" with a number between
0 and 255 in the third segment, such as "75.55.100.14."
Valid IPv4 addresses have four segments, each containing a decimal number from 0 to 255,
separated by periods.
8. Find the class of each of the addresses:
a. 10000001 00001011 00001011 11101111

● The first bit is 1, which falls under Class A.


● So, this address belongs to Class A.

b. 11000111 11011011 10001011 01101111

● The first two bits are 11, which falls under Class C.
● So, this address belongs to Class C.

9. TTL stands for TIME TO LIVE.


10. 1 flag controls the presence of fragmentation.

Dr. Rakesh Bhatnagar, Associate Professor, SKPIMCS Page 1


MCA-14: Advanced Networking MCA Semester - I
Chapter: Mapping Internet Addresses to Physical Addresses (ARP)
Q-5. Describe ARP and write in brief about ARP cache.
ANSWER:-
ARP, which stands for Address Resolution Protocol, is a crucial networking
protocol used in local area networks (LANs) to map an IP address to a physical
(MAC) address. This protocol is essential for the proper functioning of
Ethernet-based networks. Here's how ARP works:
1. IP-to-MAC Address Resolution: When a device on a network wants to
communicate with another device, it often knows the target's IP address but needs
the MAC address to send data packets on the local network. ARP helps in this
process.
2. ARP Request: If a device needs to discover the MAC address associated with a
specific IP address, it broadcasts an ARP request packet on the local network. This
ARP request contains the sender's IP and MAC address, the target IP address, and a
placeholder for the target's MAC address.
3. ARP Reply: The device with the requested IP address, upon receiving the ARP
request, replies with an ARP reply packet. This reply contains its MAC address,
allowing the requesting device to create an ARP cache entry.
Now, let's discuss the ARP cache:

ARP Cache:
An ARP cache, also known as an ARP table or ARP cache table, is a data structure
maintained by network devices, such as computers, routers, and switches, to store
recently resolved ARP entries. The ARP cache is used to optimize network
communication by avoiding repetitive ARP requests and responses for frequently
accessed devices.
Here are some key points about the ARP cache:
1. Temporary Storage: When a device resolves an IP address to a MAC address
through ARP, it stores this mapping in its ARP cache. This entry typically has a
time-to-live (TTL) associated with it, after which it expires.
2. Efficiency: ARP caches are crucial for network efficiency. Instead of
broadcasting ARP requests every time a device needs to communicate with another
on the local network, it can check its ARP cache first. If the required mapping is
present and valid, it can use the MAC address directly.
3. Dynamic Updates: ARP cache entries are dynamic and can change over time. If
a device's IP address or MAC address changes, the corresponding ARP cache entry
will be updated accordingly.
4. Security Implications: Attackers can manipulate ARP caches through techniques
like ARP poisoning or ARP spoofing to redirect network traffic. This can lead to
security vulnerabilities, so ARP cache security is important in network
management.

In summary, ARP is a protocol that allows devices on a local network to discover


each other's MAC addresses when they know the IP addresses. The ARP cache is a
data structure that stores these mappings for efficiency and is a fundamental
component of Ethernet-based network communication.

Q-6. Explain the ARP message format.


ANSWER:-
ARP (Address Resolution Protocol) messages are used for resolving an IP address to a MAC (Media Access
Control) address in a local network. ARP messages have a specific format that consists of various fields. Here
is an explanation of the ARP message format:
1. Hardware Type (HTYPE): This field identifies the type of network hardware being used, such as Ethernet
(1), Wi-Fi (6), or others. It helps the receiving device understand the format of the MAC address.
2. Protocol Type (PTYPE): This field specifies the type of network layer protocol being used. For IP addresses,
this value is typically set to 0x0800 (IPv4) or 0x86DD (IPv6).
3. Hardware Address Length (HLEN): This field indicates the length, in bytes, of the hardware (MAC) address.
For Ethernet, this is usually set to 6, as MAC addresses are 6 bytes long.
4. Protocol Address Length (PLEN): This field specifies the length, in bytes, of the network layer (IP) address.
For IPv4, this is set to 4, while for IPv6, it is set to 16.
5. Operation Code (OPCODE): This field indicates the type of ARP message being sent. Common values
include:
- 1: ARP Request
- 2: ARP Reply
- 3: RARP (Reverse ARP) Request
- 4: RARP Reply
- 5: InARP (Inverse ARP) Request
- 6: InARP Reply

6. Sender Hardware Address (SHA): This field contains the MAC address of the sender of the ARP message.
7. Sender Protocol Address (SPA): This field contains the IP address of the sender of the ARP message.
8. Target Hardware Address (THA): This field is typically left empty (all zeros) in ARP Request messages. In
ARP Reply messages, it contains the MAC address of the target device.
9. Target Protocol Address (TPA): This field contains the IP address for which the sender is seeking the
corresponding MAC address.
The entire ARP message is encapsulated within an Ethernet frame when used in an Ethernet-based network.
The Ethernet frame includes the source and destination MAC addresses, an EtherType field indicating that it's
an ARP message, and the ARP message itself.

ARP messages play a critical role in local network communication by enabling devices to resolve the MAC
addresses of other devices based on their IP addresses, facilitating data packet transmission within the network.
Chapter: Internet Protocol
Q-7. Describe the following terms:
a) MTU:-MTU, or Maximum Transmission Unit, is the largest packet size a
network can handle without breaking it into smaller pieces. Different
networks have their own maximum sizes. When data is too big for a
network's MTU, it gets divided, which can slow things down. It's important to
set the right MTU size for efficient communication.

(c) Fragmentation:-IP fragmentation is an Internet Protocol (IP) process that


breaks packets into smaller pieces (fragments), so that the resulting pieces
can pass through a link with a smaller maximum transmission unit (MTU)
than the original packet size. The fragments are reassembled by the
receiving host.

(e) Direct and Indirect Delivery:-Delivery probability consists of direct delivery


where the relay node encounters the destination node directly and indirect
delivery is the probability where nodes within the contact set of the relay
node meet the destination node.

b) Next-Hop Routing:-Next-hop routing is a method used by network devices, like


routers, to figure out where to send data packets. They do this by looking up the
destination address in a table and finding the next device (next hop) the packet
should be sent to. This helps data find its way to its final destination through a
series of hops. It's dynamic, which means it can adapt to changes in the network.
(d) Default Routes:-A default route is the route that takes effect when no
other route is available for an IP destination address. If a packet is received
on a routing device, the device first checks to see if the IP destination
address is on one of the device's local subnets.

(f) Routing Table:-Network devices like routers maintain routing tables that
store information about the available network paths.
Q-8. Describe the IP datagram format.
ANSWER:-
An IP datagram is the basic unit of data in the Internet Protocol (IP) suite, which is used for sending data across
computer networks, including the internet. The IP datagram format consists of various fields that contain
information necessary for routing and delivering data from the source to the destination. Here is a simplified
description of the key fields in an IPv4 datagram:
1. Version: This field indicates whether the datagram is using IPv4 (value 4) or IPv6 (value 6). In an IPv4
datagram, this field is set to 4.
2. Header Length (IHL): IHL specifies the length of the IP header in 32-bit words. It is needed to know where
the data payload begins. Common values are 5 (for no options) or higher if additional options are present.
3. Type of Service (ToS): This field is used to indicate the quality of service requested for the datagram, such as
priority or reliability. In practice, it is rarely used or replaced with Differentiated Services (DiffServ) markings.
4. Total Length: This 16-bit field specifies the total length of the IP datagram, including both the header and the
data payload. It ranges from 20 bytes (minimum header size) to 65,535 bytes (maximum size for IPv4).
5. Identification: This field is used for uniquely identifying a datagram. It helps in reassembly of fragmented
datagrams, if fragmentation is necessary.
6. Flags and Fragment Offset: These fields are used for fragmentation and reassembly. The Flags field includes
a "Don't Fragment" (DF) bit and a "More Fragments" (MF) bit, while the Fragment Offset specifies the position
of a fragment within the original datagram.
7. Time to Live (TTL): TTL is a counter that decrements by one each time the datagram is forwarded by a
router. If TTL reaches zero, the datagram is discarded to prevent it from circulating indefinitely in the network.
8. Protocol: This field identifies the higher-level protocol (e.g., TCP, UDP, ICMP) to which the data payload
belongs.
9. Header Checksum: The header checksum is used for error-checking the IP header. It ensures the integrity of
the header during transmission.
10. Source IP Address: This 32-bit field contains the IP address of the sender (source) of the datagram.
11. Destination IP Address: This 32-bit field contains the IP address of the intended recipient (destination) of
the datagram.
12. Options: This field is optional and may contain various control and configuration information. It is rarely
used and can be omitted for simplicity.
13. Data Payload: This is where the actual data being transmitted is located. Its size varies depending on the
"Total Length" field.
The IP datagram is a fundamental building block of internet communication, helping devices route and deliver
data across networks. While this description is based on IPv4, IPv6 datagrams have a different format but serve
a similar purpose, allowing for more addresses and improved functionality.
Q-9. Which are the fields in an IP datagram format that controls fragmentation? Explain the fields.

ANSWER:-

In an IP datagram, several fields are responsible for controlling fragmentation. Fragmentation is the
process of breaking up a large IP datagram into smaller fragments when it needs to traverse a
network with a smaller Maximum Transmission Unit (MTU). The key fields that control
fragmentation in an IPv4 datagram are as follows:

1. **Flags:**

- The Flags field is a 3-bit field within the IP header.

- It contains two control bits:

- Bit 0: Reserved, must be set to 0.

- Bit 1: Don't Fragment (DF) bit, which, when set to 1, indicates that the datagram must not be
fragmented. If a router along the path encounters a datagram with the DF bit set and needs to
fragment it, the router discards the datagram and sends an ICMP "Destination Unreachable"
message back to the sender.

2. **Fragment Offset:**

- The Fragment Offset field is a 13-bit field in the IP header.

- It specifies the position of the fragment in the original datagram. This field is used to reassemble
the fragments correctly at the destination.

- The offset is measured in units of 8 bytes, so if the offset is set to 2, it means the fragment starts
at byte 16 in the original datagram.

3. **More Fragments (MF) bit:**

- The MF bit is the 1-bit flag in the IP header.

- It indicates whether there are more fragments to follow. When set to 1, it means there are
additional fragments, and the destination should expect more fragments. When set to 0, it means it is
the last fragment.

When a large datagram encounters a router with a smaller MTU, it needs to be fragmented into
smaller pieces. The router sets the MF bit to 1 for the first fragment and provides the appropriate
offset. Subsequent fragments also have the MF bit set to 1 and appropriate offsets until the final
fragment, where the MF bit is set to 0.
At the receiving end, the fragments are reassembled in the correct order using the Fragment Offset
field to ensure that the original datagram is reconstructed accurately. If the DF bit is set, and a router
along the path can't forward the datagram without fragmentation, it discards the datagram and sends
an ICMP message back to the sender, indicating that the datagram was too large and could not be
fragmented.

Q-10. Describe the routing algorithm.


Dr. Rakesh Bhatnagar, Associate Professor, SKPIMCS Page 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy