分类: 系统运维
2009-06-27 07:04:20
实验目的:
1、掌握OSPF外部路由汇总配置。
2、区别外部汇总的路由。
3、掌握OSPF的外部汇总路由类型及计算方法。
实验拓扑图:
实验步骤及要求:
1、配置各台路99且使用Ping命令确认各路由器的直连口的互通性。
2、R3(ASBR:自治系统边界路由器)路由器的配置。
R3(config)#router ospf 1 R3(config-router)#network 192.168.1.4 0.0.0.3 area 0 R3(config-router)#exit R3(config)#exit R3#9 R3(config)#router rip R3(config-router)#network 172.16.0.0 R3(config-router)#exit R3# |
3、查看R1或是R2的路由表。
R1#show ip route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 2 subnets C 10.1.2.0 is directly connected, Loopback1 C 10.1.1.0 is directly connected, Loopback0 192.168.1.0/30 is subnetted, 2 subnets C 192.168.1.0 is directly connected, Serial1/1 O IA 192.168.1.4 [110/128] via 192.168.1.2, 00:03:50, Serial1/1 R1# |
4、在R3上配置重发布,(重发布的内容解释可以参考后面章节)。
R3(config)#router ospf 1 R3(config-router)#redistribute rip metric 200 subnets R3(config-router)#exit R3(config)#router rip R3(config-router)#redistribute ospf 1 metric 10 R3(config-router)#exit R3(config)# |
5、查看R1路由器路由表并使用ping命令确认路由。
R1#show ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnets O E1 172.16.1.0 [110/328] via 192.168.1.2, 00:04:22, Serial1/1 O E1 172.16.2.0 [110/328] via 192.168.1.2, 00:04:22, Serial1/1 O E1 172.16.3.0 [110/328] via 192.168.1.2, 00:04:22, Serial1/1 10.0.0.0/24 is subnetted, 2 subnets C 10.1.2.0 is directly connected, Loopback1 C 10.1.1.0 is directly connected, Loopback0 192.168.1.0/30 is subnetted, 2 subnets C 1929999.168.1.0 is directly connected, Serial1/1 O IA 192.168.1.4 [110/128] via 192.168.1.2, 00:16:54, Serial1/1 R1# |
通过上述比较,可以很清楚的理解E1与E2的路由度量计算方法。
9、查看R1路由器的链路状态数据库。
R1#show ip ospf database OSPF Router with ID (10.1.2.1) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 10.1.2.1 10.1.2.1 1413 0x80000009 0x0003FD 4 192.168.1.5 192.168.1.5 1413 0x80000006 0x0025B8 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 192.168.1.4 192.168.1.5 1437 0x80000001 0x00E33E Summary ASB Link States (Area 1) Link ID ADV Router Age Seq# Checksum 192.168.1.6 192.168.1.5 1061 0x80000001 0x00D348 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 172.16.1.0 192.168.1.6 3603 0x80000003 0x00CF35 0 172.16.2.0 192.168.1.6 3603 0x80000003 0x00C43F 0 172.16.3.0 192.168.1.6 3603 0x80000003 0x00B949 0 R1# |
10、之前的R1的路由表中,显示的外网路由为3条。为了减少路由表的大小,可以在R3上进行外网的路由汇总,具体配置如下:
R3(config)#router ospf 1 R3(config-router)#summary-address 172.16.0.0 255.255.0.0 R3(config-router)#exit R3(config)#exit |
11、查看R1路由表,确认汇总成功。
R1#show ip route Gateway of last resort is not set O E1 172.16.0.0/16 [110/328] via 192.168.1.2, 00:01:29, Serial1/1 10.0.0.0/24 is subnetted, 2 subnets C 10.1.2.0 is directly connected, Loopback1 C 10.1.1.0 is directly connected, Loopback0 192.168.1.0/30 is subnetted, 2 subnets C 192.168.1.0 is directly connected, Serial1/1 O IA 192.168.1.4 [110/128] via 192.168.1.2, 00:24:56, Serial1/1 R1# |
12、完成实验。