Skip to content

3. Using Mininet

Sanjhana Jayagopal edited this page Jan 6, 2020 · 5 revisions

Mininet Architecture

SSH into the devices and switches

The list of devices and switches running within mininet can be found in the inventory file on the VM.
cat <remote-inventory-file>

To log in to these devices/switches from the VM, use the name from the inventory file -

ssh <device-name>

Example - ssh gateway1

Using Wireshark to sniff packets

There are two ways in which Wireshark could be used to sniff packets -

  1. Using Wireshark on the Mininet VM
    To view traffic from the VM console,
    sudo wireshark
    From the Wireshark window, select the interface to analyze packet-level data.

  2. Using Tcpdump
    On the VM terminal, tcpdump -i <interface> -w <filename>.pcap From the local machine,

cd transparent-security/automation/p4/mininet
scp ubuntu@$(terraform output ip):_<filename>.pcap location on VM_ _File location on host OS_

Using Wireshark on the local machine, open the PCAP file to analyze the traffic.
Reference PCAP files captured from mininet environment could be accessed at -
Core-AE: core1-eth2
Core-inet: core1-eth3

Logging

The log files under /var/log/transparent-security provide an insight into the processes of setting up Mininet, running the device daemons, writing P4 table action rules to the switches, controller communication, and attack information.

Clone this wiki locally