设为首页   锐捷官网
用其他帐号登录:
查看: 1799|回复: 1

[讨论] 4 OSPF >> 4.4 配置举例 >> 4.4.5 OSPF重分布静态路由

[复制链接]

72

主题

129

帖子

1670

积分

金牌会员

Rank: 6Rank: 6

积分
1670
发表于 2016-3-23 14:43:31 | 显示全部楼层 |阅读模式
本帖 * 后由 no_on 于 2016-6-29 12:12 编辑

4 OSPF  >>  4.4 配置举例 >> 4.4.5 OSPF重分布静态路由
拓扑图
下图为一个 OSPF 自治域的组网拓扑图。如图所示整个自治域被划分为三个区域:区域 0、区域 1 和区域 2。网段 172.10.10.0为路由域外的网络。

OSPF重分布静态路由

OSPF重分布静态路由
应用需求
配置 A B 为区域边界设备( ABR), C 为区域内部设备, 在 D 上配置其为 ASBR 引入一条外部静态路由,使得所有非stub 区域的 OSPF 设备成功学习到该外部路由。
配置要点
配置设备各接口 IP 地址(略)
配置 OSPF 基本功能(同配置举例:多区域 OSPF
配置引入自治系统外部静态路由
配置步骤
* 步,在 D 上配置一条到目的网段 172.10.10.0 网段的静态路由
D(config)#ip route 172.10.10.0 255.255.255.0 192.168.6.2
* 步,查看 A 的路由表
A#show ip route ospf
O IA 192.168.3.0/24 [110/2] via 192.168.1.2, 15:33:00, GigabitEthernet 0/1
O 192.168.5.0/24 [110/2] via 192.168.2.2, 15:14:59, GigabitEthernet 0/2
O IA 192.168.6.0/24 [110/3] via 192.168.1.2, 00:17:58, GigabitEthernet 0/1
由以上信息可以看出,无到达 172.10.10.0 网段的路由信息
第三步,在 D 上配置静态路由重分布
D(config)#router ospf 1
D(config-router)# redistribute static subnets
&说明:任何设备配置redistribute命令后,将自动成为ASBR。
配置验证
* 步,查看 D 的路由表
D#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default
Gateway of last resort is no set
S 172.10.10.0/24 [1/0] via 192.168.6.2
O IA 192.168.1.0/24 [110/2] via 192.168.3.1, 15:25:19, GigabitEthernet 0/3
O IA 192.168.2.0/24 [110/3] via 192.168.3.1, 15:25:19, GigabitEthernet 0/3
C 192.168.3.0/24 is directly connected, GigabitEthernet 0/3
C 192.168.3.2/32 is local host.
O IA 192.168.5.0/24 [110/4] via 192.168.3.1, 15:11:56, GigabitEthernet 0/3
C 192.168.6.0/24 is directly connected, GigabitEthernet 0/4
C 192.168.6.1/32 is local host.

* 步,查看 D OSPF 信息;关注点: D 为自治系统边界设备 ASBR
D#show ip ospf
Routing Process "ospf 1" with ID 192.168.3.2
Process uptime is 15 hours 27 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583Compatibility flag is enabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Enable two-way-maintain
This router is an ASBR (injecting external routing information)
Initial SPF schedule delay 1000 msecs

Minimum hold time between two consecutive SPFs 5000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Initial LSA throttle delay 0 msecs
Minimum hold time for LSA throttle 5000 msecs
Maximum wait time for LSA throttle 5000 msecs
Lsa Transmit Pacing timer 40 msecs, 10 LS-Upd
Minimum LSA arrival 1000 msecs
Pacing lsa-group: 240 secs
Number of incomming current DD exchange neighbors 0/5
Number of outgoing current DD exchange neighbors 0/5
Number of external LSA 1. Checksum 0x006DB0
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 1
External LSA database is unlimited.
Number of LSA originated 2
Number of LSA received 173

Log Neighbor Adjency Changes : Enabled
Number of areas attached to this router: 1: 1 normal 0 stub 0 nssa
Area 2
Number of interfaces in this area is 2(2)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:06:27.540 ago
SPF algorithm executed 9 times
Number of LSA 6. Checksum 0x0212ff

第三步,查看 A 的路由表
A#show ip route ospf
O E2 172.10.10.0/24 [110/20] via 192.168.1.2, 00:07:37, GigabitEthernet 0/1
O IA 192.168.3.0/24 [110/2] via 192.168.1.2, 15:33:00, GigabitEthernet 0/1
O 192.168.5.0/24 [110/2] via 192.168.2.2, 15:14:59, GigabitEthernet 0/2
O IA 192.168.6.0/24 [110/3] via 192.168.1.2, 00:17:58, GigabitEthernet 0/1
从以上信息可以看出, A 成功学习到 172.10.10.0 网段的路由信息

回复

使用道具 举报

93

主题

323

帖子

1453

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1453
发表于 2016-3-23 15:04:04 | 显示全部楼层
有2个帖子的标题是一样的,搜索起来不是很方便,建议修改一下标题,做个区分~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则