openstack 下网络[路由绑定]故障解决

简介: 1. 查询网络信息 [root@kf-test-pinyun-048228 ~(keystone_admin)]# neutron net-list | grep w2| 01a7ab13-65a8-4300-a53b-d6a774414c2a | w2 | 67f3da0b-a513-4857-8ad7-2283494a3b

1. 查询网络信息

[root@kf-test-pinyun-048228 ~(keystone_admin)]# neutron net-list | grep w2
| 01a7ab13-65a8-4300-a53b-d6a774414c2a | w2                              | 67f3da0b-a513-4857-8ad7-2283494a3b4f 192.168.0.0/24 |



2. 查询子网信息

[root@kf-test-pinyun-048228 ~(keystone_admin)]# neutron subnet-list | grep 67f3da0b-a513-4857-8ad7-2283494a3b4f
| 67f3da0b-a513-4857-8ad7-2283494a3b4f | 2                                      | 192.168.0.0/24  | {"start": "192.168.0.21", "end": "192.168.0.200"}  |


3. 查询当前路由信息

[root@kf-test-pinyun-048228 ~(keystone_admin)]#neutron router-list | grep ly2
| 698a3113-e94d-4c5a-ba62-870c9c7897bc | ly2   | {"network_id": "c3d7ba94-4360-4f3f-a9c8-83cda089dfa7", "enable_snat": true} |


4. 添加网络接口

[root@kf-test-pinyun-048228 ~(keystone_admin)]#neutron router-list | grep ly2
| 698a3113-e94d-4c5a-ba62-870c9c7897bc | ly2   | {"network_id": "c3d7ba94-4360-4f3f-a9c8-83cda089dfa7", "enable_snat": true} |
[root@kf-test-pinyun-048228 ~(keystone_admin)]#neutron router-interface-add 698a3113-e94d-4c5a-ba62-870c9c7897bc 67f3da0b-a513-4857-8ad7-2283494a3b4f
400-{u'NeutronError': {u'message': u'Bad router request: Subnet for router interface must have a gateway IP', u'type': u'BadRequest', u'detail': u''}}



检查原因

[root@kf-test-pinyun-048228 ~(keystone_admin)]# neutron subnet-show  2
+------------------+---------------------------------------------------+
| Field            | Value                                             |
+------------------+---------------------------------------------------+
| allocation_pools | {"start": "192.168.0.21", "end": "192.168.0.200"} |
| cidr             | 192.168.0.0/24                                    |
| dns_nameservers  |                                                   |
| enable_dhcp      | True                                              |
| gateway_ip       |                                                   |  <-- 没有路由导致无法连接该路由
| host_routes      |                                                   |
| id               | 67f3da0b-a513-4857-8ad7-2283494a3b4f              |
| ip_version       | 4                                                 |
| name             | 2                                                 |
| network_id       | 01a7ab13-65a8-4300-a53b-d6a774414c2a              |
| tenant_id        | 491b8025e52b4876a4c92e34faab6de9                  |
+------------------+---------------------------------------------------+


重新创建一个子网

[root@kf-test-pinyun-048228 ~(keystone_admin)]# neutron subnet-delete 2
Deleted subnet: 2
[root@kf-test-pinyun-048228 ~(keystone_admin)]#neutron subnet-create --name terry_subnet --allocation-pool start=192.168.0.21,end=192.168.0.200 --gateway 192.168.0.1 --dns-nameserver 192.168.86.37 --enable_dhcp=True --ip-version 4  w2 192.168.0.0/24
Created a new subnet:
+------------------+---------------------------------------------------+
| Field            | Value                                             |
+------------------+---------------------------------------------------+
| allocation_pools | {"start": "192.168.0.21", "end": "192.168.0.200"} |
| cidr             | 192.168.0.0/24                                    |
| dns_nameservers  | 192.168.86.37                                     |
| enable_dhcp      | True                                              |
| gateway_ip       | 192.168.0.1                                       |
| host_routes      |                                                   |
| id               | 22515256-2d5e-4e97-b8d4-4dd00a2a4595              |
| ip_version       | 4                                                 |
| name             | terry_subnet                                      |
| network_id       | 01a7ab13-65a8-4300-a53b-d6a774414c2a              |
| tenant_id        | 96536b80f74a4aea90d728befa0d1114                  |
+------------------+---------------------------------------------------+


