课题内容:

OSPF路由汇总研究


在R5上配置4个末节网络,通告进OSPF区域1,在R3上做汇总为一条路由

观察汇总后的情况:产生指向的null 0的路由、汇总路由的度量值、LSA

在R2上配置四个末节网络,重分布进OSPF区域2,在R2上做汇总

观察汇总后的情况:产生指向的null 0的路由、汇总路由的度量值、LSA

拓扑图

CCNP实战教程之OSPF路由汇总研究_第1张图片

步骤:

一、进行基本部署

1、 配置IP地址  配置省略  (含帧中继配置)

R2:

default int s1/0

default int s1/1

default int s1/2

frame-relay switching

interface Serial1/0

no ip address

no shut

encapsulation frame-relay

frame-relay intf-type dce

frame-relay route 103 interface Serial1/2 301

frame-relay route 104 interface Serial1/1 401 //本实验中,没有这条配置 //

!

interface Serial1/1

no ip address

no shut

encapsulation frame-relay

frame-relay intf-type dce

frame-relay route 401 interface Serial1/0 104 //本实验中,没有这条配置 //

frame-relay route 403 interface Serial1/2 304

!

interface Serial1/2

no ip address

no shut

encapsulation frame-relay

frame-relay intf-type dce

frame-relay route 301 interface Serial1/0 103

frame-relay route 304 interface Serial1/1 403

R1:

interface Serial1/0

no shutdown

ip address 10.1.1.1 255.255.255.0

encapsulation frame-relay

R3:

interface Serial1/2

no shutdown

ip address 10.1.1.3 255.255.255.0

encapsulation frame-relay

R4:

interface Serial1/1

no shutdown

ip address 10.1.1.4 255.255.255.0

encapsulation frame-relay

每台设备配置环回口,做为router-id

规划为: 172.16.1.X/32中 X = 设备编号

例如: R1的环回口地址为  172.16.1.1/32


2、 配置OSPF协议  (配置省略)

需要特殊注意,R1、R3、R4通过帧中继网络互联,其中R1和R4之间没有虚电路,无法直接通信,在这里推荐采用OSPF的点到多点网络工作模式;

检查OSPF邻居:

R3#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

172.16.1.1 0 FULL/ - 00:01:49 10.1.1.1 Serial1/2

172.16.1.4 0 FULL/ - 00:01:56 10.1.1.4 Serial1/2

172.16.1.5 0 FULL/ - 00:00:32 10.1.35.5 Ethernet0/3

R2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

172.16.1.1 1 FULL/DROTHER 00:00:32 10.1.124.1 Ethernet0/2

172.16.1.4 1 FULL/DR 00:00:38 10.1.124.4 Ethernet0/2


3、 在R5上配置4个末节网络,通告进OSPF区域1,在R3上做汇总为一条路由

规划四个末节网络IP网络号分别为: 192.168.5.0/30 配置四个连续的子网;

R5

interface Loopback0

ip address 192.168.5.1 255.255.255.252 secondary

ip address 192.168.5.5 255.255.255.252 secondary

ip address 192.168.5.9 255.255.255.252 secondary

ip address 192.168.5.13 255.255.255.252 secondary

ip address 172.16.1.5 255.255.255.255

ip ospf 110 area 1


在R3上做汇总为一条路由

R3(config)#router ospf 110

R3(config-router)#area 1 range 192.168.5.0 255.255.255.240


观察汇总后的情况:产生指向的null 0的路由、汇总路由的度量值、LSA

R3#show ip route ospf | in summary

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

O 192.168.5.0/28 is a summary, 00:01:30, Null0

//在R3本地形成了一条指向null 0 的汇总路由


R3#show ip ospf database summary 192.168.5.0 self-originate

OSPF Router with ID (172.16.1.3) (Process ID 110)

Summary Net Link States (Area 0)

LS age: 159

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links(Network)

Link State ID: 192.168.5.0 (summary Network Number)

Advertising Router: 172.16.1.3

LS Seq Number: 80000002

Checksum: 0x70A

Length: 28

Network Mask: /28

MTID: 0 Metric: 11


在R2上配置四个末节网络

规划为:  10.2.X.0/24

ip address 10.2.1.1 255.255.255.0 secondary

ip address 10.2.2.1 255.255.255.0 secondary

ip address 10.2.3.1 255.255.255.0 secondary

ip address 10.2.0.1 255.255.255.0


重分布进OSPF区域2

R2(config)#router ospf 110

R2(config-router)#redistribute connected subnets


验证:

R2#show ip ospf database | begin Type-5

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

10.2.0.0 172.16.1.2 49 0x80000001 0x00A72D 0

10.2.1.0 172.16.1.2 49 0x80000001 0x009C37 0

10.2.2.0 172.16.1.2 49 0x80000001 0x009141 0

10.2.3.0 172.16.1.2 49 0x80000001 0x00864B 0


R5#show ip route ospf | include O E

O E2 10.2.0.0/24 [110/20] via 10.1.35.3, 00:01:29, Ethernet0/3

O E2 10.2.1.0/24 [110/20] via 10.1.35.3, 00:01:29, Ethernet0/3

O E2 10.2.2.0/24 [110/20] via 10.1.35.3, 00:01:29, Ethernet0/3

O E2 10.2.3.0/24 [110/20] via 10.1.35.3, 00:01:29, Ethernet0/3


在R2上做汇总

R2(config-router)#summary-address 10.2.0.0 255.255.252.0

验证:

R2#show ip ospf database | begin Type-5

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

10.2.0.0 172.16.1.2 32 0x80000003 0x009441 0

R5#show ip route ospf | include O E

O E2 10.2.0.0/22 [110/20] via 10.1.35.3, 00:00:43, Ethernet0/3


观察汇总后的情况:产生指向的null 0的路由、汇总路由的度量值、LSA

R2#show ip route ospf | include summary

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

l 10.2.0.0/22 is a summary, 00:01:28, Null0

R2#show ip ospf database external self-originate

OSPF Router with ID (172.16.1.2) (Process ID 110)

Type-5 AS External Link States

LS age: 112

Options: (No TOS-capability, DC, Upward)

LS Type: AS External Link

Link State ID: 10.2.0.0 (External Network Number )

Advertising Router: 172.16.1.2

LS Seq Number: 80000003

Checksum: 0x9441

Length: 36

Network Mask: /22

Metric Type: 2 (Larger than any link state path)

MTID: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0


谢谢大家!
我是达叔。