Mininet Routing not working

匿名 (未验证) 提交于 2019-12-03 01:39:01

问题:

I have a problem with Mininet topology. I am trying to make a ping between h3 and h4. They are connected to same switch s4. But they can not ping, they are in different subnet, so i am trying to make a flow table for s4 but with no success. Here is image of my topology :

after running Mininet I set up this:

h3 route add default gw 30.0.0.254 h3-eth0 h3 arp -s 30.0.0.254 00:00:00:00:33:33 h4 route add default gw 40.0.0.254 h4-eth0 h4 arp -s 40.0.0.254 00:00:00:00:44:44 

Then I populate s4 flow table

table=0,ip,nw_src=30.0.0.3,actions=resubmit(,1) table=0,ip,nw_src=40.0.0.4,actions=resubmit(,1) table=0,icmp,nw_src=30.0.0.3,actions=resubmit(,1) table=0,icmp,nw_src=40.0.0.4,actions=resubmit(,1)  table=1,ip,nw_dst=30.0.0.3,actions=mod_dl_dst=00:00:00:00:00:03,output:1 table=1,ip,nw_dst=40.0.0.4,actions=mod_dl_dst=00:00:00:00:00:04,output:2  table=1,priority=0,arp,nw_dst=30.0.0.3,actions=output:1 table=1,priority=0,arp,nw_dst=40.0.0.4,actions=output:2 

when I run ping between h3 and h4 and display s4 dump-flow I am getting this

 table=0, n_packets=1, n_bytes=98, idle_age=6, ip,nw_src=30.0.0.3 actions=resubmit(,1)  table=0, n_packets=0, n_bytes=0, idle_age=17, ip,nw_src=40.0.0.4 actions=resubmit(,1)  table=0, n_packets=0, n_bytes=0, idle_age=17, icmp,nw_src=30.0.0.3 actions=resubmit(,1)  table=0, n_packets=0, n_bytes=0, idle_age=17, icmp,nw_src=40.0.0.4 actions=resubmit(,1)  table=1, n_packets=0, n_bytes=0, idle_age=17, ip,nw_dst=30.0.0.3 actions=mod_dl_dst:00:00:00:00:00:03,output:1  table=1, n_packets=1, n_bytes=98, idle_age=6, ip,nw_dst=40.0.0.4 actions=mod_dl_dst:00:00:00:00:00:04,output:2  table=1, n_packets=0, n_bytes=0, idle_age=17, priority=0,arp,arp_tpa=30.0.0.3 actions=output:1  table=1, n_packets=0, n_bytes=0, idle_age=17, priority=0,arp,arp_tpa=40.0.0.4 actions=output:2 

and Mininet is saying only this:

mininet> h3 ping h4 -c1 PING 40.0.0.4 (40.0.0.4) 56(84) bytes of data. ^C --- 40.0.0.4 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms 

Could you help me please how to make connectivity? Or what is wrong in flow table on s4? Thank you in advance.

回答1:

Install Wireshark and use the command s4 Wireshark to observe the packets between the switch and the hosts. Check if the destination mac address of the packet has properly changed.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!