ATEN―第十章OSPF的高级配置(1)

实验使用的工具:小凡模拟器
★☆一、配置各个路由器的接口,并使用查看命令 分析路由表及链路状态库的变化。☆★
①配置R1的接口f0/0为RIP协议,f1/0为OSPF协议,区域1;是ASBR路由器,对其设置路由重分发。
Router>
Router>enable
Router#config terminal
Router(config)#hostname R1-jin
R1-jin(config)#interface loopback 0
R1-jin(config-if)#ip address 1.1.1.1 255.255.255.255
R1-jin(config-if)#exit
R1-jin(config)#interface f0/0
R1-jin(config-if)#ip address 10.0.0.1 255.255.255.0
R1-jin(config-if)#no shutdown
R1-jin(config-if)#interface f1/0
R1-jin(config-if)#ip address 192.168.0.1 255.255.255.0
R1-jin(config-if)#no shutdown
R1-jin(config-if)#exit
R1-jin(config)#router rip
R1-jin(config-router)#network 10.0.0.0
R1-jin(config-router)#exit
R1-jin(config)#router ospf 1
R1-jin(config-router)#network 192.168.0.1 0.0.0.0 area 1
R1-jin(config-router)#redistribute rip metric 200 subnets
R1-jin(config-router)#end
R1-jin#
R1-jin#show ip ospf database
R1-jin#show ip route
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
O IA 20.0.0.0/8 [110/67] via 192.168.0.2, 00:00:13, FastEthernet1/0
O IA 172.16.0.0/16 [110/2] via 192.168.0.2, 00:02:51, FastEthernet1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, FastEthernet0/0
C    192.168.0.0/24 is directly connected, FastEthernet1/0
O IA 192.168.1.0/24 [110/66] via 192.168.0.2, 00:01:19, FastEthernet1/0
R1-jin#


②配置R2的接口f1/0为区域1,f0/0为区域0(骨干区域),是ABR路由器;并宣告相应的网段。
Router>
Router>enable
Router#config terminal
Router(config)#hostname R2-jin
R2-jin(config)#interface loopback 0
R2-jin(config-if)#ip address 2.2.2.2 255.255.255.255
R2-jin(config-if)#exit
R2-jin(config)#interface f1/0
R2-jin(config-if)#ip address 192.168.0.2 255.255.255.0
R2-jin(config-if)#no shutdown
R2-jin(config-if)#interface f0/0
R2-jin(config-if)#ip address 172.16.0.2 255.255.0.0
R2-jin(config-if)#no shutdown
R2-jin(config-if)#exit
R2-jin(config)#router ospf 1
R2-jin(config-router)#network 192.168.0.2 0.0.0.0 area 1
R2-jin(config-router)#network 172.16.0.2 0.0.0.0 area 0
R2-jin(config-router)#end
R2-jin#
R2-jin#show ip ospf database
R2-jin#show ip route
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
O IA 20.0.0.0/8 [110/66] via 172.16.0.1, 00:00:23, FastEthernet0/0
C    172.16.0.0/16 is directly connected, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.0.0 [110/200] via 192.168.0.1, 00:01:30, FastEthernet1/0
C    192.168.0.0/24 is directly connected, FastEthernet1/0
O IA 192.168.1.0/24 [110/65] via 172.16.0.1, 00:01:30, FastEthernet0/0
R2-jin#

③配置R3的接口f0/0为骨干区域0,s1/0为区域2,是ABR路由器;并宣告相应的网段。
Router>
Router>enable
Router#config terminal
Router(config)#hostname R3-jin
R3-jin(config)#interface loopback 0
R3-jin(config-if)#ip address 3.3.3.3 255.255.255.255
R3-jin(config-if)#exit
R3-jin(config)#interface f0/0
R3-jin(config-if)#ip address 172.16.0.1 255.255.0.0
R3-jin(config-if)#no shutdown
R3-jin(config-if)#interface s1/0
R3-jin(config-if)#ip address 192.168.1.1 255.255.255.0
R3-jin(config-if)#no shutdown
R3-jin(config-if)#exit
R3-jin(config)#router ospf 1
R3-jin(config-router)#network 172.16.0.1 0.0.0.0 area 0
R3-jin(config-router)#network 192.168.1.1 0.0.0.0 area 2
R3-jin(config-router)#end
R3-jin#
R3-jin#show ip ospf database
R3-jin#show ip route
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
O    20.0.0.0/8 [110/65] via 192.168.1.2, 00:00:32, Serial1/0
C    172.16.0.0/16 is directly connected, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.0.0 [110/200] via 172.16.0.2, 00:00:32, FastEthernet0/0
O IA 192.168.0.0/24 [110/2] via 172.16.0.2, 00:00:32, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Serial1/0
R3-jin#


