课题内容:

CCNP实战之   OSPF转发地址研究


将area 2 配置为nssa区域,在R2上创建两个环回口,其中一个通告进OSPF,一个重分布进OSPF

观察七类LSA的情况;

在R1上做7转5时抑制转发地址,观察现象;

在R2上将RIP重分布进OSPF,观察 area 2 为特殊区域时和为普通区域时的现象;

拓扑:

CCNP实战教程之OSPF转发地址研究_第1张图片

配置基本的IP地址  (步骤省略)

每台设备的loopback接口地址为: 10.1.1.X/32 X = 设备编号

配置OSPF (步骤省略)

在R2上创建两个环回口,其中一个通告进OSPF,一个重分布进OSPF

R2#show run int l0

interface Loopback0

ip address 10.1.1.2 255.255.255.255

ip ospf 110 area 2

R2#show run int l1

Building configuration...

interface Loopback1

ip address 2.2.2.2 255.255.255.255

R2#show run | s r o

router ospf 110

area 2 nssa

redistribute connected subnets


观察七类LSA的情况

R2#show ip ospf database nssa-external

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

Type-7 AS External Link States (Area 2)

LS age: 59

Options: (No TOS-capability, Type 7/5 translation, DC, Upward)

LS Type: AS External Link

Link State ID: 2.2.2.2 (External Network Number )

Advertising Router: 10.1.1.2

LS Seq Number: 80000001

Checksum: 0x254D

Length: 36

Network Mask: /32

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

MTID: 0

Metric: 20

Forward Address: 10.1.1.2

External Route Tag: 0


在R1上做7转5时抑制转发地址,观察现象

R1(config)#router ospf 110

R1(config-router)#area 2 nssa translate type7 always suppress-fa


R1#show ip ospf database external

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

Type-5 AS External Link States

LS age: 18

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

LS Type: AS External Link

Link State ID: 2.2.2.2 (External Network Number )

Advertising Router: 10.1.1.1

LS Seq Number: 80000002

Checksum: 0x1A70

Length: 36

Network Mask: /32

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

MTID: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0

// 应用了转发地址抑制参数,生成的五类LSA不再携带转发地址;//


在R2上将RIP重分布进OSPF

配置rip

R2#show run | s r r

router rip

version 2

network 124.0.0.0

no auto-summary

R4#show run | s r r

router rip

version 2

network 10.0.0.0

network 124.0.0.0

no auto-summary

验证:

R2#show ip route rip | begin Gateway

Gateway of last resort is not set

10.0.0.0/32 is subnetted, 2 subnets

R 10.1.1.4 [120/1] via 124.1.1.4, 00:00:03, Ethernet0/2


重分布:

R2(config)#router ospf 110

R2(config-router)#redistribute rip subnets metric-type 1


验证:

R2#show ip ospf database | begin Type-7

Type-7 AS External Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Tag

2.2.2.2 10.1.1.2 520 0x80000001 0x00254D 0

10.1.1.4 10.1.1.2 53 0x80000001 0x004333 0

R3#show ip route ospf | begin Gateway

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets

O E2 2.2.2.2 [110/20] via 13.1.1.1, 00:09:14, Serial1/1

10.0.0.0/32 is subnetted, 3 subnets

O IA 10.1.1.2 [110/75] via 13.1.1.1, 00:09:50, Serial1/1

O E1 10.1.1.4 [110/84] via 13.1.1.1, 00:01:33, Serial1/1

124.0.0.0/24 is subnetted, 1 subnets

O IA 124.1.1.0 [110/74] via 13.1.1.1, 00:10:30, Serial1/1


观察 area 2 为特殊区域时的现象

R2#show ip ospf database nssa-external 10.1.1.4

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

Type-7 AS External Link States (Area 2)

LS age: 121

Options: (No TOS-capability, Type 7/5 translation, DC, Upward)

LS Type: AS External Link

Link State ID: 10.1.1.4 (External Network Number )

Advertising Router: 10.1.1.2

LS Seq Number: 80000001

Checksum: 0x4333

Length: 36

Network Mask: /32

Metric Type: 1 (Comparable directly to link state metric)

MTID: 0

Metric: 20

Forward Address: 124.1.1.4

External Route Tag: 0


为普通区域时的现象

将area 2修改为普通区域  (步骤省略)

观察LSA:

R1#show ip ospf database external

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

Type-5 AS External Link States

Routing Bit Set on this LSA in topology Base with MTID 0

LS age: 28

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

LS Type: AS External Link

Link State ID: 2.2.2.2 (External Network Number )

Advertising Router: 10.1.1.2

LS Seq Number: 80000001

Checksum: 0x1674

Length: 36

Network Mask: /32

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

MTID: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0

Routing Bit Set on this LSA in topology Base with MTID 0

LS age: 28

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

LS Type: AS External Link

Link State ID: 10.1.1.4 (External Network Number )

Advertising Router: 10.1.1.2

LS Seq Number: 80000001

Checksum: 0xD7A8

Length: 36

Network Mask: /32

Metric Type: 1 (Comparable directly to link state metric)

MTID: 0

Metric: 20

Forward Address: 124.1.1.4

External Route Tag: 0

来自R2环回口的网络,重分布进入OSPF之后,并没有携带转发地址;

R2上来自RIP的路由重分布进入OSPF之后携带了转发地址;


谢谢大家!
我是达叔。