odr(hub and spoke 场景)

noteId: WEB0eb39689158b3fb38e546ceae3505952 · 原始路径:/ALL/网络 - C模块/1-路由协议合集、路由控制、策略路由/odr(hub and spoke)/odr(hub and spoke 场景).note

·什么是odr:

odr 是用于hub和spoke场景的极简解决方案,很类似ospf的stub区域,spoke将路由通过cdp发送给hub,hub下发默认路由给spoke

·注意:spoke不能运行其他动态路由协议,但是hub可以;换种说法,所有运行了动态路由协议的路由器,都不用担心它成为odr的spoke被下发默认路由

一、配置 odr:

1、配置 hub:

实际上只需要敲:router odr

cdp run //默认开启int g0/1 //进入连接 hub或spoke的接口 cdp enable //开启cdp(默认开启)router odr //开启odr

配置之后,就会自动与其他路由器/三层交换机建立连接,获取它的地址并下发默认路由

2、配置 spoke:

spoke 不需要配置,会自动与hub建立连接

cdp run //默认开启int g0/1 //进入连接 hub或spoke的接口 cdp enable //开启cdp(默认开启)

3、(可选)设置被动接口:

在 hub 上:router odr passive-interface default no passive-interface g0/0

二、把 odr 重分发进行动态路由:

在 hub 上:router ospf 39 redistribute odr subnet