实验拓扑图
要求:
1.合理规划IP地址,启用OSPF单区域。
2.R1-R2之间启用PPP的pap单向认证。
3.R2-R3之间启用PPP的chap双向认证。
4.R3-R5-R6之间使用MGRE,R3为hub端,R5、R6为spoke端;要求MGRE接口网络类型为BMA,spoke之间通信必须经过hub端。
5.全网可达。
配置如下:
R1:
[R1]int s0/0/3
[R1-Serial0/0/3]ip add
[R1-Serial0/0/3]ip address 12.1.1.1 24
[R1-Serial0/0/3]q[R1]int LoopBack 0
[R1-LoopBack0]ip add 1.1.1.1 24
[R1-LoopBack0]q
[R1]aaa
[R1-aaa]local-user hcia password cipher 111111
Info: Add a new user.
[R1-aaa]local-user hcia service-type ppp
[R1-aaa]q
[R1]int s0/0/3
[R1-Serial0/0/3]ppp authentication-mode pap
[R1-Serial0/0/3]q
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]q
R2:
[R2]int s0/0/0
[R2-Serial0/0/0]ip add 12.1.1.2 24
[R2-Serial0/0/0]int s0/0/1
[R2-Serial0/0/1]ip add 23.1.1.1 24
[R2-Serial0/0/1]q
[R2]int LoopBack 0
[R2-LoopBack0]ip add 2.2.2.2 24
[R2-LoopBack0]q[R2]int s0/0/1
[R2-Serial0/0/1]link-protocol ppp
[R2-Serial0/0/1]ppp pap local-user hcia password cipher 111111
[R2-Serial0/0/1]aaa
[R2-aaa]local-user hcip password cipher 222222
Info: Add a new user.
[R2-aaa]local-user hcip service-type ppp
[R2-aaa]int s0/0/1
[R2-Serial0/0/1]link-protocol ppp
[R2-Serial0/0/1]ppp pap local-user hcia password cipher 111111[R2-Serial0/0/1]aaa
[R2-aaa]local-user hcip password cipher 222222
[R2-aaa]local-user hcip service-type ppp
[R2-aaa]int s0/0/1
[R2-Serial0/0/1]link-protocol ppp
[R2-Serial0/0/1]ppp authentication-mode chap[R2-Serial0/0/1]link-protocol ppp
[R2-Serial0/0/1]ppp chap user hcie
[R2-Serial0/0/1]ppp chap password cipher 333333
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
R3:
[R3]int s0/0/0
[R3-Serial0/0/0]ip address 23.1.1.2 24
[R3-Serial0/0/0]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 34.1.1.1 24
[R3-GigabitEthernet0/0/0]q
[R3]int l 0
[R3-LoopBack0]ip address 3.3.3.3 24 [R3-LoopBack0]q
[R3]int s0/0/0
[R3-Serial0/0/0]link-protocol ppp
[R3-Serial0/0/0]ppp chap user hcip
[R3-Serial0/0/0]ppp chap password cipherb222222
[R3]aaa
[R3-aaa]local-user hcie password cipher 333333 Info: Add a new user.
[R3-aaa]local-user hcie service-type ppp
[R3-aaa]int s0/0/0
[R3-Serial0/0/0]link-protocol ppp
[R3-Serial0/0/0]ppp authentication-mode chap
[R3]int t0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.1 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 34.1.1.1
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3]ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.2 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]q
[R3-ospf-1]q
[R3]int t0/0/0
[R3-Tunnel0/0/0]ospf network-type broadcast
[R3-Tunnel0/0/0]q
R4:
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 34.1.1.2 24
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip address 45.1.1.1 24
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip address 46.1.1.1 24
[R4-GigabitEthernet0/0/2]q
R5:
[R5]int g0/0/0 [R5-GigabitEthernet0/0/0]ip address 45.1.1.2 24
[R5-GigabitEthernet0/0/0]q
[R5-LoopBack0]ip address 5.5.5.5 24
[R5-LoopBack0]q
[R5]int t0/0/0
[R5-Tunnel0/0/0]ip address 10.1.1.2 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source 45.1.1.2
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
[R5]ip route-static 0.0.0.0 0.0.0.0 45.1.1.1
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0
[R5-ospf-1-area-0.0.0.0]q
[R5-ospf-1]q
[R5]int t0/0/0
[R5-Tunnel0/0/0]ospf dr-priority 0
[R5-Tunnel0/0/0]ospf network-type broadcast
R6:
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip address 46.1.1.2 24
[R6-GigabitEthernet0/0/0]q
[R6]int l 0
[R6-LoopBack0]ip address 6.6.6.6 24
[r6-LoopBack0]q
[R6]int t0/0/0
[R6-Tunnel0/0/0]ip address 10.1.1.3 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source 46.1.1.2
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register
[R6]ip route-static 0.0.0.0 0.0.0.0 46.1.1.1
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0
[R6-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0
[R6]int t0/0/0
[R6-Tunnel0/0/0]ospf dr-priority 0
[R6-Tunnel0/0/0]ospf network-type broadcast