neutron中经常发现vm ping不通网关,我发现很多情况是因为ovs-plugin没有将qvb连接到qbr桥上,所以解决办法也很简单,就是将其连上,即将qbr设为master。





LINKS=`ip link|grep qvb |awk '{print $2}' |sed s'/.$//'|sed s'/^...//'`
for LINK in $LINKS
# a qbr link should appear after hard reboot an instance
ip link set "qbr$LINK" up
echo ip link set "qvb$LINK" master "qbr$LINK"
ip link set "qvb$LINK" master "qbr$LINK"
echo ip link set "tap$LINK" master "qbr$LINK"
ip link set "tap$LINK" master "qbr$LINK"


  1. br-tun每次在ovs-agent重启后controller就会消失,此时应该在重启脚本中添加:  ovs-vsctl set-controller br-tun tcp:
  2. 确定br-int和br-tun没有多余的流,用ovs-ofctl dump-flows br-int/br-tun可看
  3. 确定网络控制器正常运行,有时候监控of控制流发现只有packet_in没有packet_out,此时重启一下网络控制器可能会解决问题

如果还是有问题,不妨对照上面的连接图,然后分别用tcpdump监听compute node的tap、qbr、qvb、qvo、br-int、br-tun、br-tun所对应的eth(如果用gre模式监听要加参数proto gre才能解gre包),再到network node的eth、br-tun、br-int、再到namespace的网关接口qr-xxx。

如果发现br-int有数据包,但br-tun没有数据包,不妨监听一下openflow的控制流:ovs-ofctl snoop br-int/br-tun,看看控制器的响应如

2 thoughts on “neutron中一种常见网络不通的现象,附修复脚本

  1. relevant web-site

    Hey I know this is off topic but I was wondering
    if you knew of any widgets I could add to my blog that automatically tweet my
    newest twitter updates. I’ve been looking for a plug-in like
    this for quite some time and was hoping maybe you would have
    some experience with something like this. Please let me
    know if you run into anything. I truly enjoy reading your blog and I look forward to
    your new updates.


Leave a Reply

Your email address will not be published. Required fields are marked *