I cannot receive any packets when I pingall in mininet custom topology. I want to create a mininet network with the following configuration:
My custom topology looks like this:
class NetworkTopo(Topo):
def build(self, **_opts):
r1 = self.addHost("r1", cls=LinuxRouter, ip="10.101.0.1/24")
r2 = self.addHost("r2", cls=LinuxRouter, ip="10.102.0.1/24")
r3 = self.addHost("r3", cls=LinuxRouter, ip="10.103.0.1/24")
r4 = self.addHost("r4", cls=LinuxRouter, ip="10.104.0.1/24")
r5 = self.addHost("r5", cls=LinuxRouter, ip="10.105.0.1/24")
r6 = self.addHost("r6", cls=LinuxRouter, ip="10.106.0.1/24")
r7 = self.addHost("r7", cls=LinuxRouter, ip="10.107.0.1/24")
self.addLink(
r1,
r2,
intfName1="r1-eth1",
intftName2="r2-eth1",
params1={"ip": "10.108.0.1/24", "bw": 900},
params2={"ip": "10.108.0.2/24", "bw": 900},
)
self.addLink(
r1,
r5,
intfName1="r1-eth2",
intftName2="r5-eth1",
params1={"ip": "10.109.0.1/24", "bw": 700},
params2={"ip": "10.109.0.2/24", "bw": 700},
)
self.addLink(
r1,
r7,
intfName1="r1-eth3",
intftName2="r7-eth1",
params1={"ip": "10.110.0.1/24", "bw": 200},
params2={"ip": "10.110.0.2/24", "bw": 200},
)
self.addLink(
r2,
r3,
intfName1="r2-eth2",
intftName2="r3-eth1",
params1={"ip": "10.111.0.1/24", "bw": 300},
params2={"ip": "10.111.0.2/24", "bw": 300},
)
The rest of the links are according to the diagram, but I couldn't add them due to too much code in the question.
The run command takes in the following:
def run():
topo = NetworkTopo()
net = Mininet(
topo=topo,
controller=lambda name: RemoteController(name, ip="127.0.0.1"),
switch=OVSBridge,
autoSetMacs=True,
)
net.start()
print("Dumping the Node Information")
dumpNodeConnections(net.hosts)
print("Testing the network connectivity")
net.pingAll()
CLI(net)
net.stop()
When I run my custom topology in Python, I get all packets dropped when performing pingall:
What am I doing wrong? Please advise.

