天天看点

学习回顾——OSPF路由协议(0x3B)-OSPFv3 NSSA区域配置示例

作者:角落里的渣渣

如图所示,将Area1配置为NSSA区域,同时将AR1配置为ASBR,引入外部路由(静态路由),其使引入的静态路由信息可正确的在整个AS内传播。

学习回顾——OSPF路由协议(0x3B)-OSPFv3 NSSA区域配置示例

1) 配置端口IPv6地址并启用OSPFv3

【AR-1配置】

ipv6

ospfv3 1

router-id 1.1.1.1

#

interface GigabitEthernet0/0/0

ipv6 enable

ipv6 address 2001:1::2/64

ospfv3 1 area 0.0.0.1

#

#

interface GigabitEthernet0/0/1

ipv6 enable

ipv6 address 2001:3::1/64

ospfv3 1 area 0.0.0.1

【AR-2配置】

ipv6

#

ospfv3 1

router-id 2.2.2.2

#

interface GigabitEthernet0/0/0

ipv6 enable

ipv6 address 2001::1/64

ospfv3 1 area 0.0.0.0

#

interface GigabitEthernet0/0/1

ipv6 enable

ipv6 address 2001:1::1/64

ospfv3 1 area 0.0.0.1

#

【AR-2配置】

ipv6

#

ospfv3 1

router-id 3.3.3.3

#

interface GigabitEthernet0/0/0

ipv6 enable

ipv6 address 2001::2/64

ospfv3 1 area 0.0.0.0

#

interface GigabitEthernet0/0/1

ipv6 enable

ipv6 address 2001:2::1/64

ospfv3 1 area 0.0.0.2

#

【AR-3配置】

ipv6

#

ospfv3 1

router-id 3.3.3.3

#

interface GigabitEthernet0/0/0

ipv6 enable

ipv6 address 2001::2/64

ospfv3 1 area 0.0.0.0

#

interface GigabitEthernet0/0/1

ipv6 enable

ipv6 address 2001:2::1/64

ospfv3 1 area 0.0.0.2

#

【AR-4配置】

ipv6

#

#

ospfv3 1

router-id 4.4.4.4

#

interface GigabitEthernet0/0/0

ipv6 enable

ipv6 address 2001:2::2/64

ospfv3 1 area 0.0.0.2

#

【验证配置-查看AR-2的OSPFv3邻居状态】

<AR-2>display ospfv3 peer

OSPFv3 Process (1)

OSPFv3 Area (0.0.0.0)

Neighbor ID Pri State Dead Time Interface Instance ID

3.3.3.3 1 Full/Backup 00:00:38 GE0/0/0 0

OSPFv3 Area (0.0.0.1)

Neighbor ID Pri State Dead Time Interface Instance ID

1.1.1.1 1 Full/DR 00:00:40 GE0/0/1 0

<AR-2>

【验证配置-查看AR-3的OSPFv3邻居状态】

<AR-3>display ospfv3 peer

OSPFv3 Process (1)

OSPFv3 Area (0.0.0.0)

Neighbor ID Pri State Dead Time Interface Instance ID

2.2.2.2 1 Full/DR 00:00:37 GE0/0/0 0

OSPFv3 Area (0.0.0.2)

Neighbor ID Pri State Dead Time Interface Instance ID

4.4.4.4 1 Full/Backup 00:00:34 GE0/0/1 0

<AR-3>

【验证配置-查看AR-4的OSPFv3路由表信息】AR-4上除了自己有一套直连路由外,还有本例中全部3条连接在其他设备上的非直连网段路由。

<AR-4>display ospfv3 routing

Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,

N - NSSA, U - Uninstalled

OSPFv3 Process (1)

Destination Metric Next-hop

IA 2001::/64 2 viaFE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

IA 2001:1::/64 3 viaFE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

2001:2::/64 1 directly connected, GigabitEthernet0/0/0

IA 2001:3::/64 4 viaFE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

<AR-4>

2) 将Area配置NSSA区域,并引入静态路由

【在AR-1上配置将Area 1配置成NSSA】

#

ospfv3 1

router-id 1.1.1.1

area 0.0.0.1

nssa

#

【在AR-2上配置将Area 1配置成NSSA】

#

ospfv3 1

router-id 1.1.1.1

area 0.0.0.1

nssa

#

【在AR1上】查看OSPFv3路由表信息,此时会按到因为配置区域1位NSSA区域后新增的一条缺省路由。

[AR-1]display ospfv3 routing

Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,

N - NSSA, U - Uninstalled

OSPFv3 Process (1)

Destination Metric Next-hop

E2 ::/0 1 N viaFE80::2E0:FCFF:FE89:5BD5,GigabitEthernet0/0/0

IA 2001::/64 2 via FE80::2E0:FCFF:FE89:5BD5,GigabitEthernet0/0/0

2001:1::/64 1 directly connected, GigabitEthernet0/0/0

IA 2001:2::/64 3 via FE80::2E0:FCFF:FE89:5BD5,GigabitEthernet0/0/0

2001:3::/64 1 directly connected, GigabitEthernet0/0/1

[AR-1]

【在AR1上配置并引入静态路由】

#

ospfv3 1

router-id 1.1.1.1

import-route static

area 0.0.0.1

nssa

#

ipv6 route-static 1234:: 64 NULL0

【在AR4上验证】

[AR-4]dis ospfv3 routing

Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,

N - NSSA, U - Uninstalled

OSPFv3 Process (1)

Destination Metric Next-hop

E2 1234::/64 1 via FE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

IA 2001::/64 2 via FE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

IA 2001:1::/64 3 via FE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

2001:2::/64 1 directly connected, GigabitEthernet0/0/0

IA 2001:3::/64 4 via FE80::2E0:FCFF:FE68:4C5A,GigabitEthernet0/0/0

[AR-4]

继续阅读