SDN2
SDN2
In this practical, we will use components that make POX work like a Layer 2 learning
switch, and that dump copies of packets received by the controller to thecontroller’s log
file (so we can see what packets the controller sees), and that listcontroller events to the
console log screen in an easy-to-read format. According to the POX documentation,
the stock components that do these tasks are: forwarding.l2_pairs, info.packet_dump,
samples.pretty_log, and log.level.
Start POX
To start the POX controller with the selected stock components, enter thefollowing
command on a terminal session connected to the Mininet VM.
Generate some test traffic between hosts to see how POX builds flows in the
network. Run the p command, which runs ping tests between each
Mininet i
n
g
a
l
l
host in the emulated network. This generates traffic to the controller every
time aa switch receives a packet that has a destination MAC address that is
not alreadyin its flow table.
You can see in the POX console window the log messages showing what is
happening. When the POX controller running the forwarding.l2_pairs
componentreceives a packet from a switch, it tells the switch to flood the ARP
packet out itsother ports to other switches or hosts. One host eventually
responds to the ARP request and then the forwarding.l2_pairs component
sends OpenFlow messages to each switch to load the required flows into the
switch flow tables.
Checking flow tables
To see the contents of the flow tables on all switches, execute the Mininetcommand:
To check ARP tables on each host, execute the Mininet arp command.
Forexample, to show the ARP table for host h1, enter the following
command:
mininet> h1 arp
To clear all flow tables on all switches, enter the Mininet command: