Академический Документы
Профессиональный Документы
Культура Документы
1
CREATE TOPOLOGY BY USING MININET
I. OBJECTIVES
This exercise is divided into two parts: (1) create a simple topology by using
Mininet and (2) add flow entries to Open vSwitchs by run command through CLI.
By doing that, students will archive the brief knowledge of Mininet and
understand how an Open vSwitch works.
II. DISCUSSION
Because of this, the code user develops and tests on Mininet, for an OpenFlow
controller, modified switch, or host, can move to a real system with minimal
changes, for real-world testing, performance evaluation, and deployment.
Importantly this means that a design that works in Mininet can usually move
directly to hardware switches for line-rate packet forwarding.
III. REQUIREMENTS
This exercise requires a PC or Laptop that runs Ubuntu 12.04 and already
installed Mininet.
IV. TUTORIAL
h1 h2 h3
s1
h1 h2 h3
c0
s1 ...
mininet>
With the option --controller remote we mean that Mininet will change Open
vSwitch’s controller address to Ip=127.0.0.1 (localhost) and port=6633.
h1 -> X X
h2 -> X X
h3 -> X X
mininet>
Firstly, host 1 will need to send an ARP request to host 3 to get its MAC
address. To do this, we are required to install two flow entries into the flow
table of switches - one to forward ARP request from host 1 and another to
handle ARP reply from host 3.
After host 1 gets the MAC address of host 3 by ARP, it now can normally
add this to MAC frame and send to host 3 through ICMP packet. Similarly,
we now need to install two flow entries into switches to handle echo-
request and echo-reply messages (ICMP - IPv4).
D
o
sudo ovs-ofctl add-flow s1 dl_type=0x0800,nw_dst=10.0.0.3,action=output:3
sudo ovs-ofctl add-flow s1 dl_type=0x0800,nw_dst=10.0.0.1,action=output:2
t
his by run the following commands:
n_tables:255, n_buffers:256
1(s1-eth1): addr:0e:cd:fc:f0:cb:1f
config: 0
state: 0
current: 10GB-FD COPPER
2(s1-eth3): addr:f6:95:c5:60:e5:79
config: 0
state: 0
3(s1-eth2): addr:ca:7f:49:ba:fb:d0
config: 0
state: 0
LOCAL(s1): addr:6e:10:83:64:b5:47
config: PORT_DOWN
state: LINK_DOWN
Use the port numbers above to create flow entries and then install these flow
entries into the switch S1 by using the following command
In addition to this, we also need to point out what we want to do with this packets.
Therefore, we use action=output:2 to forwarding the message to port 2 in the
switch.
V. CONCLUSION
Through this exercise, students have learned how to create a simple topology by
using Mininet as well as the structure of flow entry.
VI. QUESTIONS
……………………………………………………………………………………………
……………………………………………………………………………………………
…………………………………………………………………………………………...
2. Use different ways to create flow-entry in Step 2 for scenarios: h1 ping h2 and
h2 ping h3.
……………………………………………………………………………………………
……………………………………………………………………………………………
…………………………………………………………………………………………...