Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Harsh_ACN_Lab_10

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

Dharmsinh Desai University, Nadiad

Faculty of Technology
Department of Computer Engineering
M. Tech – CE, Semester: I
Subject: Advanced Computer Network

Lab 10

Aim: Analyze ARP, RARP, ICMP, IGMP


(1) Analyze the headers of ARP, RARP, ICMP and IGMP using wireshark tool.
Apply filtering using wire shark.
Write a brief about each protocol and draw header format for each of the above
protocol and explain each field. Explain different filter options.

Brief About Each Protocol

1. ARP (Address Resolution Protocol):


○ ARP is used to map an IP address to a physical (MAC) address
within a local network.
○ Operates at the Data Link Layer (Layer 2).
○ Commonly used when a device sends an IP packet and needs the
recipient's MAC address.
CMD Command :- ping www.microsoft.com

Address Resolution Protocol (reply)

Hardware type: Ethernet (1)

Protocol type: IPv4 (0x0800)

Hardware size: 6

Protocol size: 4

Opcode: reply (2)

Sender MAC address: 1a:3c:51:dc:f0:78 (1a:3c:51:dc:f0:78)

Sender IP address: 192.168.117.33

Target MAC address: d6:55:bb:d7:25:7f (d6:55:bb:d7:25:7f)

Target IP address: 192.168.117.190


2. RARP (Reverse Address Resolution Protocol):
○ Reverse of ARP; maps a MAC address to an IP address.
○ Used by diskless devices to obtain their IP address from a server.
○ Rarely used today, replaced by protocols like DHCP.
3. ICMP (Internet Control Message Protocol):
○ Used to send error messages and operational information, e.g.,
destination unreachable or ping (echo request/reply).
○ Operates at the Network Layer (Layer 3).
○ Essential for diagnosing network issues

Inspect ICMP Packets

● Look for ICMP Packets:


○ ICMP packets will appear as either "Echo Request" (Type 8) or
"Echo Reply" (Type 0) in Wireshark.
○ Packet Details: Click on a packet to expand its details in the middle
panel. You'll see fields like:
■ Type: Indicates the ICMP message type (e.g., Echo Request
= 8, Echo Reply = 0).
■ Code: Provides additional information about the message
(e.g., 0 for Echo Request and Echo Reply).
■ Checksum: Used for error-checking the message.
■ Identifier: Typically used to match requests and replies
(relevant in ping).
■ Sequence Number: Used to differentiate between multiple
Echo Requests.
Internet Control Message Protocol

Type: 8 (Echo (ping) request)

Code: 0

Checksum: 0x4d46 [correct]

[Checksum Status: Good]

Identifier (BE): 1 (0x0001)

Identifier (LE): 256 (0x0100)

Sequence Number (BE): 21 (0x0015)

Sequence Number (LE): 5376 (0x1500)

[Response frame: 1108]

Data (32 bytes)

Data:
6162636465666768696a6b6c6d6e6f7071727374757677616263646566676869

[Length: 32]

.
4. IGMP (Internet Group Management Protocol):
○ Manages membership of devices in multicast groups.
○ Operates at the Network Layer (Layer 3).
○ Enables efficient delivery of multicast traffic like video streams to
multiple devices.

Command:-
ping www.microsoft.com

Max Response Time – This field is ignored for message types other than
membership query. For membership query type, it is the maximum time
allowed before sending a response report. The value is in units of 0.1
seconds.
● Checksum – It is the one’s complement of the one’s complement of

the sum of IGMP message.

● Group Address – It is set as 0 when sending a general query.

Otherwise, multicast address for group-specific or source-specific

queries.
● Resv – It is set zero of sent and ignored when received.

● S flag – It represents Suppress Router-side Processing flag. When

the flag is set, it indicates to suppress the timer updates that

multicast routers perform upon receiving any query.

● QRV – It represents Querier’s Robustness Variable. Routers keeps

on retrieving the QRV value from the most recently received query

as their own value until the most recently received QRV is zero.

● QQIC – It represents Querier’s Query Interval Code.

● Number of sources – It represents the number of source addresses

present in the query. For general query or group-specific query, this

field is zero and for group-and-source-specific query, this field is

non-zero.

● Source Address[i] – It represents the IP unicast address for N fields.


(2) Introduction to Network simulator 2 (NS2) architecture and its usage.

1. Introduction to NS2

NS2 is a discrete event simulator designed for networking research. It models various types of
network protocols, including TCP, UDP, routing, and multicast protocols, and supports both
wired and wireless network simulations. It is built using two languages:

● OTcl (Object Tool Command Language): Used for configuration and scripting.
● C++: Implements the core of the simulator for efficiency.

NS2 enables researchers to test and evaluate network protocols in a simulated environment,
saving time and resources.

2. Architecture of NS2

NS2 follows a modular architecture, consisting of several key components:

1. Simulation Kernel (C++):


○ Manages event scheduling and execution.
○ Handles packet generation, queuing, and protocol logic.
2. OTcl Interpreter:
○ Acts as a user interface.
○ Configures simulation scenarios, topology, and traffic models using Tcl scripts.
3. Libraries:
○ Provide modules for various protocols, topologies, and network components.
4. NAM (Network Animator):
○ Visualizes simulation traces.
○ Helps analyze traffic and node interactions.

The architecture bridges C++ (for speed) and OTcl (for ease of scripting).

3. Downloading and Installing NS2

● Recommended Package: Use the "all-in-one" package to simplify installation. It


includes necessary components like Tcl, OTcl, and NAM.
● Platforms Supported: Primarily Unix/Linux systems. Windows users may need tools
like Cygwin or WSL.
● Installation Steps:
1. Download the all-in-one package from the NS2 download page.
2. Extract, configure, and compile the source code using commands like
./install.
Ensure environment variables like PATH and LD_LIBRARY_PATH are set correctly after
installation.

4. Running a Simulation

1. Creating a Simulation Script:


○ Write a Tcl script that defines the network topology, traffic, and events.
2. Executing the Script:
○ Use the command: ns <filename>.tcl where <filename> is the name of
the script.
3. Visualizing with NAM:
○ If your script includes visualization, a NAM window will open to display node
movement and packet flows.

5. Using NAM

● Command: nam <filename>.nam


● NAM allows visualization of node interactions and traffic flows in real-time, making it
easier to debug and analyze results.

6. Extending NS2

Advanced users can modify or extend NS2 by:

● Writing new modules in C++ (e.g., custom protocols).


● Adding corresponding OTcl bindings for configuration.

7. Common Applications

NS2 is widely used for:

● Studying network protocols under different scenarios.


● Simulating large-scale wired and wireless topologies.
● Analyzing performance metrics like throughput, delay, and packet loss.

You might also like