④配置R4的接口,区域2,宣告网段
Router>
Router>enable
Router#config terminal
Router(config)#hostname R4-jin
R4-jin(config)#interface loopback 0
R4-jin(config-if)#ip address 4.4.4.4 255.255.255.255
R4-jin(config-if)#exit
R4-jin(config)#interface s1/0
R4-jin(config-if)#ip address 192.168.1.2 255.255.255.0
R4-jin(config-if)#clock rate 128000
R4-jin(config-if)#no shutdown
R4-jin(config-if)#interface f0/0
R4-jin(config-if)#ip address 20.0.0.1 255.0.0.0
R4-jin(config-if)#no shutdown
R4-jin(config-if)#exit
R4-jin(config)#router ospf 1
R4-jin(config-router)#network 192.168.1.2 0.0.0.0 area 2
R4-jin(config-router)#network 20.0.0.1 0.0.0.0 area 2
R4-jin(config-router)#end
R4-jin#
R4-jin#show ip ospf database
R4-jin#show ip route
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
C    20.0.0.0/8 is directly connected, FastEthernet0/0
O IA 172.16.0.0/16 [110/65] via 192.168.1.1, 00:00:42, Serial1/0
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.0.0 [110/200] via 192.168.1.1, 00:00:42, Serial1/0
O IA 192.168.0.0/24 [110/66] via 192.168.1.1, 00:00:42, Serial1/0
C    192.168.1.0/24 is directly connected, Serial1/0R4-jin#
R4-jin#


★☆二、配置非纯末梢区域及完全末梢;并使用查看命令 分析路由表及链路状态库的变化。☆★
①在R1和R2上配置非纯末梢区域
R1
R1-jin#
R1-jin#config terminal
R1-jin(config)#router ospf 1
R1-jin(config-router)#area 1 nssa
R1-jin(config-router)#end
R1-jin#
R1-jin#show ip ospf database
R1-jin#show ip route
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
O IA 172.16.0.0/16 [110/2] via 192.168.0.2, 00:00:46, FastEthernet1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, FastEthernet0/0
C    192.168.0.0/24 is directly connected, FastEthernet1/0
O IA 192.168.1.0/24 [110/66] via 192.168.0.2, 00:00:46, FastEthernet1/0
R1-jin#


R2
R2-jin#
R2-jin#config terminal
R2-jin(config)#router ospf 1
R2-jin(config-router)#area 1 nssa
R2-jin(config-router)#end
R2-jin#
R2-jin#show ip ospf database
R2-jin#show ip route
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
O IA 20.0.0.0/8 [110/66] via 172.16.0.1, 00:00:07, FastEthernet0/0
C    172.16.0.0/16 is directly connected, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O N2    10.0.0.0 [110/200] via 192.168.0.1, 00:01:00, FastEthernet1/0
C    192.168.0.0/24 is directly connected, FastEthernet1/0
O IA 192.168.1.0/24 [110/65] via 172.16.0.1, 00:01:00, FastEthernet0/0
R2-jin#


②在R3上配置完全末梢,R4上配置末梢
R3
R3-jin#
R3-jin#config terminal
R3-jin(config)#router ospf 1
R3-jin(config-router)#area 2 stub no-summary
R3-jin(config-router)#end
R3-jin#
R3-jin#show ip ospf database
R3-jin#show ip route
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
O    20.0.0.0/8 [110/65] via 192.168.1.2, 00:00:14, Serial1/0
C    172.16.0.0/16 is directly connected, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.0.0 [110/200] via 172.16.0.2, 00:00:14, FastEthernet0/0
O IA 192.168.0.0/24 [110/2] via 172.16.0.2, 00:00:14, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Serial1/0
R3-jin#

R4
R4-jin#
R4-jin#config terminal
R4-jin(config)#router ospf 1
R4-jin(config-router)#area 2 stub
R4-jin(config-router)#end
R4-jin#
R4-jin#show ip ospf database
R4-jin#show ip route
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
C    20.0.0.0/8 is directly connected, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Serial1/0
O*IA 0.0.0.0/0 [110/65] via 192.168.1.1, 00:00:16, Serial1/0
R4-jin#
R4-jin#
R4-jin#ping 10.0.0.1
R4-jin#


★☆三、配置PC,验证!☆★
VPCS 1 >
VPCS 1 >show
VPCS 1 >ip 10.0.0.2 10.0.0.1 8
VPCS 1 >2
VPCS 2 >ip 20.0.0.2 20.0.0.1 8

VPCS 2 >ping 10.0.0.2
10.0.0.2 icmp_seq=1 timeout
10.0.0.2 icmp_seq=2 time=157.000 ms
10.0.0.2 icmp_seq=3 time=171.000 ms
10.0.0.2 icmp_seq=4 time=156.000 ms
10.0.0.2 icmp_seq=5 time=172.000 ms
VPCS 2 >

OK!!! 实验完成!!!


我使用的工具都是用的“小凡模拟器”哦
与真实设备是一样的操作,除了几个命令有点区别,自己慢慢的去发现哦!

你可能感兴趣的:(职场,高级,休闲,aten,ospf)