Reputation: 279
i am building custom topology in Mininet Emulator, I successfully creater topology which is displayed on the picture but I have a problem with ping between h1 and h2. They are connected to same switch s1 and they are in same subnet. I am getting only this output from mininet.
mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
In parael terminal window it is running POX Controller which gives me output
WARNING:forwarding.l2_learning:Same port for packet from 00:00:00:00:00:02 -> 00:00:00:00:00:01 on 00-00-00-00-00-04.1. Drop.
WARNING:forwarding.l2_learning:Same port for packet from 00:00:00:00:00:02 -> 00:00:00:00:00:01 on 00-00-00-00-00-01.1. Drop.
But when I build topology only with h1-----s1-----h2 ping works fine
Topology is connected correctly
mininet> net
h1 h1-eth0:s1-eth3
h2 h2-eth0:s1-eth4
h3 h3-eth0:s3-eth3
s1 lo: s1-eth1:s2-eth1 s1-eth2:s4-eth1 s1-eth3:h1-eth0 s1-eth4:h2-eth0
s2 lo: s2-eth1:s1-eth1 s2-eth2:s3-eth1
s3 lo: s3-eth1:s2-eth2 s3-eth2:s4-eth2 s3-eth3:h3-eth0
s4 lo: s4-eth1:s1-eth2 s4-eth2:s3-eth2
Could you tell me how can I fixit please?
Thank You in advance! :)
Upvotes: 0
Views: 3189
Reputation: 631
The warning messages "Same port for packet..." appear when the controller finds out that the input and output ports for a packet are same. In the given configuration, these messages will appear for switches S2 and S4. The reason is, when H1 generates a packet, controller does not have a MAC to port mapping and it floods the packets out of all ports (except the one on which packet was received). S2 and S4 received the packet on port 1 and added an entry for MAC 00:00:00:00:00:01 on port 1.
When H2 responded, S2 and S4 again received the packet on same port 1 and based on the destination MAC S2 and S4 determined the output port to be 1. Therefore, the same input and output port caused the warning message.
These messages should not stop ping to work between H1 and H2 because the packets sent by H1 and H2 should reach the destination due to flooding done by S1.
Please check ARP entries on H1 and H2 and also the flow entries installed on S1. You can run the topology script with option --arp to configure static ARP entries on hosts.
Upvotes: 1