CCNP實戰教程之OSPF轉發地址研究

課題內容:redis

CCNP實戰之   OSPF轉發地址研究網絡


將area 2 配置爲nssa區域,在R2上建立兩個環回口,其中一個通告進OSPF,一個重分佈進OSPFide

觀察七類LSA的狀況;oop

在R1上作7轉5時抑制轉發地址,觀察現象;ui

在R2上將RIP重分佈進OSPF,觀察 area 2 爲特殊區域時和爲普通區域時的現象;this

拓撲:spa

clip_image001

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

每臺設備的loopback接口地址爲: 10.1.1.X/32 X = 設備編號router

配置OSPF (步驟省略)blog

在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以後攜帶了轉發地址;


謝謝你們!我是達叔。

相關文章
相關標籤/搜索