abhilash_goyal
abhilash_goyal

Reputation: 711

How to add new hosts to current running mininet topology?

I have created the following topology in the opendaylight controller using mininet. I want to add a new host to this topology on the go.

Network Topology created through mininet

I followed the following mailing list link to add the host.The host is getting added but I am not able to ping between old and newly created host. Following is the snapshot of commands I fired, and resulting output.

enter image description here

host h1 ip: 192.168.10.225
host h2 ip: 192.168.10.235
host h3 ip: 192.168.10.215

h1 is able to ping h2, but not to h3 which is newly created.

Kindly guide where am I doing wrong.

Upvotes: 1

Views: 6671

Answers (2)

user7365413
user7365413

Reputation:

After adding the host, you should add flow to the switch using built-in command 'ovs-ofctl'.

Eg. if the h1 is connected at interface s1-eth1 of the s1, and the h3 is connected at interface s1-eth3, you should add flow using these commands:

mininet> s1 ovs-ofctl add-flow "s1" in_port=1,actions:output=3
mininet> s1 ovs-ofctl add-flow "s1" in_port=3,actions:output=1 

The "add-flow" command takes at most two arguments, so no space in second argument.

Hope this will help.

Upvotes: 2

indlabs
indlabs

Reputation: 64

Assuming you are using the ovsk switch , openflow 1.3, and connecting to ODL Boron remotely the issue is that the l2switch application is not adding new flows to the current network.

You will need to add the flow through th for h3 to send/receive data. https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:End_to_End_Flows#Flow_Strategy

If you want to rely on the l2switch application to reactively add the flow to the network whe you add the host you will want to reduce the graph-refresh-delay from 1000 sec http://docs.opendaylight.org/en/stable-boron/user-guide/l2switch-user-guide.html

If you wait 1000 sec and pingall the steps you are using will work now.

Upvotes: 0

Related Questions