OSPF 中辅助地址的小实验
实验图:
实验要求:1.将R4 的E0/0接口配置辅助地址。
2.并将区域2设置为NSSA区。
3. 将区1设置为完全末梢区。
4.在R4上设制一个地址汇总。
实验步骤:
+++++++++++++++++++++++++++
r1
++++++++++++++++++++++++++++
en
conf t
no ip do lo
host r1
line c 0
exec-t 0 0
logg sync
exit
in e0/1
ip add 192.168.4.1 255.255.255.0
no sh
exit
in lo 0
ip add 192.168.1.1 255.255.255.0
exit
in lo 1
ip add 192.168.2.1 255.255.255.0
exit
in lo 2
ip add 192.168.3.1 255.255.255.0
exit
router ospf 1
net 192.168.1.0 0.0.0.255 a 1
net 192.168.2.0 0.0.0.255 a 1
net 192.168.3.0 0.0.0.255 a 1
net 192.168.4.0 0.0.0.255 a 1
area 1 stub
++++++++++++++++++++++++++
r2
++++++++++++++++++++++++++
en
conf t
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/1
ip add 192.168.4.2 255.255.255.0
no sh
exit
in e0/2
ip add 192.168.5.1 255.255.255.0
no sh
exit
router ospf 1
net 192.168.4.0 0.0.0.255 a 1
net 192.168.5.0 0.0.0.255 a 0
area 1 stub no-summary
end
+++++++++++++++++++++++++++++++++
r3
++++++++++++++++++++++++++++++++
en
conf t
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/2
ip add 192.168.5.2 255.255.255.0
no sh
exit
in e0/3
ip add 192.168.6.1 255.255.255.0
no sh
exit
router ospf 1
net 192.168.5.0 0.0.0.255 a 0
net 192.168.6.0 0.0.0.255 a 2
area 2 nssa no-summary
end
+++++++++++++++++++++++++++++++++
r4
++++++++++++++++++++++++++++++++++++
en
conf t
no ip do lo
line c 0
exec-t 0 0
logg sync
exit
in e0/3
ip add 192.168.6.2 255.255.255.0
no sh
exit
in e0/0
ip add 192.168.7.1 255.255.255.0
ip add 192.168.70.1 255.255.255.0 secondary
no sh
exit
router ospf 1
net 192.168.6.0 0.0.0.255 a 2
net 192.168.7.0 0.0.0.255 a 2
area 2 nssa
exit
router rip
ver 2
no au
net 192.168.70.0
red ospf 1 metric 1
exit
router ospf 1
redistribute rip subnets
summary-address 192.168.64.0 255.255.192.0
exit
end
++++++++++++++++++++++++++++++++++++++
r5
++++++++++++++++++++++++++++++++++++++
en
conf t
no ip do lo
host r5
line c 0
exec-t 0 0
logg sync
exit
in e0/0
ip add 192.168.70.2 255.255.255.0
no sh
exit
in lo 0
ip add 192.168.80.1 255.255.255.0
exit
in lo 1
ip add 192.168.90.1 255.255.255.0
exit
in lo 2
ip add 192.168.100.1 255.255.255.0
exit
router rip
ver 2
no au
net 192.168.70.0
net 192.168.80.0
net 192.168.90.0
net 192.168.100.0
exit
++++++++++++++++++++++++++++++++++++++++++
看路由表:
++++++++++++++++++++++++++++++++++++++++++
R 1
++++++++++++++++++++++++++++++++++++++++++
C 192.168.4.0/24 is directly connected, Ethernet0/1
C 192.168.1.0/24 is directly connected, Loopback0
C 192.168.2.0/24 is directly connected, Loopback1
C 192.168.3.0/24 is directly connected, Loopback2
O*IA 0.0.0.0/0 [110/11] via 192.168.4.2, 00:00:24, Ethernet0/1
+++++++++++++++++++++++++++++++++++++++++++++++
R2
+++++++++++++++++++++++++++++++++++++++++++++++
C 192.168.4.0/24 is directly connected, Ethernet0/1
C 192.168.5.0/24 is directly connected, Ethernet0/2
O IA 192.168.6.0/24 [110/20] via 192.168.5.2, 00:01:00, Ethernet0/2
O IA 192.168.7.0/24 [110/30] via 192.168.5.2, 00:01:00, Ethernet0/2
192.168.1.0/32 is subnetted, 1 subnets
O 192.168.1.1 [110/11] via 192.168.4.1, 00:01:00, Ethernet0/1
192.168.2.0/32 is subnetted, 1 subnets
O 192.168.2.1 [110/11] via 192.168.4.1, 00:01:00, Ethernet0/1
192.168.3.0/32 is subnetted, 1 subnets
O 192.168.3.1 [110/11] via 192.168.4.1, 00:01:00, Ethernet0/1
O E2 192.168.64.0/18 [110/20] via 192.168.5.2, 00:01:00, Ethernet0/2
+++++++++++++++++++++++++++++++++++++++++++++++++++
R3
+++++++++++++++++++++++++++++++++++++++++++++++++++
O IA 192.168.4.0/24 [110/20] via 192.168.5.1, 00:01:36, Ethernet0/2
C 192.168.5.0/24 is directly connected, Ethernet0/2
C 192.168.6.0/24 is directly connected, Ethernet0/3
O 192.168.7.0/24 [110/20] via 192.168.6.2, 00:01:36, Ethernet0/3
192.168.1.0/32 is subnetted, 1 subnets
O IA 192.168.1.1 [110/21] via 192.168.5.1, 00:01:32, Ethernet0/2
192.168.2.0/32 is subnetted, 1 subnets
O IA 192.168.2.1 [110/21] via 192.168.5.1, 00:01:32, Ethernet0/2
192.168.3.0/32 is subnetted, 1 subnets
O IA 192.168.3.1 [110/21] via 192.168.5.1, 00:01:32, Ethernet0/2
O N2 192.168.64.0/18 [110/20] via 192.168.6.2, 00:01:36, Ethernet0/3
+++++++++++++++++++++++++++++++++++++++++++++++++++
R4
+++++++++++++++++++++++++++++++++++++++++++++++++++
R 192.168.90.0/24 [120/1] via 192.168.70.2, 00:00:08, Ethernet0/0
R 192.168.80.0/24 [120/1] via 192.168.70.2, 00:00:08, Ethernet0/0
C 192.168.6.0/24 is directly connected, Ethernet0/3
C 192.168.7.0/24 is directly connected, Ethernet0/0
C 192.168.70.0/24 is directly connected, Ethernet0/0
R 192.168.100.0/24 [120/1] via 192.168.70.2, 00:00:08, Ethernet0/0
O*IA 0.0.0.0/0 [110/11] via 192.168.6.1, 00:02:03, Ethernet0/3
O 192.168.64.0/18 is a summary, 00:02:47, Null0
++++++++++++++++++++++++++++++++++++++++++++++++++++++
R5
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C 192.168.90.0/24 is directly connected, Loopback1
C 192.168.80.0/24 is directly connected, Loopback0
R 192.168.6.0/24 [120/1] via 192.168.70.1, 00:00:22, Ethernet0/0
C 192.168.70.0/24 is directly connected, Ethernet0/0
C 192.168.100.0/24 is directly connected, Loopback2
R* 0.0.0.0/0 [120/1] via 192.168.70.1, 00:00:22, Ethernet0/0
R 192.168.64.0/18 [120/1] via 192.168.70.1, 00:00:22, Ethernet0/0