Mininet 路由不工作 [英] Mininet Routing not working

查看:53
本文介绍了Mininet 路由不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Mininet 拓扑有疑问.我正在尝试在 h3h4 之间进行 ping.它们连接到同一交换机 s4.但是他们无法ping通,他们在不同的子网中,所以我试图为s4制作一个流表,但没有成功.这是我的拓扑图:

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 :

运行 Mininet 后,我​​设置了这个:

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

然后我填充s4流表

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

当我在 h3 和 h4 之间运行 ping 并显示 s4 dump-flow 我得到这个

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

Mininet 只是在说:

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

你能帮我看看如何建立连接吗?或者 s4 上的流表有什么问题?提前致谢.

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

推荐答案

安装 Wireshark 并使用命令 s4 Wireshark 观察交换机和主机之间的数据包.检查数据包的目的mac地址是否正确更改.

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.

这篇关于Mininet 路由不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