重新连接路由成功, 问题解决

[root@kf-test-pinyun-048228 ~(keystone_admin)]#neutron router-interface-add 698a3113-e94d-4c5a-ba62-870c9c7897bc 22515256-2d5e-4e97-b8d4-4dd00a2a4595
Added interface ad53878a-f358-4867-bbf5-3d1fd3302e6c to router 698a3113-e94d-4c5a-ba62-870c9c7897bc.


目录
相关文章
|
4天前
|
网络协议 物联网 网络安全
|
4天前
|
算法 网络协议 数据建模
【计算机网络】—— IP协议及动态路由算法(下)
【计算机网络】—— IP协议及动态路由算法(下)
12 0
|
4天前
|
算法 网络协议 数据建模
【计算机网络】—— IP协议及动态路由算法(上)
【计算机网络】—— IP协议及动态路由算法(上)
11 0
|
4天前
|
负载均衡 网络协议 安全
【计算机网络】虚拟路由冗余(VRRP)协议原理与配置
【计算机网络】虚拟路由冗余(VRRP)协议原理与配置
15 0
|
4天前
|
安全 网络协议 网络架构
【网络技术设备安全】BGP 基础与概述-2-中转 AS 中的 IBGP 路由传递
【网络技术设备安全】BGP 基础与概述-2-中转 AS 中的 IBGP 路由传递
【网络技术设备安全】BGP 基础与概述-2-中转 AS 中的 IBGP 路由传递
|
4天前
|
运维 监控 安全
|
4天前
|
运维 监控 安全
【亮剑】为网络工程师总结了Juniper设备的配置、监控和故障排除命令
【4月更文挑战第30天】本文为网络工程师总结了Juniper设备的配置、监控和故障排除命令。配置命令包括基础设置、路由协议、安全和系统服务;监控命令涉及系统状态、接口、流量及路由表;故障排除命令涵盖日志、接口、路由协议和安全方面的排查工具。掌握这些基本命令将提升网络运维效率。
|
4天前
|
监控 网络协议 安全
【亮剑】当设备IP能ping通但无法上网时,可能是DNS解析、网关/路由设置、防火墙限制、网络配置错误或ISP问题
【4月更文挑战第30天】当设备IP能ping通但无法上网时,可能是DNS解析、网关/路由设置、防火墙限制、网络配置错误或ISP问题。解决步骤包括检查网络配置、DNS设置、网关路由、防火墙规则,以及联系ISP。预防措施包括定期备份配置、更新固件、监控网络性能和实施网络安全策略。通过排查和维护,可确保网络稳定和安全。
|
4天前
|
网络虚拟化 数据安全/隐私保护 数据中心
【专栏】对比了思科与华为网络设备的基本配置、接口、VLAN、路由、访问控制列表及其它关键命令
【4月更文挑战第28天】本文对比了思科与华为网络设备的基本配置、接口、VLAN、路由、访问控制列表及其它关键命令。尽管两者在很多操作上相似,如设备命名(思科:`hostname`,华为:`sysname`)、查看版本信息(思科:`show version`,华为:`display version`),但在某些方面存在差异,如接口速率设置(两者都使用`speed`和`duplex`,但命令结构略有不同)和VLAN配置(华为的`port hybrid`命令)。
|
4天前
|
网络协议 算法 安全
【专栏】硬核干货:BGP(边界网关协议)是自治系统间交换路由信息的关键协议,用于大型网络的高效路由选择
【4月更文挑战第28天】BGP(边界网关协议)是自治系统间交换路由信息的关键协议,用于大型网络的高效路由选择。它基于路径向量算法,通过TCP连接建立邻居关系,交换并选择最优路径。BGP支持丰富的路由属性和多种消息类型,允许灵活的路由控制。配置与应用包括启用BGP、配置邻居、路由宣告、过滤及社区属性使用。虽然BGP具备强大路由控制和可扩展性,但其配置复杂,存在安全挑战。理解BGP对于网络管理和优化至关重要。

热门文章

最新文章