ospf 区域类型详细

我们知道ospf中有几种区域类型:stub ,totally stub ,nssa ,totally nssa.

下面分别讲一下各种区域类型对路由的改变,实验图如下:



按如图配置好相关接口和参数,配置好后,查看R6路由如下:

O IA 192.168.123.0/24 [110/20] via 192.168.36.3, 00:00:04, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

O IA 1.1.1.1 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

O IA 2.2.2.2 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

O IA 192.168.14.0/24 [110/30] via 192.168.36.3, 00:00:04, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/11] via 192.168.36.3, 00:00:04, FastEthernet0/0

O IA 192.168.25.0/24 [110/30] via 192.168.36.3, 00:00:05, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

6.0.0.0/32 is subnetted, 1 subnets

C 6.6.6.6 is directly connected, Loopback0

172.16.0.0/24 is subnetted, 4 subnets

O E2 172.16.0.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

O E2 172.16.1.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

O E2 172.16.2.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

O E2 172.16.3.0 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

C 192.168.36.0/24 is directly connected, FastEthernet0/0

O E2 192.168.0.0/24 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

O E2 192.168.1.0/24 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

O E2 192.168.2.0/24 [110/20] via 192.168.36.3, 00:00:05, FastEthernet0/0

O E2 192.168.3.0/24 [110/20] via 192.168.36.3, 00:00:06, FastEthernet0/0

配置R3及R6 area 3 为stub区域:

配置命令为:

R3(config-router)#area 3 stub

R6(config-router)#area 3 stub

修改完成后,R6路由如下:

O IA 192.168.123.0/24 [110/20] via 192.168.36.3, 00:00:04, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

O IA 1.1.1.1 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

O IA 2.2.2.2 [110/21] via 192.168.36.3, 00:00:04, FastEthernet0/0

O IA 192.168.14.0/24 [110/30] via 192.168.36.3, 00:00:04, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/11] via 192.168.36.3, 00:00:04, FastEthernet0/0

O IA 192.168.25.0/24 [110/30] via 192.168.36.3, 00:00:05, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/31] via 192.168.36.3, 00:00:05, FastEthernet0/0

6.0.0.0/32 is subnetted, 1 subnets

C 6.6.6.6 is directly connected, Loopback0

C 192.168.36.0/24 is directly connected, FastEthernet0/0

O*IA 0.0.0.0/0 [110/11] via 192.168.36.3, 00:00:07, FastEthernet0/0

由此可知stub区域不接收任何外部路由,用一条默认路由替代所有外部路由。

先在R4上查看路由表:

O IA 192.168.123.0/24 [110/20] via 192.168.14.1, 00:00:51, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

O IA 1.1.1.1 [110/11] via 192.168.14.1, 00:00:51, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

O IA 2.2.2.2 [110/21] via 192.168.14.1, 00:00:51, FastEthernet0/0

C 192.168.14.0/24 is directly connected, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/21] via 192.168.14.1, 00:00:51, FastEthernet0/0

O IA 192.168.25.0/24 [110/30] via 192.168.14.1, 00:00:52, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

C 4.4.4.4 is directly connected, Loopback0

5.0.0.0/32 is subnetted, 1 subnets

O IA 5.5.5.5 [110/31] via 192.168.14.1, 00:00:52, FastEthernet0/0

6.0.0.0/32 is subnetted, 1 subnets

O IA 6.6.6.6 [110/31] via 192.168.14.1, 00:00:52, FastEthernet0/0

172.16.0.0/24 is subnetted, 4 subnets

O E2 172.16.0.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

O E2 172.16.1.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

O E2 172.16.2.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

O E2 172.16.3.0 [110/20] via 192.168.14.1, 00:00:52, FastEthernet0/0

O IA 192.168.36.0/24 [110/30] via 192.168.14.1, 00:00:52, FastEthernet0/0

C 192.168.0.0/24 is directly connected, Loopback1

C 192.168.1.0/24 is directly connected, Loopback1

C 192.168.2.0/24 is directly connected, Loopback1

C 192.168.3.0/24 is directly connected, Loopback1

