查看mininet交换机中的流表

官网文档http://mininet.org/walkthrough/#xterm-display

Xterms are also useful for running interactive commands that you may need to cancel, for which you’d like to see the output.

For example:

In the xterm labeled “switch: s1 (root)”, run:

mininet> xterm s3

# dpctl dump-flows tcp:127.0.0.1:6634

Nothing will print out; the switch has no flows added. To use dpctl with other switches, start up mininet in verbose mode and look at the passive listening ports for the switches when they’re created.

Now, in the xterm labeled “host: h1”, run:

# ping 10.0.0.2

Go back to s1 and dump the flows: # dpctl dump-flows tcp:127.0.0.1:6634

You should see multiple flow entries now. Alternately (and generally more convenient), you could use the dpctlcommand built into the Mininet CLI without needing any xterms or manually specifying the IP and port of the switch.

示例:

原文地址:https://www.cnblogs.com/duanguyuan/p/3753187.html