- 实验拓扑

- 实验要求
1、R5为ISP,只能进行ip地址配置,其所有地址均配为公有ip地址;
2、 R1和R5间使用PPP的PAP认证,R5为主认证方
R2与R5之间使用ppp的cHAP认证,R5为主认证方;
R3与R5之间使用HDLC封装;
3、R1、R2、R3构建一个MGRE环境,R1为中心站点,R1、R4间为点到点的GRE;
4、整个私有网络基本RIP全网可达;
5、所有pc设置私有IP为源IP,可以访问r5环回。
- 实验思路
- IP地址配置
- PPP验证和HDLC配置
- GRE配置
- 配置nat和缺省路由,使所有pc可以访问r5的回环且公网全通
- MGRE配置和rip配置
- 实验配置
- IP地址配置
[r1-Serial4/0/0]ip address 15.1.1.1 24
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[r2-Serial4/0/0]ip add 25.1.1.2 24
[r3-Serial4/0/0]ip address 35.1.1.3 24
[r3-GigabitEthernet0/0/0]ip address 192.168.3.3 24
[r4-GigabitEthernet0/0/1]ip address 192.168.4.4 24
[r4-GigabitEthernet0/0/0]ip address 45.1.1.4 24
[r5-GigabitEthernet0/0/0]ip address 45.1.1.5 24
[r5-Serial3/0/1]ip address 25.1.1.5 24
[r5-Serial4/0/0]ip add 35.1.1.5 24
[r5-Serial4/0/1]ip add 15.1.1.5 24
[r5-LoopBack0]ip address 5.5.5.5 24




- PPP验证和HDLC配置
[r5]aaa
[r5-aaa]local-user xxx password cipher 123456
[r5-aaa]local-user xxx service-type ppp
[r5-Serial4/0/1]ppp authentication-mode pap
[r5-Serial3/0/1]ppp authentication-mode chap
[r1-Serial4/0/0]ppp pap local-user xxx password cipher 123456
[r2-Serial4/0/0]ppp chap user xxx
[r2-Serial4/0/0]ppp chap password cipher 123456
[r3-Serial4/0/0]link-protocol hdlc
[r5-Serial4/0/0]link-protocol hdlc
- GRE配置
[r1-Tunnel0/0/4]ip add 10.1.1.1 24
[r1-Tunnel0/0/4]tunnel-protocol gre
[r1-Tunnel0/0/4]source 15.1.1.1
[r1-Tunnel0/0/4]destination 45.1.1.4
[r4-Tunnel0/0/4]ip add 10.1.1.2 24
[r4-Tunnel0/0/4]tunnel-protocol gre
[r4-Tunnel0/0/4]source 45.1.1.4
[r4-Tunnel0/0/4]destination 15.1.1.1
[r1]ip route-static 192.168.4.0 24 10.1.1.2
[r4]ip route-static 192.168.1.0 24 10.1.1.1
4、Nat配置
[r1]acl 2001
[r1-acl-basic-2001]rule permit source 192.168.1.0 0.0.0.255
[r1-Serial4/0/0]nat outbound 2001
[r2]acl 2002
[r2-acl-basic-2002]rule permit source 192.168.2.0 0.0.0.255
[r2-Serial4/0/0]nat outbound 2002
[r3]acl 2003
[r3-acl-basic-2003]rule permit source 192.168.3.0 0.0.0.255
[r3-Serial4/0/0]nat outbound 2003
[r4]acl 2004
[r4-acl-basic-2004]rule permit source 192.168.4.0 0.0.0.255
[r4- GigabitEthernet0/0/0]nat outbound 2004
缺省配置
[r1]ip route-static 0.0.0.0 0 15.1.1.5
[r2]ip route-static 0.0.0.0 0 25.1.1.5
[r3]ip route-static 0.0.0.0 0 35.1.1.5
[r4]ip route-static 0.0.0.0 0 45.1.1.5
5、MGRE配置
[r1-Tunnel0/0/23]ip add 10.1.2.1 24
[r1-Tunnel0/0/23]tunnel-protocol gre p2mp
[r1-Tunnel0/0/23]source 15.1.1.1
[r2-Tunnel0/0/2]ip add 10.1.2.2 24
[r2-Tunnel0/0/2]tunnel-protocol gre p2mp
[r2-Tunnel0/0/2]source 25.1.1.2
[r3-Tunnel0/0/3]ip address 10.1.2.3 24
[r3-Tunnel0/0/3]tunnel-protocol gre p2mp
[r3-Tunnel0/0/3]source 35.1.1.3
NHRP的配置
[r1-Tunnel0/0/23]nhrp network-id 100
[r2-Tunnel0/0/2]nhrp network-id 100
[r2-Tunnel0/0/2]nhrp entry 10.1.2.1 15.1.1.1 register
[r3-Tunnel0/0/3]nhrp network-id 100
[r3-Tunnel0/0/3]nhrp entry 10.1.2.1 15.1.1.1 register
RIP配置
[r1]rip 1
[r1-rip-1]undo summary
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 10.0.0.0
[r2]rip 1
[r2-rip-1]undo summary
[r2-rip-1]version 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 10.0.0.0
[r3]rip 1
[r3-rip-1]undo summary
[r3-rip-1]version 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 10.0.0.0
开启伪广播
[r1-Tunnel0/0/23]nhrp entry multicast dynamic
关闭水平分割
[R1-Tunnel0/0/0]undo rip split-horizon
[R2-Tunnel0/0/0]undo rip split-horizon
[R3-Tunnel0/0/0]undo rip split-horizon
934

被折叠的 条评论
为什么被折叠?



