openstack devstack RTNETLINK answers: Network is unreachable

在centos 7.1下安装devstack时,执行到下面的步骤时报错                                                                                                            
2015-12-11 17:07:57.779 | + ADD_DEFAULT_ROUTE=‘sudo ip -f inet r replace default via 192.168.141.2 dev br-ex‘
2015-12-11 17:07:57.779 | + [[ True == \T\r\u\e ]]                                                          
2015-12-11 17:07:57.779 | + ADD_OVS_PORT=‘sudo ovs-vsctl --may-exist add-port br-ex eno33554976‘            
2015-12-11 17:07:57.779 | + [[ 192.168.141.128/24 brd 192.168.141.255 != ‘‘ ]]                              
2015-12-11 17:07:57.779 | + IP_DEL=‘sudo ip addr del 192.168.141.128/24 brd 192.168.141.255 dev eno33554976‘
2015-12-11 17:07:57.779 | + IP_ADD=‘sudo ip addr add 192.168.141.128/24 brd 192.168.141.255 dev br-ex‘      
2015-12-11 17:07:57.779 | + sudo ip addr del 192.168.141.128/24 brd 192.168.141.255 dev eno33554976         
2015-12-11 17:07:57.787 | + sudo ip addr add 192.168.141.128/24 brd 192.168.141.255 dev br-ex               
2015-12-11 17:07:57.793 | + sudo ovs-vsctl --may-exist add-port br-ex eno33554976                           
2015-12-11 17:07:57.814 | + sudo ip -f inet r replace default via 192.168.141.2 dev br-ex                   
2015-12-11 17:07:57.821 | RTNETLINK answers: Network is unreachable

单独执行该命令,还是报错
[[email protected] ~]# sudo ip -f inet r replace default via 192.168.141.2 dev br-ex                                                                       
RTNETLINK answers: Network is unreachable 
查看端口状态,发现br-ex 的状态为down,然后手动up该端口后,命令执行成功                                                                           
[[email protected] ~]# ip addr show                                                                                       
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN                                                    
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00                                                              
    inet 127.0.0.1/8 scope host lo                                                                                     
       valid_lft forever preferred_lft forever                                                                         
    inet6 ::1/128 scope host                                                                                           
       valid_lft forever preferred_lft forever                                                                         
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000                         
    link/ether 00:0c:29:a0:aa:48 brd ff:ff:ff:ff:ff:ff                                                                 
    inet 10.0.0.150/24 brd 10.0.0.255 scope global eno16777736                                                         
       valid_lft forever preferred_lft forever                                                                         
    inet6 fe80::20c:29ff:fea0:aa48/64 scope link tentative dadfailed                                                   
       valid_lft forever preferred_lft forever                                                                         
3: eno33554976: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000       
    link/ether 00:0c:29:a0:aa:52 brd ff:ff:ff:ff:ff:ff                                                                 
    inet6 fe80::20c:29ff:fea0:aa52/64 scope link                                                                       
       valid_lft forever preferred_lft forever                                                                         
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN                                       
    link/ether 52:54:00:f7:2f:e3 brd ff:ff:ff:ff:ff:ff                                                                 
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0                                                      
       valid_lft forever preferred_lft forever                                                                         
5: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500         
    link/ether 52:54:00:f7:2f:e3 brd ff:ff:ff:ff:ff:ff                                                                 
6: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN                                                    
    link/ether 12:58:4a:8b:b3:5e brd ff:ff:ff:ff:ff:ff                                                                 
11: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN                                                       
    link/ether ae:bd:72:fa:c0:4a brd ff:ff:ff:ff:ff:ff                                                                 
12: br-ex: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN                                                        
    link/ether 00:0c:29:a0:aa:52 brd ff:ff:ff:ff:ff:ff                                                                 
    inet 192.168.141.128/24 brd 192.168.141.255 scope global br-ex                                                     
       valid_lft forever preferred_lft forever      
[[email protected] ~]# ifconfig br-ex up
[[email protected] devstack]$ sudo ip -f inet r replace default via 192.168.141.2 dev br-ex    
将ifconfig命令加入到脚本文件中                                                                                                                                                           
[[email protected] ~]# cd /home/stack/devstack/                                                                           
[[email protected] devstack]# find ./ -type f |xargs grep "ip -f inet r replace default via"                              
[[email protected] devstack]# find ./ -type f |xargs grep "ADD_DEFAULT_ROUTE"                                             
./lib/neutron-legacy:            ADD_DEFAULT_ROUTE="sudo ip -f $af r replace default via $DEFAULT_ROUTE_GW dev $to_intf"
./lib/neutron-legacy:        $IP_DEL; $IP_ADD; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE

时间: 2024-11-03 21:40:12

