Ns Lab 1 - Deepanshu Sharma
Ns Lab 1 - Deepanshu Sharma
Deepanshu Sharma
Part 1: how to sniff only the desired packets and write in a file using tcpdump filters.
Tcpdump
tcpdump –help
tcpdump -i eth0 –v
TCPDUMP
tcpdump-h
tcpdump -D
wireshark packet-capture.pcap&
Part 3: to understand the ARP protocol in practice throughpassive monitoring and some
cooperative work.
In ARP, only two messages are defined – ARP request and ARP reply.
Part 4: Observe the format and types of ARP packets, operation of ARP for hosts residing in same
subnet and not in same subnet (requiring a router/proxy/gateway). Initiate communication within
and outside the networks using ping. Capture the ARP packets using tcpdump and analyze.
Part 5: need to use the commands ‘ifconfig’ and ‘arp’ in Linux forthis assignment. With these
commands, try to modify MAC addresses andobserve the impact on bindings. Understand the
various options in these twocommands and execute them appropriately.
a. Ifconfig
-a :This option is used to display all the interfaces available
Syntax:ifconfig -a
up :This option is used to activate the driver for the given interface.
Syntax:ifconfig interface up
[-]arp : This option is used to enable/disable the use of ARP protocol on an interface.
Syntax:ifconfig–help
b. Arp
-v
Tell the user what is going on by being verbose.
-H type
When setting or reading the ARP cache, this optional parameter tells arp
which class of entries it should check for.
-a [hostname]
Shows the entries of the specified hosts.
-d hostname
Remove any entry for the specified host.
-s hostname hw_addr
Manually create an ARP address mapping entry(static entry) for host
hostname with hardware address set to hw_addr class
Part 6: Design experiments to observethe ARP cache contents and effect of various options with the
help of yourpartner’s machine.