API Guide

更改参数和查看接口状态
OS10(conf-if-eth1/1/1)# ip ospf hello-interval 5
OS10(conf-if-eth1/1/1)# ip ospf dead-interval 20
OS10(conf-if-eth1/1/1)# ip ospf retransmit-interval 30
OS10(conf-if-eth1/1/1)# ip ospf transmit-delay 200
查看 OSPF 接口配置
OS10(conf-if-eth1/1/1)# do show ip ospf interface
ethernet1/1/1 is up, line protocol is up
Internet Address 11.1.1.1/24, Area 0.0.0.0
Process ID 65535, Router ID 99.99.99.99, Network Type broadcast, Cost: 1
Transmit Delay is 200 sec, State BDR, Priority 1
Designated Router (ID) 150.1.1.1, Interface address 11.1.1.2
Backup Designated router (ID) 99.99.99.99, Interface address 11.1.1.1
Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 30
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 150.1.1.1(Designated Router)
Identifier GUID-C00C9C7D-5C5A-4674-BC5F-ECE7583EB85D
Version 7
Status Translation approved
重新分发路由
将其他路由实例或协议的路由添加到 OSPFv2 进程并在 OSPFv2 进程中包含 BGP、静态或连接的路由。除非存在与 OSPFv2 重新
分发关联的路由映射否则请勿将 IBGP 路由来路由到 OSPFv2
: 在正在运行的配置中重新分发静态命令时如果配置了静态路由也通过 OSPF 进行了学习),即使静态路由首选项高于
OSPF路由表中也会安装静态路由。
ROUTER-OSPF 模式下输入将分配到 OSPFv2 进程的路由。
redistribute {bgp as-number| connected | static} [route-map map-name]
bgp | connected | static 输入关键字以重新分发这些路由。
route-map map-name 输入已配置的路由映射的名称。
配置重新分发路由
OS10(conf-router-ospf-10)# redistribute bgp 4 route-map aloha
OS10(conf-router-ospf-10)# redistribute connected route-map aloha
OS10(conf-router-ospf-10)# redistribute static route-map aloha
查看 OSPF 配置
OS10(conf-router-ospf-10)# do show running-configuration ospf
!
router ospf 10
redistribute bgp 4 route-map aloha
redistribute connected route-map aloha
redistribute static route-map aloha
!
Identifier
GUID-EBD13E8A-3EBA-4E25-9EAD-78372E93F2A6
Version 2
Status Translation approved
默认路由
您可以生成外部默认路由并将默认信息分发至 OSPFv2 路由域。
ROUTER-OSPF 模式下使用 default-information originate [always] 命令生成默认路由。
3 643