OSPF多区域配置与汇总

合集下载

OSPF区域与汇总

OSPF区域与汇总

OSPF区域与汇总OSPF(Open Shortest Path First)是一种用于互联网协议(IP)网络中的动态路由协议。

它使用链路状态路由算法来计算网络中最短路径,以便有效地转发数据包。

OSPF使用区域和汇总来优化网络性能和管理。

首先,让我们了解OSPF区域。

OSPF网络可以被分割成多个区域,每个区域的路由器只负责该区域内的路由计算。

这种分割减少了OSPF网络的复杂性,并提高了网络性能。

每个区域都有一个区域边界路由器(Area Border Router,ABR)用于连接不同区域。

ABR负责在区域之间转发路由信息,以便找到最佳路径。

每个区域都有一个唯一的区域号,并用32位IP地址表示。

1.减少路由器交换的路由信息数量,降低了网络开销,提高了网络性能。

2.提高网络可伸缩性。

当网络扩展时,可以简单地添加新的区域而不影响现有区域。

3.提供了更好的管理和维护。

每个区域内的路由器只需要关心本区域的路由计算,简化了网络管理和故障排除。

接下来,让我们了解OSPF的汇总功能。

在大规模的网络中,有时需要合并网段以减少路由表中的项目数量。

这可以通过汇总来实现。

OSPF提供了几种汇总方式,包括汇总路由、包含汇总和默认汇总。

1.汇总路由:将一组连续的网络合并成一个路由项目。

这样可以减少路由表中的项目数量,提高路由查询的速度。

例如,将子网192.168.1.0/24、192.168.2.0/24和192.168.3.0/24汇总成192.168.0.0/162.包含汇总:将多个网络合并到一个较长的网络范围内。

这个较长的网络范围包含所有要汇总的网络。

例如,将子网192.168.1.0/24和192.168.2.0/24包含汇总到192.168.0.0/223.默认汇总:将所有未知目的地汇总到一个默认路由上。

这样做可以减少对未知目的地的路由计算。

默认汇总通常由边界路由器执行。

例如,将所有从区域内部到外部的流量汇总到默认路由上。

OSPF区域与汇总

OSPF区域与汇总

OSPF的区域结构意义在于:1)减小SPF算法的运算量,使SPF运算只涉及Area内的链路,减少CPU和内存的负荷。

2)缩小LSA的洪泛区域,有效利用带宽3)在边界易于做流量控制,比如汇总和过滤。

OSPF要求所有普通区域(Regular Area)都要与骨干区域(Transmit Area)直连,也就意味着Area间的流量都必须经过Area 0,这样一方面便于进行流量控制,另一方面也是出于避免环路的考虑。

因为虽然OSPF是一种链路状态路由协议,但是仍然运用距离矢量的算法来查找Area间路由,Area 0 内的路由器收到ABR通告的一条网络汇总LSA,并不进行SPF运算,只是简单的加上自己到ABR的路径开销,就记录进路由表,这是典型的Distance Vectors行为。

由此可以总结出这样的观点:OSPF路由器对自己所属Area的了解是“链路和拓扑”,而对其他Area的了解仅仅是“可达的路由”,ABR比较特殊,同属两个Area,所以对两个Area的拓扑都了解,但是对其他Area也是仅仅知道路由而已。

OSPF有两种汇总:Area间路由汇总(Area summary)在ABR执行:area 1 range address mask 外部路由汇总(AS summary)(指重发布进OSPF的路由)在ASBR上执行:summary-address address mask。

OSPF的汇总一定要精确,如果有交叉,比如Area间的路由汇总包含了外部路由的明细条目,这样会出现LSA 5通告的转发地址不可达的现象。

而另外要注意的是,当一个Area存在冗余的ABR,ABR之间应该有直连链路,并将该链路通告到骨干区域中使其得到充分利用。

Virtual-link是在网络设计有误或出现故障的情况下,Area 0本身出现分离或者有区域没和Area 0直连,通过Virtual-link来进行补救,再就是出于冗余链路的考虑使用。

多区OSPF完整配置

多区OSPF完整配置

(一)基本配置一、交换部分说明: 本部分包括SW35-1和SW35-2上VLAN规划、STP、HSRP的实现,及SW65-1和SW65-2上的相关配置。

1. sw29-1的配置hostname sw29-1interface Vlan1ip address 172.16.10.1 255.255.255.0no ip routingip default-gateway 172.16.10.199 10.201 10.200 用于网络测试说明:本处将SW29-1模拟一个节点,进行测试。

第一步,将SW29-1网关设为10.199, SW29-2网关设为30.199, 进行测试。

通!第二步,将SW29-1网关设为10.201, SW29-2网关设为30.201, 进行测试。

通!第三步,将SW29-1网关设为10.200, SW29-2网关设为30.200, 进行测试。

不一定通,这是本虚拟机自身的一个问题。

只要SW35-1成为VLAN10,20的主网关,SW35-2成为VLAN30,40的主网关就行了。

2. sw29-2的配置hostname sw29-2vtp domain richvtp pass ciscovtp mode clientint range f1/1 - 2sw trunk encap dot1qsw mode trunkinterface Vlan30ip address 172.16.30.2 255.255.255.0no ip routingip default-gateway 172.16.30.199 30.201 30.200 用于网络测试说明:由于用SW29-2来模拟一个主机进行测试,因此只能设置一个IP(路由器可以设多个),这里把它作为VLAN30的一个主机30.2, 网关设为30.199 。

3. sw35-1的配置hostname sw35-1no ip domain lookupvtp domain richvtp pass ciscovtp mode servervlan 10vlan 20vlan 30vlan 40exitspanning-tree vlan 10 priority 4096 spanning-tree vlan 20 priority 4096 spanning-tree vlan 30 priority 8192 spanning-tree vlan 40 priority 8192interface Port-channel1switchport mode trunkinterface FastEthernet1/1no switchportip address 192.168.1.1 255.255.255.0interface FastEthernet1/2no switchportip address 192.168.2.1 255.255.255.0interface FastEthernet1/3switchport mode trunkchannel-group 1 mode oninterface FastEthernet1/4switchport mode trunkchannel-group 1 mode oninterface FastEthernet1/5switchport mode trunkinterface FastEthernet1/6switchport access vlan 10interface Vlan10ip address 172.16.10.199 255.255.255.0 standby 1 ip 172.16.10.200standby 1 priority 150standby 1 preemptstandby 1 authentication 123standby 1 track FastEthernet1/1 30 standby 1 track FastEthernet1/2 30interface Vlan20ip address 172.16.20.199 255.255.255.0 standby 2 ip 172.16.20.200standby 2 priority 150standby 2 preemptstandby 2 authentication 123standby 2 track FastEthernet1/1 30 standby 2 track FastEthernet1/2 30interface Vlan30ip address 172.16.30.199 255.255.255.0 standby 3 ip 172.16.30.200standby 3 preemptstandby 3 authentication 123interface Vlan40ip address 172.16.40.199 255.255.255.0 standby 4 ip 172.16.40.200standby 4 preemptstandby 4 authentication 123line con 0exec-timeout 0 0logging synchronous4. sw35-2的配置hostname sw35-2no ip domain lookupvtp domain richvtp pass ciscovtp mode clientspanning-tree vlan 10 priority 8192 spanning-tree vlan 20 priority 8192 spanning-tree vlan 30 priority 4096 spanning-tree vlan 40 priority 4096interface Port-channel1switchport mode trunkinterface FastEthernet1/1no switchportip address 192.168.4.1 255.255.255.0interface FastEthernet1/2no switchportip address 192.168.3.1 255.255.255.0interface FastEthernet1/3switchport mode trunkchannel-group 1 mode oninterface FastEthernet1/4switchport mode trunkchannel-group 1 mode oninterface FastEthernet1/5switchport access vlan 10interface FastEthernet1/6switchport mode trunkinterface Vlan10ip address 172.16.10.201 255.255.255.0 standby 1 ip 172.16.10.200standby 1 preemptstandby 1 authentication 123interface Vlan20ip address 172.16.20.201 255.255.255.0 standby 2 ip 172.16.20.200standby 2 preemptstandby 2 authentication 123interface Vlan30ip address 172.16.30.201 255.255.255.0 standby 3 ip 172.16.30.200standby 3 priority 150standby 3 preemptstandby 3 authentication 123standby 3 track FastEthernet1/1 30standby 3 track FastEthernet1/2 30interface Vlan40ip address 172.16.40.201 255.255.255.0standby 4 ip 172.16.40.200standby 4 priority 150standby 4 preemptstandby 4 authentication 123standby 4 track FastEthernet1/1 30standby 4 track FastEthernet1/2 30line con 0exec-timeout 0 0logging synchronous5. sw65-1的配置说明: 在实际网络应用中SW65-1和SW65-2上应划分VLAN50、60、70、80, 并配置HSRP来实现网关冗余,配置方法同SW35-1和SW35-2. 这里做了简化,用loopback接口来模拟。

