mininet / mininet

Emulator for rapid prototyping of Software Defined Networks

Home Page:https://mininet.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bcube topo do not work

bryan-song-007 opened this issue · comments

commented

Expected/Desired Behavior:

I created a BCube topo using mininet, and here is the connection details:

mininet> dump
<Host r0: r0-eth0:10.0.0.1,r0-eth1:10.0.1.2 pid=59256>
<Host r1: r1-eth0:10.0.0.2,r1-eth1:10.0.1.4 pid=59258>
<Host r2: r2-eth0:10.0.0.3,r2-eth1:10.0.1.6 pid=59260>
<Host r3: r3-eth0:10.0.0.4,r3-eth1:10.0.1.8 pid=59262>
<OVSSwitch s4: s4-eth0:None,s4-eth1:None pid=59267>
<OVSSwitch s5: s5-eth0:None,s5-eth1:None pid=59270>
<OVSSwitch s6: s6-eth0:None,s6-eth1:None pid=59273>
<OVSSwitch s7: s7-eth0:None,s7-eth1:None pid=59276>

mininet> net
r0 r0-eth0:s4-eth0 r0-eth1:s6-eth0
r1 r1-eth0:s4-eth1 r1-eth1:s7-eth0
r2 r2-eth0:s5-eth0 r2-eth1:s6-eth1
r3 r3-eth0:s5-eth1 r3-eth1:s7-eth1
s4 s4-eth0:r0-eth0 s4-eth1:r1-eth0
s5 s5-eth0:r2-eth0 s5-eth1:r3-eth0
s6 s6-eth0:r0-eth1 s6-eth1:r2-eth1
s7 s7-eth0:r1-eth1 s7-eth1:r3-eth1

mininet> links
r0-eth0<->s4-eth0 (OK OK)
r0-eth1<->s6-eth0 (OK OK)
r1-eth0<->s4-eth1 (OK OK)
r1-eth1<->s7-eth0 (OK OK)
r2-eth0<->s5-eth0 (OK OK)
r2-eth1<->s6-eth1 (OK OK)
r3-eth0<->s5-eth1 (OK OK)
r3-eth1<->s7-eth1 (OK OK)

Actual Behavior:

All the hosts could not connect to each other.

Detailed Steps to Reproduce the Behavior:

Running my script in mininet.

Additional Information:

I use a matrix[total][total] to keep the connection, and "total" is the number of hosts and switches (total = servers + switches). If matrix[i][j] is 1, this means server_i and switch_j are connected. Here is the logic to add the links:

    for each_element in the matrix:
        start_ip += 1
        ip_str = ("10.0.1.%s/24" % start_ip)

        # resource_list is used to track the return value of "addHost()" and "addSwitch()"
        self.addLink(resource_list[i], resource_list[j],  
                             port1=level, port2=port2,
                             params1={'ip': ip_str},
                             autoconf=True, cls=TCLink)
commented

Can you confirm that you aren't trying to create a network with loops in it?

https://github.com/mininet/mininet/wiki/FAQ#ethernet-loops

commented

Thank you so much for your reference and will take a look at my topo.