1、 实验要求:全网互通 回环口宣告入较小的 Area 两部分 Area2 产生域内路由 实验过程:R1 全配置:enconf tno ip do loli co 0no exec-tlogg sho R1int lo0ip add 11.11.1.1 255.255.255.255int s2/0en frno frame inverseip add 11.11.11.1 255.255.255.0frame map ip 11.11.11.2 102 bframe map ip 11.11.11.3 103 bframe map ip 11.11.11.1 102no sh /基于 Hub-a
2、nd-Spoke 的帧中继配置int s3/0ip add 11.11.14.1 255.255.255.0en frno frame inverseframe map ip 11.11.14.4 114 bframe map ip 11.11.14.1 114ip ospf net point-to-pointno shrouter ospf 11net 11.11.1.1 0.0.0.0 a 0net 11.11.11.1 0.0.0.0 a 0net 11.11.14.1 0.0.0.0 a 2nei 11.11.11.2nei 11.11.11.3 /NBMA 网络需要指定邻居exit
3、int tunn 0ip unn s3/0tunn sour 11.11.11.1tunn des 11.11.25.5 /在 R1 上搭建到 R5 的 tunnel,注意源 IP 与目的 IP,在隧道建立后重新计算 SPF 时相应的路由条目不能发生变动,否则 tunnel 会翻动R2 全配置:enconf tno ip do loli co 0no exec-tlogg sho R2int lo0ip add 11.11.2.2 255.255.255.255int s2/0en frip add 11.11.11.2 255.255.255.0no frame inverseframe m
4、ap ip 11.11.11.1 201 bframe map ip 11.11.11.3 201 bframe map ip 11.11.11.2 201ip ospf p 0no shint f0/0fullip add 11.11.25.2 255.255.255.0no shrouter ospf 11net 11.11.11.2 0.0.0.0 a 0net 11.11.2.2 0.0.0.0 a 0net 11.11.25.2 0.0.0.0 a 5R3 全配置:enconf tno ip do loli co 0no exec-tlogg sho R3int lo0ip add
5、11.11.3.3 255.255.255.255int f0/0fullip add 11.11.34.3 255.255.255.0no shint s2/0en frno frame inverseip add 11.11.11.3 255.255.255.0frame map ip 11.11.11.1 301 bframe map ip 11.11.11.2 301 bframe map ip 11.11.11.3 301ip ospf p 0no shrouter ospf 11net 11.11.11.3 0.0.0.0 a 0net 11.11.3.3 0.0.0.0 a 0n
6、et 11.11.34.3 0.0.0.0 a 2R4 全配置:enconf tno ip do loli co 0no exec-tlogg sho R4int lo0ip add 11.11.4.4 255.255.255.255int f0/0fullip add 11.11.34.4 255.255.255.0no shint s3/0en frno frame inverseip add 11.11.14.4 255.255.255.0frame map ip 11.11.14.1 411 bframe map ip 11.11.14.4 411ip ospf net point-t
7、o-pointno shrouter ospf 11net 11.11.34.4 0.0.0.0 a 2net 11.11.4.4 0.0.0.0 a 2net 11.11.14.4 0.0.0.0 a 2R5 全配置:enconf tno ip do loli co 0no exec-tlogg sho R5int lo0ip add 11.11.5.5 255.255.255.255int f0/0fullip add 11.11.25.5 255.255.255.0no shint f1/0fullip add 11.11.55.5 255.255.255.0no shrouter os
8、pf 11net 11.11.5.5 0.0.0.0 a 2net 11.11.25.5 0.0.0.0 a 5net 11.11.55.5 0.0.0.0 a 2exitint tunn 0ip unn lo0tunn sour 11.11.25.5tunn des 11.11.11.1 /搭建到 R1 的 tunnel,注意源 IP 与目的 IPexitSW1 全配置:enconf tno ip do loli co 0no exec-tlogg sint range f0/2 , f0/5sw ac vl 25no shint range f0/3 - 4sw ac vl 34no sh
9、SW2 全配置:enconf tno ip do loli co 0no exec-tlogg sho SW2int f0/5sw ac vl 55no shend测试:R4 上 show ip route:R4#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
10、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 set11.0.0.0/8 is variably s
11、ubnetted, 10 subnets, 2 masksO 11.11.5.5/32 110/11176 via 11.11.14.1, 00:14:49, Serial3/0C 11.11.4.4/32 is directly connected, Loopback0O IA 11.11.3.3/32 110/2 via 11.11.34.3, 00:14:49, FastEthernet0/0O IA 11.11.2.2/32 110/66 via 11.11.34.3, 00:14:49, FastEthernet0/0O IA 11.11.1.1/32 110/65 via 11.1
12、1.14.1, 00:14:49, Serial3/0O IA 11.11.11.0/24 110/65 via 11.11.34.3, 00:14:49, FastEthernet0/0C 11.11.14.0/24 is directly connected, Serial3/0O IA 11.11.25.0/24 110/66 via 11.11.34.3, 00:14:49, FastEthernet0/0C 11.11.34.0/24 is directly connected, FastEthernet0/0O 11.11.55.0/24 110/11176 via 11.11.14.1, 00:14:49, Serial3/0 /R4 上到 R5 上已经成为域内路由