OSPF 手工汇总:区域间汇总、外部路由汇总

OSPF 手工汇总:区域间汇总、外部路由汇总

OSPF 手工汇总:区域间汇总、外部路由汇总1.实验目的通过本实验可以掌握:(1)路由汇总的目的(2)区域间路由汇总(3)外部自治系统路由汇总2.实验拓扑本实验的拓扑结构如图7-3 所示。

图7-3 OSPF 手工汇总路由器R1、R2 和R3 之间运行OSPF,路由器R3 和R4 之间运行RIPv2,路由器R1 上的四个环回接口是为在路由器R2 上做区域间路由汇总准备的,路由器R4 上的四个环回接口是为在路由器R3 上做外部路由汇总准备的。

由于路由器R3 是边界路由器,所以要完成双向重分布。

3.实验步骤(1)步骤1:配置路由器R1R1(config)#router ospf 1R1(config-router)#router-id 1.1.1.1R1(config-router)#network 1.1.4.0 0.0.0.255 area 1R1(config-router)#network 1.1.5.0 0.0.0.255 area 1R1(config-router)#network 1.1.6.0 0.0.0.255 area 1R1(config-router)#network 1.1.7.0 0.0.0.255 area 1R1(config-router)#network 192.168.12.0 0.0.0.255 area 1(2)步骤2:配置路由器R2R2(config)#router ospf 1R2(config-router)#router-id 2.2.2.2R2(config-router)#network 192.168.12.0 0.0.0.255 area 1R2(config-router)#network 192.168.23.0 0.0.0.255 area 0R2(config-router)#network 2.2.2.0 0.0.0.255 area 0R2(config-router)#area 1 range 1.1.4.0 255.255.252.0 //配置区域间路由汇总(3)步骤3:配置路由器R3R3(config)#router ospf 1R3(config-router)#router-id 3.3.3.3R3(config-router)#network 3.3.3.0 0.0.0.255 area 0R3(config-router)#network 192.168.23.0 0.0.0.255 area 0R3(config-router)#summary-address 4.4.0.0 255.255.252.0//配置外部自治系统路由汇总R3(config-router)#redistribute rip subnets //将RIP 路由重分布到OSPF 中R3(config)#router ripR3(config-router)#version 2R3(config-router)#no auto-summaryR3(config-router)#network 192.168.34.0R3(config-router)#redistribute ospf 1 metric 2 //将OSPF 路由重分布到RIP 中(4)步骤4:配置路由器R4R4(config)#router ripR4(config-router)#version 2R4(config-router)#no auto-summaryR4(config-router)#network 4.0.0.0R4(config-router)#network 192.168.34.0【技术要点】(1)区域间路由汇总必须在ABR 上完成;(2)外部路由汇总必须在ASBR 上完成。

OSPF实验4OSPF多区域配置

OSPF实验4OSPF多区域配置

OSPF实验四OSPF多区域配置
一、实验目的
配置OSPF的多区域并进行路由汇总。

应用场景:作为使用最为广泛的动态路由协议,OSPF的使用一般都要划分区域并在ABR上针对路由进行汇总。

二、实验设备
四台Cisco 7206 VXR 中由器、IOS版本V ersion 12.3(5)。

三、实验拓普
四、实验步骤
基本配置:
1、设备命名。

2、用Ping命令测试总部和分部链路的连通性。

3、按照拓扑图配置好接口IP和接口描述信息。

OSPF配置:
4、启动OSPF进程并配置Router-ID。

5、把相关接口放入OSPF进程并绑定特定的区域。

6、在ABR上做路由汇总。

五、配置命令
六、测试结果
七、实验思考
1、单区域OSPF能看到OSPF的路由是什么路由?在LSDB中能看到哪些LAS?多区
域?
2、OSPF划分区域的目的是什么?划分区域后什么配置是必须做的?为此在分配地址
时必须注意什么?
3、如何划分多区域?骨干区域的作用是什么?设计拓扑证明骨干区域的作用(有、无
骨干区域)?
4、针对区域间路由在哪个设备做汇总?路由汇总针对的是哪种LSA?
5、这种拓扑有什么问题?实际部署时如何解决?
6、不希望其他区域看到本区域的设备及链路IP,如何实现?
7、LSA1、LSA2、LSA3分别是哪个设备产生的?作用是什么?各自的关系是什么?查看LSA具体的内容?并尝试读解。

标准的OSPF多区域配置

标准的OSPF多区域配置

