4.1.2.10 Lab - Introduction To Wireshark-NAVAL
4.1.2.10 Lab - Introduction To Wireshark-NAVAL
4.1.2.10 Lab - Introduction To Wireshark-NAVAL
Objectives
Part 1: Install and Verify the Mininet Topology
Part 2: Capture and Analyze ICMP Data in Wireshark
Background / Scenario
The CyberOps VM includes a Python script that, when you run it, will set up and configure the devices shown
in the figure above. You will then have access to four hosts, a switch, and a router inside your one VM. This
will allow you to simulate a variety of network protocols and services without having to configure a physical
network of devices. For example, in this lab you will use the ping command between two hosts in the Mininet
Topology and capture those pings with Wireshark.
Wireshark is a software protocol analyzer, or "packet sniffer" application, used for network troubleshooting,
analysis, software and protocol development, and education. As data streams travel over the network, the
sniffer "captures" each protocol data unit (PDU) and can decode and analyze its content according to the
appropriate RFC or other specifications.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 6 www.netacad.com
Lab – Introduction to Wireshark
Wireshark is a useful tool for anyone working with networks for data analysis and troubleshooting. You will
use Wireshark to capture ICMP data packets.
Required Resources
• CyberOps VM
• Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 6 www.netacad.com
Lab – Introduction to Wireshark
a. At the mininet prompt, start terminal windows on hosts H1 and H2. This will open separate windows for
these hosts. Each host will have its own separate configuration for the network including unique IP and
MAC addresses.
*** Starting CLI: mininet>
xterm H1 mininet> xterm H2
b. At the prompt on Node: H1, enter ifconfig to verify the IPv4 address and record the MAC address. Do
the same for Node: H2. The IPv4 address and MAC address are highlighted below for reference.
[root@secOps analyst]# ifconfig
H1-eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet
10.0.0.11 netmask 255.255.255.0 broadcast 10.0.0.255 inet6
fe80::2c69:4dff:febb:a219 prefixlen 64 scopeid 0x20<link> ether
26:3a:45:65:75:23 txqueuelen 1000 (Ethernet)
RX packets 152 bytes 13036 (12.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 107 bytes 9658 (9.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 6 www.netacad.com
Lab – Introduction to Wireshark
a. On Node: H1, enter wireshark-gtk & to start Wireshark (The pop-up warning is not important for this
lab.). Click OK to continue.
[root@secOps]# wireshark-gtk &
[1] 1552
[root@secOps ~]#
** (wireshark-gtk:1552): WARNING **: Couldn't connect to accessibility bus:
Failed to connect to socket /tmp/dbus-f0dFz9baYA: Connection refused Gtk-
Message: GtkDialog mapped without a transient parent. This is discouraged.
b. In the Wireshark window, under the Capture heading, select the H1-eth0 interface. Click Start to capture
the data traffic.
c. On Node: H1, press the Enter key, if necessary, to get a prompt. Then type ping -c 5 10.0.0.12 to ping
H2 five times. The command option -c specifies the count or number of pings. The 5 specifies that five
pings should be sent. The pings will all be successful.
[root@secOps analyst]# ping -c 5 10.0.0.12
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 6 www.netacad.com
Lab – Introduction to Wireshark
d. Navigate to the Wireshark window, click Stop to stop the packet capture.
e. A filter can be applied to display only the interested traffic.
Type icmp in the Filter field and click Apply.
f. If necessary, click the first ICMP request PDU frames in the top section of Wireshark. Notice that the
Source column has H1’s IP address, and the Destination column has H2’s IP address.
g. With this PDU frame still selected in the top section, navigate to the middle section. Click the arrow to the
left of the Ethernet II row to view the Destination and Source MAC addresses.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 6 www.netacad.com
Lab – Introduction to Wireshark
f. To clean up all the processes that were used by Mininet, enter the sudo mn -c command at the prompt.
analyst@secOps ~]$ sudo mn -c [sudo] password for analyst:
*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes
killall controller ofprotocol ofdatapath ping nox_core lt-nox_core ovs-openflowd
ovscontroller udpbwtest mnexec ivs 2> /dev/null killall -9 controller ofprotocol
ofdatapath ping nox_core lt-nox_core ovs-openflowd ovs-controller udpbwtest mnexec
ivs 2> /dev/null pkill -9 -f "sudo mnexec" *** Removing junk from /tmp
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
*** Removing old X11 tunnels
*** Removing excess kernel datapaths ps ax |
egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'
*** Removing OVS datapaths ovs-vsctl
--timeout=1 list-br ovs-vsctl --
timeout=1 list-br *** Removing all
links of the pattern foo-ethX ip link
show | egrep -o '([-_.[:alnum:]]+-
eth[[:digit:]]+)' ip link show
*** Killing stale mininet node processes
pkill -9 -f mininet: *** Shutting down
stale tunnels pkill -9 -f
Tunnel=Ethernet pkill -9 -f .ssh/mn rm -
f ~/.ssh/mn/*
*** Cleanup complete.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 6 www.netacad.com