在R4和R1上运行以下命令:

R2(config-router)#area 2 nssa no-summary

R4(config-router)#area 2 nssa no-summary

再次查看路由表:

C 192.168.14.0/24 is directly connected, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

C 4.4.4.4 is directly connected, Loopback0

C 192.168.0.0/24 is directly connected, Loopback1

C 192.168.1.0/24 is directly connected, Loopback1

C 192.168.2.0/24 is directly connected, Loopback1

C 192.168.3.0/24 is directly connected, Loopback1

O*IA 0.0.0.0/0 [110/11] via 192.168.14.1, 00:00:19, FastEthernet0/0

由此可知nssa totally 区域去掉所区域间和外部路由

先来查看一下R5路由表:

O IA 192.168.123.0/24 [110/20] via 192.168.25.2, 00:35:59, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

O IA 1.1.1.1 [110/21] via 192.168.25.2, 00:35:59, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

O IA 2.2.2.2 [110/11] via 192.168.25.2, 00:35:59, FastEthernet0/0

O IA 192.168.14.0/24 [110/30] via 192.168.25.2, 00:35:59, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/21] via 192.168.25.2, 00:35:59, FastEthernet0/0

C 192.168.25.0/24 is directly connected, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/31] via 192.168.25.2, 00:02:07, FastEthernet0/0

5.0.0.0/32 is subnetted, 1 subnets

C 5.5.5.5 is directly connected, Loopback0

6.0.0.0/32 is subnetted, 1 subnets

O IA 6.6.6.6 [110/31] via 192.168.25.2, 00:12:47, FastEthernet0/0

172.16.0.0/24 is subnetted, 4 subnets

C 172.16.0.0 is directly connected, Loopback1

C 172.16.1.0 is directly connected, Loopback1

C 172.16.2.0 is directly connected, Loopback1

C 172.16.3.0 is directly connected, Loopback1

O IA 192.168.36.0/24 [110/30] via 192.168.25.2, 00:12:47, FastEthernet0/0

O E2 192.168.0.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

O E2 192.168.1.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

O E2 192.168.2.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

O E2 192.168.3.0/24 [110/20] via 192.168.25.2, 00:02:02, FastEthernet0/0

在R2和R5上运行如下命令:

R2(config-router)#area 1 nssa

R5(config-router)#area 1 nssa

O IA 192.168.123.0/24 [110/20] via 192.168.25.2, 00:00:02, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

O IA 1.1.1.1 [110/21] via 192.168.25.2, 00:00:02, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

O IA 2.2.2.2 [110/11] via 192.168.25.2, 00:00:02, FastEthernet0/0

O IA 192.168.14.0/24 [110/30] via 192.168.25.2, 00:00:02, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/21] via 192.168.25.2, 00:00:02, FastEthernet0/0

C 192.168.25.0/24 is directly connected, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/31] via 192.168.25.2, 00:00:03, FastEthernet0/0

5.0.0.0/32 is subnetted, 1 subnets

C 5.5.5.5 is directly connected, Loopback0

6.0.0.0/32 is subnetted, 1 subnets

O IA 6.6.6.6 [110/31] via 192.168.25.2, 00:00:03, FastEthernet0/0

172.16.0.0/24 is subnetted, 4 subnets

C 172.16.0.0 is directly connected, Loopback1

C 172.16.1.0 is directly connected, Loopback1

C 172.16.2.0 is directly connected, Loopback1

C 172.16.3.0 is directly connected, Loopback1

O IA 192.168.36.0/24 [110/30] via 192.168.25.2, 00:00:03, FastEthernet0/0

这时发现没有默认路由,需运行以下命令:

R2(config-router)#area 1 nssa default-information-originate

这时R5路由如下:

O IA 192.168.123.0/24 [110/20] via 192.168.25.2, 00:01:57, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

O IA 1.1.1.1 [110/21] via 192.168.25.2, 00:01:57, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

O IA 2.2.2.2 [110/11] via 192.168.25.2, 00:01:57, FastEthernet0/0