实验报告配置标准的ospf多区域一.实验目的1.使运行ospf路由协议的路由器能够学习到域内,域间的路由条目2.进行路由汇总简化路由条目3.通过向全网ospf路由器公布默认路由,并设置ISP实现对外部网络的访问二.实验拓扑三.实验步骤1.配置路由器的ip地址R1(config)#int s0/0R1(config-if)#ip add 192.168.1.2 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutR1(config)#int s0/1R1(config-if)#ip add 192.168.224.1 255.255.255.252R1(config-if)#clock rate 64000R1(config-if)#no shutR1(config)#int loopback 0R1(config-if)#ip add 192.168.2.1 255.255.255.0R1(config-if)#no shutR2(config)#int s0/0R2(config-if)#ip add 192.168.1.1 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shutR2(config-if)#int loopback 0R2(config-if)#ip add 192.168.64.1 255.255.240.0R2(config-if)#no shutR3(config)#int s0/0R3(config-if)#ip add 192.168.224.2 255.255.255.252R3(config-if)#clock rate 64000R3(config-if)#no shut2.启用OSPF路由协议(配置OSPF时需要每个接口的Area id的不同)R1(config-if)#router ospf 1R1(config-router)#network 192.168.3.0 0.0.0.255 area 0R1(config-router)#network 192.168.1.0 0.0.0.255 area 0R1(config-router)#network 192.168.224.0 0.0.0.3 area 51R1#sh ip rouGateway of last resort is not set192.168.224.0/30 is subnetted, 1 subnetsC 192.168.224.0 is directly connected, Serial0/1192.168.64.0/32 is subnetted, 1 subnetsO IA 192.168.64.1 [110/65] via 192.168.1.1, 00:00:08, Serial0/0192.168.80.0/32 is subnetted, 1 subnetsO IA 192.168.80.1 [110/65] via 192.168.1.1, 00:00:08, Serial0/0192.168.96.0/32 is subnetted, 1 subnetsO IA 192.168.96.1 [110/65] via 192.168.1.1, 00:00:08, Serial0/0192.168.112.0/32 is subnetted, 1 subnetsO IA 192.168.112.1 [110/65] via 192.168.1.1, 00:00:08, Serial0/0192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksO 192.168.1.0/30 [110/128] via 192.168.1.1, 00:01:21, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/0C 192.168.3.0/24 is directly connected, Loopback0R2(config-if)#router ospf 1R2(config-router)#network 192.168.1.0 0.0.0.255 area 0R2(config-router)#network 192.168.64.0 0.0.240.255 area 1R2(config-router)#network 192.168.80.0 0.0.240.255 area 1R2(config-router)#network 192.168.96.0 0.0.240.255 area 1R2(config-router)#network 192.168.112.0 0.0.240.255 area 1R2#sh ip rouGateway of last resort is not set192.168.224.0/30 is subnetted, 1 subnetsO IA 192.168.224.0 [110/128] via 192.168.1.2, 01:41:45, Serial0/0192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksO 192.168.1.0/24 [110/128] via 192.168.1.2, 01:41:45, Serial0/0C 192.168.1.0/30 is directly connected, Serial0/0192.168.3.0/32 is subnetted, 1 subnetsO 192.168.3.1 [110/65] via 192.168.1.2, 01:41:45, Serial0/0C 192.168.64.0/20 is directly connected, Loopback0C 192.168.80.0/20 is directly connected, Loopback1C 192.168.96.0/20 is directly connected, Loopback2C 192.168.112.0/20 is directly connected, Loopback3R3(config-if)#router ospf 1R3(config-router)#network 192.168.224.0 0.0.0.3 area 51R3#sh ip rouGateway of last resort is not set192.168.224.0/30 is subnetted, 1 subnetsC 192.168.224.0 is directly connected, Serial0/0192.168.64.0/32 is subnetted, 1 subnetsO IA 192.168.64.1 [110/129] via 192.168.224.1, 01:44:32, Serial0/0 192.168.80.0/32 is subnetted, 1 subnetsO IA 192.168.80.1 [110/129] via 192.168.224.1, 01:44:32, Serial0/0 192.168.96.0/32 is subnetted, 1 subnetsO IA 192.168.96.1 [110/129] via 192.168.224.1, 01:44:32, Serial0/0 192.168.112.0/32 is subnetted, 1 subnetsO IA 192.168.112.1 [110/129] via 192.168.224.1, 01:44:32, Serial0/0 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksO IA 192.168.1.0/30 [110/192] via 192.168.224.1, 01:44:32, Serial0/0 O IA 192.168.1.0/24 [110/128] via 192.168.224.1, 01:44:32, Serial0/0 192.168.3.0/32 is subnetted, 1 subnetsO IA 192.168.3.1 [110/65] via 192.168.224.1, 01:44:33, Serial0/0 注:“O”表示域内路由条目“O IA”表示的域间路由条目2.加入外部地址,在R3上添加静态路由(注意路由表中的蓝色条目)R3(config)#ip route 10.10.8.0 255.255.255.0 null 0R3(config)#ip route 10.10.9.0 255.255.255.0 null 0R3(config)#ip route 10.10.10.0 255.255.255.0 null 0R3(config)#ip route 10.10.11.0 255.255.255.0 null 0R3#sh ip rouGateway of last resort is not set192.168.224.0/30 is subnetted, 1 subnetsC 192.168.224.0 is directly connected, Serial0/0192.168.64.0/32 is subnetted, 1 subnetsO IA 192.168.64.1 [110/129] via 192.168.224.1, 01:56:40, Serial0/0 192.168.80.0/32 is subnetted, 1 subnetsO IA 192.168.80.1 [110/129] via 192.168.224.1, 01:56:40, Serial0/010.0.0.0/24 is subnetted, 4 subnetsS 10.10.8.0 is directly connected, Null0S 10.10.9.0 is directly connected, Null0S 10.10.10.0 is directly connected, Null0S 10.10.11.0 is directly connected, Null0192.168.96.0/32 is subnetted, 1 subnetsO IA 192.168.96.1 [110/129] via 192.168.224.1, 01:56:40, Serial0/0 192.168.112.0/32 is subnetted, 1 subnetsO IA 192.168.112.1 [110/129] via 192.168.224.1, 01:56:41, Serial0/0 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksO IA 192.168.1.0/30 [110/192] via 192.168.224.1, 01:56:41, Serial0/0 O IA 192.168.1.0/24 [110/128] via 192.168.224.1, 01:56:41, Serial0/0 192.168.3.0/32 is subnetted, 1 subnetsO IA 192.168.3.1 [110/65] via 192.168.224.1, 01:56:41, Serial0/0R3(config)#router ospf 1R3(config-router)#redistribute static subnets(此命令是对R3上所添加的静态路由进行重发布)R3#sh ip rou (R3路由表条目不会有变化)3.在R1,R2上sh ip router(注意路由表中的红色条目)R1#sh ip rouGateway of last resort is not set192.168.224.0/30 is subnetted, 1 subnetsC 192.168.224.0 is directly connected, Serial0/1192.168.64.0/32 is subnetted, 1 subnetsO IA 192.168.64.1 [110/65] via 192.168.1.1, 00:00:23, Serial0/0192.168.80.0/32 is subnetted, 1 subnetsO IA 192.168.80.1 [110/65] via 192.168.1.1, 00:00:23, Serial0/010.0.0.0/24 is subnetted, 4 subnetsO E2 10.10.8.0 [110/20] via 192.168.224.2, 00:00:23, Serial0/1O E2 10.10.9.0 [110/20] via 192.168.224.2, 00:00:23, Serial0/1O E2 10.10.10.0 [110/20] via 192.168.224.2, 00:00:23, Serial0/1O E2 10.10.11.0 [110/20] via 192.168.224.2, 00:00:23, Serial0/1192.168.96.0/32 is subnetted, 1 subnetsO IA 192.168.96.1 [110/65] via 192.168.1.1, 00:00:23, Serial0/0192.168.112.0/32 is subnetted, 1 subnetsO IA 192.168.112.1 [110/65] via 192.168.1.1, 00:00:23, Serial0/0192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksO 192.168.1.0/30 [110/128] via 192.168.1.1, 01:59:24, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/0C 192.168.3.0/24 is directly connected, Loopback0R2#sh ip rouGateway of last resort is not set192.168.224.0/30 is subnetted, 1 subnetsO IA 192.168.224.0 [110/128] via 192.168.1.2, 01:58:59, Serial0/010.0.0.0/24 is subnetted, 4 subnetsO E2 10.10.8.0 [110/20] via 192.168.1.2, 00:00:08, Serial0/0O E2 10.10.9.0 [110/20] via 192.168.1.2, 00:00:08, Serial0/0O E2 10.10.10.0 [110/20] via 192.168.1.2, 00:00:08, Serial0/0O E2 10.10.11.0 [110/20] via 192.168.1.2, 00:00:08, Serial0/0192.168.1.0/24 is variably subnetted, 2 subnets, 2 masksO 192.168.1.0/24 [110/128] via 192.168.1.2, 01:58:59, Serial0/0C 192.168.1.0/30 is directly connected, Serial0/0192.168.3.0/32 is subnetted, 1 subnetsO 192.168.3.1 [110/65] via 192.168.1.2, 01:58:59, Serial0/0C 192.168.64.0/20 is directly connected, Loopback0C 192.168.80.0/20 is directly connected, Loopback1C 192.168.96.0/20 is directly connected, Loopback2C 192.168.112.0/20 is directly connected, Loopback3注意:IA 表示域间;E2表示域内,路由重发布后,R1,R2上将学习到R3上的静态路由条目。

