OSPF
多域实验报告
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
1.
实验拓扑:
2.
实验目的:
2.1
按拓扑图正确连接
3
台路由器
2.2
按要求完成各接口的
IP
地址
2.3
完成多域
OSPF
配置
2.4
配置
Stub
区域
2.5
配置
Totally Stubby
区域
并验证
3.
操作详细步骤:
Step 1.
配置路由器
SH1
,
BJ1
,
GZ1
相应接口的
IP
地址
路由器
SH1
配置如下:
Router>
Router>en
Router#conf t
Router(config)#ho SH1
SH1(config)#int f0/0
SH1(config-if)#ip add 192.168.1.1 255.255.255.0
SH1(config-if)#no shut
SH1(config-if)#exit
SH1(config)#int lo0
SH1(config-if)#ip add 192.168.64.1 255.255.255.0
SH1(config-if)#no shut
SH1(config-if)#exit
路由器
BJ1
配置如下:
Router#CONF T
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#HO BJ1
BJ1(config)#int f0/0
BJ1(config-if)#ip add 192.168.1.3 255.255.255.0
BJ1(config-if)#no shut
BJ1(config-if)#exit
BJ1(config)#int lo0
BJ1(config-if)#ip add 192.168.3.1 255.255.255.0
BJ1(config-if)#no shut
BJ1(config-if)#exit
BJ1(config)#int s1/0
BJ1(config-if)#ip add 192.168.224.1 255.255.255.252
BJ1(config-if)#no shut
BJ1(config-if)#exit
BJ1(config)#
路由器
SH1
配置如下:
Router>EN
Router#CONF T
Router(config)#HO GZ1
GZ1(config)#int s1/0
GZ1(config-if)#ip add 192.168.224.2 255.255.255.252
GZ1(config-if)#no shut
GZ1(config-if)#exit
Setp 2.
配置
OSPF
路由器SH1配置如下:
SH1(config)#router ospf 7
SH1(config-router)#net 192.168.64.0 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0.0.0.255 area 1
SH1(config-router)#net 192.168.1.0 0.0.0.255 area 0
SH1(config-router)#exit
SH1(config)#
路由器BJ1配置如下
BJ1(config)#router ospf 8
BJ1(config-router)#net 192.168.1.0 0.0.0.255 area 0
BJ1(config-router)#net 192.168.3.0 0.0.0.255 area 0
BJ1(config-router)#net 192.168.224.0 0.0.0.3 area 51
BJ1(config-router)#exit
BJ1(config)#exit
路由器GZ1配置如下
GZ1(config)#router ospf 9
GZ1(config-router)#net 192.168.224.0 0.0.0.3 area 51
GZ1(config-router)#exit
GZ1(config)#exit
查看路由器
SH1
的路由表
SH1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.224.0/30 is subnetted, 1 subnets
O IA 192.168.224.0 [110/65] via 192.168.1.3, 00:03:37, FastEthernet0/0
C 192.168.64.0/24 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
192.168.3.0/32 is subnetted, 1 subnets
O 192.168.3.1 [110/2] via 192.168.1.3, 00:03:38, FastEthernet0/0
查看路由器
BJ1
的路由表
BJ1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.224.0/30 is subnetted, 1 subnets
C 192.168.224.0 is directly connected, Serial1/0
192.168.64.0/32 is subnetted, 1 subnets
O IA 192.168.64.1 [110/2] via 192.168.1.1, 00:00:02, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, Loopback0
查看路由器
GZ1
的路由表
GZ1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.224.0/30 is subnetted, 1 subnets
C 192.168.224.0 is directly connected, Serial1/0
192.168.64.0/32 is subnetted, 1 subnets
O IA 192.168.64.1 [110/66] via 192.168.224.1, 00:01:32, Serial1/0
O IA 192.168.1.0/24 [110/65] via 192.168.224.1, 00:01:32, Serial1/0
192.168.3.0/32 is subnetted, 1 subnets
O IA 192.168.3.1 [110/65] via 192.168.224.1, 00:01:32, Serial1/0
验证:
SH1#ping 192.168.224.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.224.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 292/485/844 ms
Step 3.
配置
Area 51
为
stub
路由器BJ1配置如下
BJ1(config)#router ospf 8
BJ1(config-router)#area 51 stub
BJ1(config-router)#exit
BJ1(config)#exit
路由器GZ1配置如下
GZ1(config)#router ospf 9
GZ1(config-router)#area 51 stub
GZ1(config-router)#exit
查看路由器
BJ1
的路由表
BJ1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.224.0/30 is subnetted, 1 subnets
C 192.168.224.0 is directly connected, Serial1/0
192.168.64.0/32 is subnetted, 1 subnets
O IA 192.168.64.1 [110/2] via 192.168.1.1, 00:00:39, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, Loopback0
查看路由器
GZ1
的路由表
GZ1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.224.1 to network 0.0.0.0
192.168.224.0/30 is subnetted, 1 subnets
C 192.168.224.0 is directly connected, Serial1/0
192.168.64.0/32 is subnetted, 1 subnets
O IA 192.168.64.1 [110/66] via 192.168.224.1, 00:00:13, Serial1/0
O IA 192.168.1.0/24 [110/65] via 192.168.224.1, 00:00:13, Serial1/0
192.168.3.0/32 is subnetted, 1 subnets
O IA 192.168.3.1 [110/65] via 192.168.224.1, 00:00:13, Serial1/0
O*IA 0.0.0.0/0 [110/65] via 192.168.224.1, 00:00:13, Serial1/0
Step4
配置
area 51
为
Totally Stubby
区域
并验证
路由器BJ1配置如下
BJ1(config)#router ospf 8
BJ1(config-router)#area 51 stub no-summary
BJ1(config-router)#end
路由器GZ1配置如下
GZ1(config)#router ospf 9
GZ1(config-router)#area 51 stub no-summary
GZ1(config-router)#end
查看路由器
BJ1
的路由表
BJ1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.224.0/30 is subnetted, 1 subnets
C 192.168.224.0 is directly connected, Serial1/0
192.168.64.0/32 is subnetted, 1 subnets
O IA 192.168.64.1 [110/2] via 192.168.1.1, 00:00:42, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, Loopback0
查看路由器
GZ1
的路由表
GZ1#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.224.1 to network 0.0.0.0
192.168.224.0/30 is subnetted, 1 subnets
C 192.168.224.0 is directly connected, Serial1/0
O*IA 0.0.0.0/0 [110/65] via 192.168.224.1, 00:00:50, Serial1/0
转载于:https://blog.51cto.com/dongwei/62288