Reputation: 1
I use this article to try to implement cross-subnet in mininet.
The following are my commands:
mn --topo single,2 --mac
h1 ifconfig h1-eth0 10.0.0.1/24 netmask 255.0.0.0
h2 ifconfig h2-eth0 20.0.0.1/24 netmask 255.0.0.0
h1 route add default gw 10.0.0.254 h1-eth0
h2 route add default gw 20.0.0.254 h2-eth0
s1 ifconfig s1:0 10.0.0.254
s1 ifconfig s1:1 20.0.0.254
After typing above commands, I try to ping like this:
h1 ping 10.0.0.254
Here is what I see.
But it should be like this.
I try to change the netmask of h1 and h2(255.255.255.0)
or just go ahead the remaining steps of the article.
but they didn't work.
Please tell me where I did wrong or the correct way to cross subnet in mininet.
Upvotes: 0
Views: 384
Reputation: 1181
From the article you reference to the steps you define, you are missing quite some steps in regard to installing flow rules in your switch. That is why your test does not work. I pretty much believe you are missing the ARP request/response before the ICMP (ping) works. See, the person installs rules so that ARP is handled:
mininet > sh ovs - ofctl add - flow s1 "table=0,priority=65535,arp,arp_tpa=10.0.0.254 actions=LOCAL"
mininet > sh ovs - ofctl add - flow s1 "table=0,priority=65535,arp,arp_tpa=20.0.0.254 actions=LOCAL"
Cheers,
Upvotes: 0