OSPF高级配置(ABR ASBR、多区域、路由汇总、特殊区域)

OSPF高级配置(ABR ASBR、多区域、路由汇总、特殊区域)

配置命令:r1(config)#router ospf 110r1(config-router)#router-id 1.1.1.1r1(config-router)#net 1.1.1.1 0.0.0.0 area 0r1(config-router)#net 192.168.13.0 0.0.0.255 area 0r1(config-router)#net 192.168.12.0 0.0.0.255 area 0r2(config-router)#router ospf 110r2(config-router)#router-id 2.2.2.2r2(config-router)#network 2.2.2.2 0.0.0.0 area 1r2(config-router)#network 192.168.12.0 0.0.0.255 area 0r2(config-router)#network 192.168.24.0 0.0.0.255 area 1r2(config-router)#area 1 stub no-summaryr2(config-router)#area 1 default-cost 10r3(config-router)#router ospf 110r3(config-router)#router-id 3.3.3.3r3(config-router)#network 3.3.3.3 0.0.0.0 area 2r3(config-router)#network 30.1.1.1 0.0.0.0 area 0r3(config-router)#network 192.168.13.0 0.0.0.255 area 0r3(config-router)#network 192.168.35.0 0.0.0.255 area 2r3(config-router)#area 0 range 30.0.0.0 255.0.0.0r3(config-router)#area 2 nssa no-redistribution default-information-originate r4(config-router)#router ospf 110r4(config-router)#router-id 4.4.4.4r4(config-router)#network 4.4.4.4 0.0.0.0 area 1r4(config-router)#network 192.168.24.0 0.0.0.255 area 1r4(config-router)#area 1 stub no-summaryr4(config-router)#area 1 default-cost 10r5(config-router)#router ospf 110r5(config-router)#router-id 5.5.5.5r5(config-router)#network 50.1.1.1 0.0.0.0 area 2r5(config-router)#network 192.168.35.0 0.0.0.255 area 2r5(config-router)#area 2 nssar5(config-router)#summary-address 50.0.0.0 255.0.0.0 not-advertiser5(config-router)#redistribute connected metric-type 1 subnets查看配置:#sh ip ospf 查看ospf所有进程信息#Sh ip ospf 1 (process-id) 查看OSPF 1 进程信息#sh ip ospf border-routers 查看边界路由器#Sh ip ospf neighbor 查看邻居表;#Sh ip ospf interface 查看ospf接口信息#Sh ip ospf database 查看ospf数据库#Sh ip ospf database database-summary查看ospf数据库总结信息#Sh ip route ospf 查看ospf路由表#Clear ip ospf process 刷新OSPF进程#debug ip ospf adj 查看ospf邻居关系的建立过程(注: 刷新OSPF进程后即可看到输出信息)。

OSPF协议多区域配置实验

OSPF协议多区域配置实验

实验名称:实验十一:OSPF协议多区域配置实验实验目的在本实验中,我们将要完成OSPF多区域的OSPF路由协议的配置过程。

练习使用OSPF 协议的相关命令的使用。

复习与回顾常用动态路由协议的配置过程。

实验内容一、实验环境说明。

1、本次实验将通过Packet Tracer 模拟器软件来完成。

2、在本节中将练习使用以命令:二、实验项目1:配置多区域OSPF协议验证实验。

网络的拓扑结构如下图所示,加载:OSPF协议多区域配置.pkt,拓扑图中各路由器端口属性,已经配置好,请自己查看。

1、请根据以下操作步骤完成OPSP多区域配置。

R1路由器:R1(config)#router ospf 1R1(config-router)#network 10.0.0.0 0.0.0.255 area 1R1(config-router)#network 11.0.0.0 0.0.0.255 area 1R1(config-router)#network 172.16.0.0 0.0.0.255 area 1R1(config-router)#network 172.16.1.0 0.0.0.255 area 1R1(config-router)#network 172.16.2.0 0.0.0.255 area 1R1(config-router)#network 172.16.3.0 0.0.0.255 area 1R1(config-router)#endR1#copy running-config startup-configR2路由器:R2#con tR2(config)#router ospf 1R2(config-router)#network 11.0.0.0 0.0.0.255 area 1R2(config-router)#network 12.0.0.0 0.0.0.255 area 0R2(config-router)#endR2#copy running-config startup-configR3路由器:R3#con tR3(config)#router ospf 1R3(config-router)#network 12.0.0.0 0.0.0.255 area 0R3(config-router)#network 13.0.0.0 0.0.0.255 area 2R3(config-router)#endR3#copy running-config startup-configR4路由器:R4#con tR4(config)#router ospf 1R4(config-router)#network 13.0.0.0 0.0.0.255 area 2R4(config-router)#network 14.0.0.0 0.0.0.255 area 2R4(config-router)#endR4#copy running-config startup-config2、在完成上述配置后,在R2路由器上运行show ip rotue 命令来查看其路由表。

第9_OSPF多区综合配置

第9_OSPF多区综合配置