openstack devstack RTNETLINK answers: Network is unreachable的相关文章

RTNETLINK answers: File exists错误解决方法

>一.写在前面: 因为是我刚学习linux好多问题需要解决,bolg仅作为记录自己的在技术这条道路上的点点滴滴. 二.事件起因: 最近因为女友的原因消沉的好长时间,在马哥那里的课程的结束到现在已经将近45天时间都没有温习,今天拿出来突然老师问我会不会配置lvs,顿时傻眼了.忘记光了,看来这温故而知新的道理不是白来的,然后就出现今天的的事情了. 今天在安装REdhat的时候遇见和网卡有关的问题,起初没有解决系统级别的经验就是最原始的办法,重启虚拟机,不然就是重装.来来回回折腾了好多次都没有成功(没

Linux启动网卡时出现RTNETLINK answers: File exists错误解决方法

这里说一下,如果复制了虚拟机,设置新的MAC地址为什么? 在虚拟机的网络设置中--->高级.然后找到如下窗口,生成新的MAC地址即可. -------------------------------------------------------------------------------- 一.问题描述VMware中克隆虚拟机是经常的事情,虽然如此,用到虚拟机时,本人还是喜欢新安装一个操作系统,针对服务器的应用,在安装操作系统时,一并安装好,并且也花不了多少时间.但最近需要大量的配置一样的

sexi部署openstack (devstack) 、二

部署openstack (devstack) devstack是openstack的一个发行版本 创建虚拟机 按照物理资源需求创建 devstack-controller 和 devstak-compute 虚拟机  安装操作系统 安装 Ubuntu 14.04,并配置 eth0 的 IP devstack-controller  192.168.104.10 devstak-compute    192.168.104.11 接下来的步骤在两个节点都要操作 下载代码 下载 devstack 代

RTNETLINK answers: File exists

问题: 重启网络时报错如下 >>/etc/init.d/network start RTNETLINK answers: File exists 分析: /etc/init.d/network 与 /etc/init.d/NetworkManager,这两个服务发生冲突:从根本上说是NetworkMaganager(NM)带来的冲突,停用NetworkManager即可解决. 解决: 利用chkconfig查看 >>chkconfig --list network network

rtnetlink answers小错误解决

VMware 批量克隆虚机是很方便的,但打开这些复制(克隆)的虚拟机有些会出现网络无法启动的问题.使用 service network start 命令出现如下报错:重启网卡时也会出现 :RTNETLINK answers: File exists 提示 以下是网卡出来错误的解决方法: 第一种: 和 NetworkManager 服务有冲突,这个好解决,直接关闭 NetworkManger 服务就好了, service NetworkManager stop,并且禁止开机启动 chkconfig

重启网卡报错RTNETLINK answers: File exists

2019-08-10 时间起因 今日搭建kvm服务器时,配置完成桥接网卡,重启网络服务之后,发现服务器IP无法访问,凭经验判断一定是网卡相关服务出现问题 查找原因 查看网卡服务状态 systemctl status network 发现如下报错 RTNETLINK answers: File exists 度娘查找原因,network与NetworkManager服务冲突了 [[email protected] ~]# chkconfig --list network network 0:off

device does not seem;RTNETLINK answers:File exists

前言:Centos 7服务器出现网络异常的问题排查步骤:1.确认是否有IP地址2.重启网卡是否成功3.是否有冲突的网络管理工具(network&NetworkManger)4.检查网卡的配置文件是否正常Warning:主要看日志,默认Log存放位置(/var/log/messages)(1)检测是否有IP地址(这里就不上图了,可以看到网卡信息,但是没有IP地址)我们看一下日志 Apr 8 10:35:20 localhost network: Bringing up interface eth0

Linux 虚拟机配置-network is unreachable

配置虚拟机时,遇到network is unreachable,根据网上找来的方法处理,最终自己试过,成功修改的方法在这里记录一下: 修改虚拟机的网络适配器:桥接,复制物理机网络 vim /etc/sysconfig/network-scripts/ifcfg-eth0:使用该命令打开eth0网络配置文件,修改内容如下: 这里的HWADDR在打开时就使用默认的即可,注意添加或修改红色方框内的内容,Ip和netmask以及gateway自己配置为本机想要使用的即可. 保存退出,重启网络服务:ser

centos--网络配置问题,提示connect: Network is unreachable

转自:http://www.centoscn.com/CentosBug/osbug/2014/0424/2860.html 现象: ping内网正常ping外网IP,域名均无法正常,返回错误:connect: Network is unreachable 后面在无意中看到Linux网络配置有添加网关的命令: route add default gw 192.168.128.2 dev eth0 按上面操作,添加了默认的网关之后.再次访问外网一切正常. 有这个现象来看,应该是配置文件中没有配置网