Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

Before running uni-directional flow, user needs a packet generator to work with wireshark for packet generation and capturing. In this starter kit, a linux tool packeth is used for packet generation. The packeth can be installed via the linux command sudo apt-get install packeth. To use the packeth, an address file needs to be created as the address database for packet creation. The format is <IP address>:<MAC address>:<Names>. A sample address file is provided in the appendix (http://intranet.pica8.com/display/picos25sp/Packet+address+file).


Next, user can create some packets to be used in the later test scenarios. Start the packeth, click the builder button to enter the tab for creating a packet. The next screen shows the test packet we built for this test. Fill in each field using the select button or by entering the value. Each packet includes information in link layer, IP layer, and TCP payload. Once the packet is built, click the interface button then select eth0 as the interface.

Next, create a uni-directional flow from port 1 to port 2 using ovs-ofctl add-flow br0 in_port=1,actions=output:2 command. Then, use the dump flow command to show the flow. The command added a flow into br0 to forward all packets coming in from in_port=1 to out_port=2. Next, start the wireshark application to capture all packets on eth0 for both PC1 and PC2.

Next, return to the packeth screen and click the send button. At the bottom of the packeth screen, there should be a time stamp and the number of bytes sent to eth0 shown. User can verify the packet content on wireshark on both the sending and receiving PCs. This verifies the flow entry entered via the add-flow command works as expected. To test this flow further, follow the next packeth screen to create another packet with different information and send it through the eth0.

Figure 3 – Packeth


Next, use ovs-ofctl del-flows br0 command to delete the flow. Then, use ovs-ofctl add-flow br0 in_port=1,dl_type=0x0800,nw_src=100.10.0.2,actions=output:2 to add a new flow that filters all packets received from port 1 and only forwards the packets with the matching IP address to port 2.

Figure 4 – Add flow with source IP matching field

On the packeth menu, click the gen-s button to mix packets into one output stream. Select different packets built with different IP addresses to form one packet stream. Specify the delay and number of iteration. Then, select the manual operation to send the stream. Use wireshark to examine the result.

Figure 5 – Use packeth to generate mixed packet stream


As shown in the screen shot, the packet stream sent using packeth, with 3 different types of the packet and 3 different source IP addresses, is filtered by the flow and only the packet with source IP address 100.10.0.2 is forwarded to output port 2. With the packeth and wireshark, many of the fields can be tested in the uni-directional flow configuration.

Figure 6 – Packet filtering for uni-directional traffic


  • No labels