OSPF多区综合配置1.路由重分发完成标准:每个路由器都学到了10条路由2.Stub区域的配置完成标准:在stub区域的路由器R1只保留6条路由和1条缺省路由3.Totally stub区域的配置完成标准:在stub区域的路由器R1只保留3条路由和1条缺省路由1.路由重分发的配置R1的配置:Router> enRouter# config tRouter(config)# host R1R1(config)# int e0/0R1(config-if)# ip add 192.168.1.1 255.255.255.0R1(config-if)# no shutR1(config-if)# int e0/1R1(config-if)# ip add 192.168.2.1 255.255.255.0R1(config-if)# no shutR1(config-if)# int loop 0R1(config-if)# ip add 172.16.1.1 255.255.255.0R1(config-if)# no shutR1(config-if)# exitR1(config)# router ospf 10R1(config-router)# net 192.168.1.0 0.0.0.255 a 1R1(config-router)# net 192.168.2.0 0.0.0.255 a 1R1(config-router)# net 172.16.1.0 0.0.0.255 a 1R1(config-router)# endR1#R2的配置Router> enRouter# config tRouter(config)# host R2R2(config)# int e0/1R2(config-if)# ip add 192.168.2.2 255.255.255.0 R2(config-if)# no shutR2(config-if)# int e0/2R2(config-if)# ip add 192.168.3.1 255.255.255.0 R2(config-if)# no shutR2(config-if)# int loop 0R2(config-if)# ip add 172.17.1.1 255.255.255.0R2(config-if)# no shutR2(config-if)# exitR2(config)# router ospf 10R2(config-router)# net 192.168.2.0 0.0.0.255 a 1 R2(config-router)# net 192.168.3.0 0.0.0.255 a 0 R2(config-router)# net 172.17.1.0 0.0.0.255 a 0 R2(config-router)# endR2#R3的配置Router> enRouter# config tRouter(config)# host R3R3(config)# int e0/2R3(config-if)# ip add 192.168.3.2 255.255.255.0 R3(config-if)# no shutR3(config-if)# int e0/3R3(config-if)# ip add 192.168.4.1 255.255.255.0 R3(config-if)# no shutR3(config-if)# int loop 0R3(config-if)# ip add 172.18.1.0 255.255.255.0R3(config-if)# no shutR3(config-if)# exitR3(config)# router ospf 10R3(config-router)# net 192.168.3.0 0.0.0.255 a 0 R3(config-router)# net 172.18.1.1 0.0.0.255 a 0 R3(config-router)# redistribution rip metric 100R3(config-router)# exitR3(config)# router ripR3(config-router)# net 192.168.4.0R3(config-router)# redistribution ospf 10 metric 5R3(config-router)#endR3#R4的配置Router> enRouter# config tRouter(config)# host R4R4(config)# int e0/3R4(config-if)# ip add 192.168.4.2 255.255.255.0R4(config-if)# no shutR4(config-if)# int e0/0R4(config-if)# ip add 192.168.50.1 255.255.255.0R4(config-if)# no shutR4(config-if)# int e0/1R4(config-if)# ip add 192.168.100.1 255.255.255.0R4(config-if)# no shutR4(config-if)# int e0/2R4(config-if)# ip add 192.168.150.1 255.255.255.0R4(config-if)# no shutR4(config-if)# exitR4(config)# router ripR4(config-router)# net 192.168.4.0R4(config-router)# net 192.168.50.0R4(config-router)# net 192.168.100.0R4(config-router)# net 192.168.150.0R4(config-router)#endR4#完成标准:在任意一台路由器上用show ip route来查看路由表,都能看到10条路由。

多区OSPF完整配置

多区OSPF完整配置

(一)交换部分enconf tno ip domain-lookupline con 0logg synexec-time 0 0exit一、基本配置本部分包括VLAN规划和VLAN间的通信。

1. sw29-1的配置hostname sw29-1vtp domain richvtp pass ciscovtp mode clientint range f1/1 - 2sw trunk encap dot1qsw mode trunksw tr all vlan 1,10interface Vlan1ip address 172.16.1.201 255.255.255.0interface Vlan10ip address 172.16.10.201 255.255.255.0no ip routingip default-gateway 172.16.10.251 10.252 10.254 (HSRP)说明:这里用SW29-1的vlan10来模拟一个主机进行VLAN间通信测试。

2. sw29-5的配置hostname sw29-5vtp domain richvtp pass ciscovtp mode clientint range f1/1 - 2sw trunk encap dot1qsw mode trunkinterface Vlan1ip address 172.16.1.205 255.255.255.0interface Vlan30ip address 172.16.30.205 255.255.255.0no ip routingip default-gateway 172.16.30.251 30.252 30.254 (HSRP)说明:这里用SW29-5的vlan30来模拟一个主机进行VLAN间通信测试。

3. sw35-1的配置hostname sw35-1no ip domain lookupvtp domain richvtp pass ciscovtp mode servervlan 10vlan 20vlan 30vlan 40exitinterface Port-channel1switchport mode trunkinterface FastEthernet1/1no switchportip address 192.168.1.1 255.255.255.0interface FastEthernet1/2no switchportip address 192.168.2.1 255.255.255.0interface FastEthernet1/3sw trunk encapsulation dot1q switchport mode trunkchannel-group 1 mode on interface FastEthernet1/4sw trunk encapsulation dot1q switchport mode trunkchannel-group 1 mode onshutdowninterface FastEthernet1/5sw trunk encapsulation dot1q switchport mode trunkinterface FastEthernet1/6sw trunk encapsulation dot1q switchport mode trunkinterface Vlan1ip address 172.16.1.251 255.255.255.0 no shutinterface Vlan10ip address 172.16.10.251 255.255.255.0interface Vlan20ip address 172.16.20.251 255.255.255.0interface Vlan30ip address 172.16.30.251 255.255.255.0interface Vlan40ip address 172.16.40.251 255.255.255.0line con 0exec-timeout 0 0logging synchronous4. sw35-2的配置hostname sw35-2no ip domain lookupvtp domain richvtp pass ciscovtp mode clientinterface Port-channel1switchport mode trunkinterface FastEthernet1/1no switchportip address 192.168.4.1 255.255.255.0interface FastEthernet1/2no switchportip address 192.168.3.1 255.255.255.0interface FastEthernet1/3sw trunk encapsulation dot1q switchport mode trunkchannel-group 1 mode oninterface FastEthernet1/4sw trunk encapsulation dot1q switchport mode trunkchannel-group 1 mode on shutdowninterface FastEthernet1/5sw trunk encapsulation dot1qswitchport mode trunkinterface FastEthernet1/6sw trunk encapsulation dot1q switchport mode trunkinterface Vlan1ip address 172.16.1.252 255.255.255.0 no shutinterface Vlan10ip address 172.16.10.252 255.255.255.0interface Vlan20ip address 172.16.20.252 255.255.255.0interface Vlan30ip address 172.16.30.252 255.255.255.0interface Vlan40ip address 172.16.40.252 255.255.255.0line con 0exec-timeout 0 0logging synchronous二、配置STP,防止二层环路,并实现不同VLAN流量的负载均衡。

OSPF的多区域配置

OSPF的多区域配置

03
区域内的路由器之间交换链路 状态信息,并通过区域内路由 汇总和过滤,减少路由器的资 源消耗。
02 多区域OSPF配置
配置多区域OSPF
创建多个OSPF区域
在OSPF路由器上创建多个区域,每个区域运行一个OSPF实例, 维护一个区域内路由数据库。
配置区域ID
为每个区域分配一个唯一的区域ID,用于标识该区域。
配置区域间路由的优先级
根据不同区域的优先级需,配置相应的区 域间路由优先级,确保关键业务的路由稳定 性。
优化区域内路由
优化区域内路由的路径
根据实际网络环境和业务需求,优化区域内路 由的路径选择,提高路由的稳定性和可靠性。
配置区域内路由的优先级
根据不同区域的优先级需求,配置相应的区域 内路由优先级,确保关键业务的路由稳定性。
THANKS FOR WATCHING
感谢您的观看
案例三:数据中心多区域OSPF配置
总结词
适用于数据中心网络,需要实现服务器和存储设备的 互联互通
详细描述
在数据中心网络中,通常会有多个数据中心,每个数据 中心内部配置有服务器和存储设备。为了实现服务器和 存储设备之间的互联互通,可以采用多区域OSPF配置。 在每个数据中心内部的局域网配置OSPF,并通过数据 中心的核心交换机将各局域网互联互通。同时,需要合 理规划各数据中心之间的网络拓扑和OSPF参数,以确 保网络的稳定性和可靠性。此外,还需要考虑数据中心 内部的安全性和可靠性,如采用冗余设备和链路等措施。
配置OSPF快速收敛
通过配置OSPF快速收敛相关参数(如Fast Hello Timer、Fast Retransmit等),提高 OSPF的收敛速度和稳定性。
04 OSPF多区域故障排除

