实验要求
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. 使用静态路由
5. 所有PC设置私有IP为源IP,可以访问Rs环回。
IP地址分配
PC端:
PC1:192.168.1.2/24
PC2:192.168.2.2/24
PC3:192.168.3.2/24
PC4:192.168.4.2/24
路由器:
R1:
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0interface Serial4/0/0
ip address 15.0.0.1 255.255.255.0interface Tunnel0/0/0 ---隧道接口
ip address 192.168.5.1 255.255.255.0R2:
interface GigabitEthernet0/0/0
ip address 192.168.2.1 255.255.255.0interface Serial4/0/0
ip address 25.0.0.1 255.255.255.0interface Tunnel0/0/0 ---隧道接口
ip address 192.168.5.2 255.255.255.0R3:
interface GigabitEthernet0/0/0
ip address 192.168.3.1 255.255.255.0interface Serial4/0/0
ip address 35.0.0.1 255.255.255.0interface Tunnel0/0/0 ---隧道接口
ip address 192.168.5.3 255.255.255.0R4:
interface GigabitEthernet0/0/0
ip address 192.168.4.1 255.255.255.0interface Serial4/0/0
ip address 45.0.0.1 255.255.255.0interface Tunnel0/0/0 ---隧道接口
ip address 192.168.5.4 255.255.255.0R5:
interface GigabitEthernet0/0/0
ip address 45.0.0.2 255.255.255.0interface Serial4/0/0
ip address 25.0.0.2 255.255.255.0interface Serial3/0/0
ip address 15.0.0.2 255.255.255.0interface Serial3/0/1
ip address 35.0.0.2 255.255.255.0环回地址:
ip address 5.5.5.1 255.255.255.0
第二题实验配置
R1和R5间使用PPP的PAP认证,R5为主认证方
认证方:
[r5]aaa
[r5-aaa]local-user r5 password cipher 123
[r5-aaa]local-user r5 service-type ppp
[r5-Serial3/0/0]ppp authentication-mode pap
被认证方:
[r1-Serial4/0/0]ppp pap local-user r5 password cipher 123
R2于R5之间使用PPP的chap认证,R5为主认证方
认证方:
[r5]aaa
[r5-aaa]local-user r5 password cipher 123
[r5-aaa]local-user r5 service-type ppp
[r5-Serial4/0/0]ppp authentication-mode chap
被认证方:
[r2-Serial4/0/0]ppp chap user r5
[r2-Serial4/0/0]ppp chap password cipher 123
R3于R5之间使用HDLC封装
[r5-Serial3/0/1]link-protocol hdlc
[r3-Serial4/0/0]link-protocol hdlc
第三题配置
R1、R4间为点到点的GRE
R1配置:
interface Tunnel0/0/0
ip address 192.168.5.1 255.255.255.0
tunnel-protocol gre
source 15.0.0.1
destination 45.0.0.1
R4配置:
interface Tunnel0/0/0
ip address 192.168.5.4 255.255.255.0
tunnel-protocol gre
source 45.0.0.1
destination 15.0.0.1
R1/R2/R3构建一个MGRE环境,R1为中心站点
R1配置:
interface Tunnel0/0/0
ip address 192.168.5.1 255.255.255.0
tunnel-protocol gre p2mp
source 15.0.0.1
nhrp redirect
配置静态路由:
ip route-static 0.0.0.0 0.0.0.0 15.0.0.2
ip route-static 192.168.2.0 255.255.255.0 192.168.5.1
ip route-static 192.168.3.0 255.255.255.0 192.168.5.1
ip route-static 192.168.4.0 255.255.255.0 192.168.5.1
R2配置:
interface Tunnel0/0/0
ip address 192.168.5.2 255.255.255.0
tunnel-protocol gre p2mp
source 25.0.0.1
nhrp entry 192.168.5.1 15.0.0.1 register
nhrp shortcut
静态路由配置:
ip route-static 0.0.0.0 0.0.0.0 25.0.0.2
ip route-static 192.168.1.0 255.255.255.0 192.168.5.1
ip route-static 192.168.3.0 255.255.255.0 192.168.5.1
R3配置:
interface Tunnel0/0/0
ip address 192.168.5.3 255.255.255.0
tunnel-protocol gre p2mp
source 35.0.0.1
nhrp entry 192.168.5.1 15.0.0.1 register
nhrp shortcut
静态路由配置:
ip route-static 0.0.0.0 0.0.0.0 35.0.0.2
ip route-static 192.168.1.0 255.255.255.0 192.168.5.1
ip route-static 192.168.2.0 255.255.255.0 192.168.5.1
第五题配置
所有PC设置私有IP为源IP,可以访问R5环回
R1配置:
[r1-Serial4/0/0]nat static global 5.5.5.2 inside 192.168.1.2
R2配置:
[r2-Serial4/0/0]nat static global 5.5.5.3 inside 192.168.2.2
R3配置:
[r3-Serial4/0/0]nat static global 5.5.5.4 inside 192.168.3.2
R4配置:
[r4-GigabitEthernet0/0/1]nat static global 5.5.5.5 inside 192.168.4.2
实验结果
nhrp映射表
R1中心点映射表
PC2 ping PC1
PC3 ping PC2