O IA 192.168.14.0/24 [110/30] via 192.168.25.2, 00:01:57, FastEthernet0/0

3.0.0.0/32 is subnetted, 1 subnets

O IA 3.3.3.3 [110/21] via 192.168.25.2, 00:01:57, FastEthernet0/0

C 192.168.25.0/24 is directly connected, FastEthernet0/0

4.0.0.0/32 is subnetted, 1 subnets

O IA 4.4.4.4 [110/31] via 192.168.25.2, 00:01:59, FastEthernet0/0

5.0.0.0/32 is subnetted, 1 subnets

C 5.5.5.5 is directly connected, Loopback0

6.0.0.0/32 is subnetted, 1 subnets

O IA 6.6.6.6 [110/31] via 192.168.25.2, 00:01:59, FastEthernet0/0

172.16.0.0/24 is subnetted, 4 subnets

C 172.16.0.0 is directly connected, Loopback1

C 172.16.1.0 is directly connected, Loopback1

C 172.16.2.0 is directly connected, Loopback1

C 172.16.3.0 is directly connected, Loopback1

O IA 192.168.36.0/24 [110/30] via 192.168.25.2, 00:01:59, FastEthernet0/0

O*N2 0.0.0.0/0 [110/1] via 192.168.25.2, 00:00:06, FastEthernet0/0

(0)

相关推荐

  • ospf 区域间路由的COST值是什么

    一.拓扑图: 二.配置及说明: 1.配置完各接口的IP和ospf 协议.我是用R0路由器配置成帧中继交换机的,这样更有利于我们更好地理解帧中继.注意:在R1和R4走FR接口中,可以定义接口类型 ip ...

  • 飞鱼星路由接口类型详细介绍

    只要使用路由器的人都知道,路由器上有不同的接口,对于一般用户而言,我们只需要用到WAN口和LAN口,这两种接口外表看起来是一样的,但它的用处是不一样的,本文就以飞鱼星路由器为例,给大家介绍WAN口和L ...

  • 网络协议之OSPF的NSSA区域原理与配置

    OSPF路由协议在因特网的发展历程上正起着越来越重大的作用。而NSSA则是在该协议发展过程中产生的一种新的属性。而关于NSSA区域的理解,一直是广大网络爱好者的心头之痒。这篇文章,从NSSA区域的产生 ...

  • eNSP模拟器---OSPF协议实验(单区域配置)

    OSPF(Open Shortest Path First开放式最短路径优先)是一个内部网关协议(Interior Gateway Protocol,简称IGP),用于在单一自治系统(autonomo ...

  • 三层交换机怎么配ospf?

    R1路由器的配置: 帧中继静态映射. NSSA网络类型及NSSA边界路由器的配置. NSSA网络中的DR路由器和邻居路由器的配置. 区域网络的发布. 环回接口的配置. (config)#interfa ...

  • OSPF 邻居关系不能正常建立的原因和解决方法

    OSPF 邻居关系 操作方法 01 (1)接口上没有激活 ospf 就是在 network 语句的时候没有匹配清楚,比如配置了错误的反掩码不对,在 show ip ospf interface 的时候 ...

  • 飞鱼星路由OSPF长时间不通故障的解决方法

    链路状态广播是链接状态协议使用的一个分组,它包括有关邻居和通道成本的信息。LSAs被接收路由器用于维护它们的路由选择表。每一个OSPFLSA都有一个生存期,它指示LSA是否仍然还有效。一旦LSA到达了 ...

  • DNS服务器中创建正向查找区域的操作步骤

    创建正向查找区域ynkm.com,并在该区域下创建主机记录Webserver,ynkm.com。操作步骤如下: ①打开“(Insmgmt”控制台窗口,选择要创建正向查找区域的DNS服务器,然后在菜单栏 ...

  • 怎么在Windows Server 2012 R2系统中创建DNS反向主要区域?

    很多使用Windows Server 2012 R2系统的用户都不知道该如何创建DNS反向主要区域,接下来小编就给大家介绍一下具体的操作步骤.具体如下:1. 首先第一步进入装有Windows Serv ...