大型企业网络配置——OSPF多区域配置

大型企业网络配置——OSPF多区域配置

大型企业网络配置系列课程详解(二)--OSPF多区域配置与相关概念的理解试验目的:1、使用OSPF划分多区域改善网络的可扩展性,其次减少各LSA通告的范围,达到区域内部快速收敛。

2、通过配置末梢区域(Stub Area)、完全末梢区域(Totally Stubby Area)以及非纯末梢区域(NSSA)达到各区域部分LSA通告的减少,从而减少区域内部路由器的路由表条目,增大路由器查找路由表的速度,从而减少了对路由器cpu以及内存的消耗,优化网络结构。

3、通过配置路由重分发,让不同自治系统之间能够互相通信,其次结合NSSA 达到区域内部路由器条目的减少,从而减少了对路由器cpu以及内存的消耗,优化网络结构。

4、通过对试验结果的分析能够更清楚理解配置末梢区域、完全末梢区域以及非纯末梢区域所达到的效果。

试验网络拓扑:Router1 F0/0 <----> Router2 E0/0Router2 E0/1 <----> Router3 E0/1Router2 E0/2 <----> Router5 E0/2Router3 E0/0 <----> Router4 F0/0Router3 E0/2 <----> Router5 E0/3Router5 E0/0 <----> Router6 F0/0Router6 F1/0 <----> Router7 F0/0试验步骤:一、根据网络拓扑图配置各个路由器接口的IP地址(注意端口的激活,非标准网络子网的划分),下面是以R1为例,其它的类似。

R1#configure terminalR1(config)#int f0/0R1(config-if)#ip add 20.0.0.1 255.255.255.252R1(config-if)#no shutR1(config)#int loopback 0R1(config-if)#ip add 1.1.1.1 255.255.255.252R1(config-if)#no shutRouter>Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host R2R2(config)#int e0/0R2(config-if)#ip add 20.0.0.2 255.255.255.252R2(config-if)#no shutR2(config-if)#*Mar 1 00:07:34.499: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:07:35.499: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to upR2(config-if)#exitR2(config)#int loop*Mar 1 00:07:45.087: %CDP-4-DUPLEX_MISMA TCH: duplex mismatch discovered on Ethernet0/0 (not full duplex), with R1 FastEthernet0/0 (full duplex).back 0R2(config-if)#*Mar 1 00:07:53.487: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to upR2(config-if)#ip addR2(config-if)#ip address 2.2.2.2 255.255.255.252R2(config-if)#no shutR2(config-if)#exitR2(config)#R2(config)#int e0/1R2(config-if)#ip add 10.0.0.1 255.255.255.252R2(config-if)#no shutR2(config-if)#int e0/2R2(config-if)#ip add 10.10.0.2 255.255.255.252R2(config-if)#no shutR2(config-if)#ex三、基本工作做完之后,开始配置OSPF,各个路由器进程号表示为(R1:10,R2:20……),其次将相连的网段。

ospf多区域的配置与手工汇总实验报告

ospf多区域的配置与手工汇总实验报告

实验 OSPF多区域手工汇总以及外部路由手工聚合【实验目的】了解“OSPF”多区域是如何配置;了解路由表的含义,同区域的路由表如何表示,不同区域的路由表如何表示,外部区域路由表如何表示;“OSPF”区域内如何“手工聚合”。

外部路由如何汇总。

【拓扑结构图】【步骤1】在r1在配置r1(config)#int s1/0r1(config-if)#ip add 192.168.2.1 255.255.255.252 r1(config-if)#clr1(config-if)#clock rar1(config-if)#clock rate 64000r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#ip add 192.168.8.1 255.255.255.0 r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo1r1(config-if)#ip add 192.168.9.1 255.255.255.0 r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo2r1(config-if)#ip add 192.168.10.1 255.255.255.0 r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo3r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo4r1(config-if)#ip add 192.168.12.1 255.255.255.0r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo5r1(config-if)#ip add 192.168.13.1 255.255.255.0r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo6r1(config-if)#ip add 192.168.14.1 255.255.255.0r1(config-if)#no shur1(config-if)#no shutdownr1(config-if)#int lo7r1(config-if)#ip add 192.168.15.1 255.255.255.0r1(config-if)#no shur1(config-if)#no shutdownr1(config)#router ospf 1r1(config-router)#network 192.168.2.0 0.0.0.3 area 0 r1(config-router)#network 192.168.8.0 0.0.0.255 area 1 r1(config-router)#network 192.168.9.0 0.0.0.255 area 1r1(config-router)#network 192.168.10.0 0.0.0.255 area 1 r1(config-router)#network 192.168.11.0 0.0.0.255 area 1 r1(config-router)#network 192.168.12.0 0.0.0.255 area 1 r1(config-router)#network 192.168.13.0 0.0.0.255 area 1 r1(config-router)#network 192.168.14.0 0.0.0.255 area 1 r1(config-router)#network 192.168.15.0 0.0.0.255 area 1 r1(config-router)#area 1 range 192.168.8.0 255.255.248.0【步骤2】r2上配置r2(config)#int s1/0r2(config-if)#ip add 192.168.2.2 255.255.255.252r2(config-if)#no shur2(config-if)#no shutdownr2(config-if)#int s1/1r2(config-if)#ip add 192.168.3.1 255.255.255.252r2(config-if)#clock rate 64000r2(config-if)#no shutdownr2(config-if)#int lo0r2(config-if)#ip add 2.2.2.2 255.255.255.0r2(config-if)#no shutdownr2(config)#router ospf 1r2(config-router)#router-id 2.2.2.2r2(config-router)#network 192.168.3.0 0.0.0.3 area 2 r2(config-router)#network 192.168.2.0 0.0.0.3 area 0 r2(config-router)#network 2.2.2.0 0.0.0.255 area 0【步骤3】在r3上配置r3(config)#int s1/1r3(config-if)#ip add 192.168.3.2 255.255.255.0r3(config-if)#no shur3(config-if)#no shutdownr3(config)#int lo0r3(config-if) #ip add 202.10.16.1 255.255.255.0r3(config-if) #int lo1r3(config-if) #ip add 200.10.17.1 255.255.255.0r3(config-if) #int lo2r3(config-if) #ip add 202.10.18.1 255.255.255.0r3(config-if) #int lo3r3(config-if) #ip add 202.10.19.1 255.255.255.0r3(config-if) #no shutdownr3(config-if) #int lo4r3(config-if)#ip add 3.3.3.3 255.255.255.0r3(config-if)#no shutdownr3(config)#router ospf 1r3(config-router)#router-id 3.3.3.3r3(config-router)#network 192.168.3.0 0.0.0.3 area 2r3(config-router)#redistribute connected subnets【步骤4】没有汇总之前r2的路由表信息【步骤5】在汇总之后的r2路由表信息我们可以看到r1上的那8个网段汇总成了一条路由信息,同时4个外部路由也重分布进来了【实验总结】由此可知ospf路由汇总的目的是:减少链路状态数据库,减少路由表,大大提高数据包查表转发的能力,能减少因为链路状态数据库的变化而引起的spf算法的重计算。

多区域OSPF和汇总

多区域OSPF和汇总

Multi Area OSPF and Area Summary实验目的:1、掌握多区域的OSPF配置方法。

2、区别不同区域的路由。

3、掌握OSPF的路由汇总配置。

4、掌握OSPF的基本配置命令。

实验拓扑图:R1、R2、R3和R4的配置如下:R1(config-line)#inter lo 0R1(config-if)#ip add 10.1.1.1 255.255.255.0R1(config-if)#ip ospf net point-to-p //避免其环回接口地址被OSPF学习为/32的主机地址R1(config-if)#inter lo 1R1(config-if)#ip add 10.1.2.1 255.255.255.0R1(config-if)#ip ospf net point-to-p //避免其环回接口地址被OSPF学习为/32的主机地址R1(config-if)#inter s1/1R1(config-if)#ip add 192.168.1.1 255.255.255.252R1(config-if)#router ospf 10R1(config-router)#net 10.1.1.0 0.0.0.255 a 1R1(config-router)#net 10.1.2.0 0.0.0.255 a 1R1(config-router)#net 192.168.1.0 0.0.0.3 a 1R2(config-line)#inter s1/0R2(config-if)#ip add 192.168.1.2 255.255.255.252R2(config-if)#inter s1/1R2(config-if)#ip add 192.168.1.5 255.255.255.252R2(config-if)#router ospf 10R2(config-router)#net 192.168.1.4 0.0.0.3 a 0R2(config-router)#net 192.168.1.0 0.0.0.3 a 1R3(config)#inter s1/0R3(config-if)#ip add 192.168.1.6 255.255.255.252R3(config-if)#inter s1/1R3(config-if)#ip add 192.168.1.9 255.255.255.252R3(config-if)#router ospf 10R3(config-router)#net 192.168.1.4 0.0.0.3 a 0R3(config-router)#net 192.168.1.8 0.0.0.3 a 2R4(config-if)#inter lo 0R4(config-if)#ip add 172.16.1.1 255.255.255.0R4(config-if)#inter lo 1R4(config-if)#ip add 172.16.2.1 255.255.255.0R4(config-line)#inter s1/0R4(config-if)#ip add 192.168.1.10 255.255.255.252R4(config-if)#router ospf 10R4(config-router)#net 192.168.1.8 0.0.0.3 a 2R4(config-router)#net 172.16.1.0 0.0.0.255 a 2R4(config-router)#net 172.16.2.0 0.0.0.255 a 2查看OSPF邻居表:R2(config-router)# do show ip ospf neiNeighbor ID Pri State Dead Time Address Interface 192.168.1.9 0 FULL/ - 00:00:33 192.168.1.6 Serial1/1 10.1.2.1 0 FULL/ - 00:00:38 192.168.1.1 Serial1/0 R3(config-router)#do show ip ospf neiNeighbor ID Pri State Dead Time Address Interface 192.168.1.5 0 FULL/ - 00:00:33 192.168.1.5 Serial1/0 172.16.2.1 0 FULL/ - 00:00:32 192.168.1.10 Serial1/1查看R1的路由表,观察其它区域路由:R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/32 is subnetted, 2 subnetsO IA 172.16.1.1 [110/193] via 192.168.1.2, 00:07:20, Serial1/1O IA 172.16.2.1 [110/193] via 192.168.1.2, 00:07:20, Serial1/110.0.0.0/24 is subnetted, 2 subnetsC 10.1.2.0 is directly connected, Loopback1C 10.1.1.0 is directly connected, Loopback0192.168.1.0/30 is subnetted, 3 subnetsO IA 192.168.1.8 [110/192] via 192.168.1.2, 00:07:20, Serial1/1C 192.168.1.0 is directly connected, Serial1/1O IA 192.168.1.4 [110/128] via 192.168.1.2, 00:07:20, Serial1/1查看R1的OSPF链路状态数据库:R1#show ip ospf databaseOSPF Router with ID (10.1.2.1) (Process ID 10)Router Link States (Area 1)Link ID ADV Router Age Seq# Checksum Link count 10.1.2.1 10.1.2.1 351 0x80000009 0x003AC8 4192.168.1.5 192.168.1.5 283 0x80000003 0x002BB5 2Summary Net Link States (Area 1)Link ID ADV Router Age Seq# Checksum172.16.1.1 192.168.1.5 283 0x80000002 0x00CAC1172.16.2.1 192.168.1.5 283 0x80000002 0x00BFCB192.168.1.4 192.168.1.5 283 0x80000002 0x00E13F192.168.1.8 192.168.1.5 283 0x80000002 0x003CA0在R1上使用ping命令确认路由的有效性:R1#ping 172.16.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 224/274/376 ms查看R4的路由表和ospf的链路状态数据库:R4(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 2 subnetsC 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback110.0.0.0/24 is subnetted, 2 subnetsO IA 10.1.2.0 [110/193] via 192.168.1.9, 00:09:36, Serial1/0O IA 10.1.1.0 [110/193] via 192.168.1.9, 00:09:56, Serial1/0192.168.1.0/30 is subnetted, 3 subnetsC 192.168.1.8 is directly connected, Serial1/0O IA 192.168.1.0 [110/192] via 192.168.1.9, 00:35:55, Serial1/0O IA 192.168.1.4 [110/128] via 192.168.1.9, 00:35:55, Serial1/0R4(config-router)#do show ip ospf datOSPF Router with ID (172.16.2.1) (Process ID 10)Router Link States (Area 2)Link ID ADV Router Age Seq# Checksum Link count 172.16.2.1 172.16.2.1 247 0x80000005 0x00B672 4192.168.1.9 192.168.1.9 307 0x80000003 0x00E82F 2Summary Net Link States (Area 2)Link ID ADV Router Age Seq# Checksum10.1.1.0 192.168.1.9 652 0x80000001 0x00B58610.1.2.0 192.168.1.9 632 0x80000001 0x00AA90192.168.1.0 192.168.1.9 307 0x80000002 0x00746C192.168.1.4 192.168.1.9 307 0x80000002 0x00C953可以发现R4路由器学习到area1区域的具体路由,其实,可以通过在R2(ABR)上可以对area1的路由进行汇总,通过汇总可以有效的减少路由表的大小,限制LSA扩散。

OSPF多区域配置与汇总

OSPF多区域配置与汇总

R1的详细配置Router>enRouter#conf tRouter(config)#int lo0Router(config-if)#ip add 1.1.1.1 s0/0Router(config-if)#ip add 12.12.12.1 shutRouter(config-if)#clock rate 64000Router(config-if)#clock rate 64000Router(config)#int lo1Router(config-if)#ip add lo2Router(config-if)#ip add lo3 S0/0 S0/1 S0/0..24 23.23.23.0/24R1 R2 R4 R3 1 2 2 3 3 4Area 0 Area 1Lo0:2.2.2.2/24 Lo0:3.3.3.3/24R4: Lo0:4.4.4.4/24 Lo10:10.1.0.4/24 R1: Lo0:1.1.1.1/24Lo10:Router(config-if)#ip add lo4Router(config-if)#ip add tRouter(config)#router ospf 1Router(config-router)#exitRouter(config)#router ripRouter(config-router)#veRouter(config-router)#version 2Router(config-router)#no auRouter(config-router)#no auto-summary Router(config-router)#net 12.0.0.0Router(config-router)#net 1.0.0.0Router(config-router)#endR2的详细配置Router>enRouter#conf tRouter(config)#int lo0Router(config-if)#ip add 2.2.2.2 s0/0 Router(config-if)#ip add 12.12.12.2 shutRouter(config-if)#exitRouter(config)#int s0/1Router(config-if)#ip add 23.23.23.1 shutRouter(config-if)#clock rate 64000Router(config-if)#exitRouter(config)#router ripRouter(config-router)#version 2Router(config-router)#no auto-summaryRouter(config-router)#net 12.0.0.0Router(config-router)#exitRouter(config)#router ospf 1Router(config-router)#net 23.23.23.0 .0.255 a 0Router(config-router)#net 2.2.2.0 .0.255 a 0Router(config-router)#redistribute rip subnets metric-type 1 Router(config-router)#summary-address R3的详细配置Router>enRouter(config)#int lo0Router(config-if)#ip add 3.3.3.3 s0/0Router(config-if)#ip add 23.23.23.2 shutRouter(config-if)#int s 0/1Router(config-if)#ip add shutRouter(config-if)#clock rate 64000Router(config-if)#exitRouter(config)#router ospf 1Router(config-router)#net 23.23.23.0 .0.255 a 0Router(config-router)#net 3.3.3.0 .0.255 a 0Router(config-router)#net 0.0.0.255 a 1Router(config-router)#area 1 range 10.1.0.0 R4的详细配置Router>enRouter#conf tRouter(config)#int lo0Router(config-if)#ip add 4.4.4.4 s0/0Router(config-if)#ip add shutRouter(config-if)#clock rate 64000Router(config-if)#endRouter#Router#conf tRouter(config)#int lo1Router(config-if)#ip add 10.1.1.1 lo2Router(config-if)#ip add 10.1.2.1 lo3Router(config-if)#ip add 10.1.3.1 lo4Router(config-if)#ip add 10.1.4.1 ospf 1Router(config-router)#net 0.0.0.255 a 1Router(config-router)#net 4.4.4.0 .0.255 a 1Router(config-router)#net 10.1.0.0 .3.255 a 1Router(config-router)#end各个路由器的基本配置完成使用show ip rou 和show ip ospf database查看各路由器如下R1的R2的R3的R4的。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

R1的详细配置
Router>en Router#conf t Router(config)#int lo0
Router(config-if)#ip add 1.1.1.1 255.255.255.0 Router(config-if)#exit Router(config)#int s0/0
Router(config-if)#ip add 12.12.12.1 255.255.255.0 Router(config-if)#no shut
Router(config-if)#clock rate 64000 Router(config-if)#clock rate 64000
S0/0 S0/0 S0/1 S0/1 S0/0 S0/0
12.12..12.0/24 23.23.23.0/24
34.34.34.0/24
R1
R2
R4 R3
1 2 2 3 3 4 Area 0
Area 1
Lo0:2.2.2.2/24
Lo0:3.3.3.3/24
R4:
Lo0:4.4.4.4/24 Lo10:10.1.0.4/24 Lo11:10.1.1.4/24 Lo12:10.1.2.4/24 Lo13:10.1.3.4/24
R1:
Lo0:1.1.1.1/24 Lo10:172.16.0.1/24 Lo11:172.16.1.1/24 Lo12:172.16.2.1/24 Lo13:172.16.3.1/24
Router(config)#int lo1
Router(config-if)#ip add 172.16.1.1 255.255.255.0 Router(config-if)#exit
Router(config)#int lo2
Router(config-if)#ip add 172.16.2.1 255.255.255.0 Router(config-if)#exit
Router(config)#int lo3
Router(config-if)#ip add 172.16.3.1 255.255.255.0 Router(config-if)#exit
Router(config)#int lo4
Router(config-if)#ip add 172.16.4.1 255.255.255.0 Router(config-if)#exit
Router#conf t
Router(config)#router ospf 1
Router(config-router)#exit
Router(config)#router rip
Router(config-router)#ve
Router(config-router)#version 2
Router(config-router)#no au
Router(config-router)#no auto-summary
Router(config-router)#net 12.0.0.0
Router(config-router)#net 172.16.0.0
Router(config-router)#end
R2的详细配置
Router>en
Router#conf t
Router(config)#int lo0
Router(config-if)#ip add 2.2.2.2 255.255.255.0 Router(config-if)#exit
Router(config)#int s0/0
Router(config-if)#ip add 12.12.12.2 255.255.255.0 Router(config-if)#no shut
Router(config-if)#exit
Router(config)#int s0/1
Router(config-if)#ip add 23.23.23.1 255.255.255.0 Router(config-if)#no shut
Router(config-if)#clock rate 64000
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#no auto-summary
Router(config-router)#net 12.0.0.0
Router(config-router)#exit
Router(config)#router ospf 1
Router(config-router)#net 23.23.23.0 0.0.0.255 a 0
Router(config-router)#net 2.2.2.0 0.0.0.255 a 0
Router(config-router)#redistribute rip subnets metric-type 1 Router(config-router)#summary-address 172.16.0.0 255.255.252.0
R3的详细配置
Router>en
Router(config)#int lo0
Router(config-if)#ip add 3.3.3.3 255.255.255.0
Router(config-if)#int s0/0
Router(config-if)#ip add 23.23.23.2 255.255.255.0
Router(config-if)#no shut
Router(config-if)#int s 0/1
Router(config-if)#ip add 34.34.34.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#clock rate 64000
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#net 23.23.23.0 0.0.0.255 a 0 Router(config-router)#net 3.3.3.0 0.0.0.255 a 0 Router(config-router)#net 34.34.34.0 0.0.0.255 a 1 Router(config-router)#area 1 range 10.1.0.0 255.255.252.0 Router(config-router)#end
R4的详细配置
Router>en
Router#conf t
Router(config)#int lo0
Router(config-if)#ip add 4.4.4.4 255.255.255.0
Router(config-if)#exit
Router(config)#int s0/0
Router(config-if)#ip add 34.34.34.2 255.255.255.0 Router(config-if)#no shut
Router(config-if)#clock rate 64000
Router(config-if)#end
Router#
Router#conf t
Router(config)#int lo1
Router(config-if)#ip add 10.1.1.1 255.255.255.0
Router(config-if)#exit
Router(config)#int lo2
Router(config-if)#ip add 10.1.2.1 255.255.255.0
Router(config-if)#exit
Router(config)#int lo3
Router(config-if)#ip add 10.1.3.1 255.255.255.0
Router(config-if)#exit
Router(config)#int lo4
Router(config-if)#ip add 10.1.4.1 255.255.255.0
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#net 34.34.34.0 0.0.0.255 a 1
Router(config-router)#net 4.4.4.0 0.0.0.255 a 1
Router(config-router)#net 10.1.0.0 0.0.3.255 a 1
Router(config-router)#end
各个路由器的基本配置完成
使用show ip rou 和show ip ospf database查看各路由器如下R1的
R2的
R3的
R4的
. .。

相关文档
最新文档