实验要求:
实验过程:
1.1 搭建拓扑、IP地址的规划
1.1.2地址命令配置
1.1.3.配置缺省确保公网的互通性
1.2 NAT配置
1.3 PPP认证与HDlC的封装
1.3.1 R1和R5使用PAP认证
1.3.2 R2和R5使用chap认证
1.3.3 R3和R5使用HDlC的封装
1.4 .R1、R2、R3构建一个MGRE环境 ,R1为中心站点
1.4.1 中心站点AR1配置
1.4.2 分支站点AR2配置
1.4.3 分支站点AR3配置
1.4.4 MGRE环境下配置RIP
1.5 R1、R4构建GRE
1.5.1 GRE环境下配置RIP
测试:
实验要求:
R5为ISP,只能进行IP地址配置,其所有地址均配为公有IP地址
R1和R5间使用PPP的PAP认证,R5为主认证
R2与R5之间使用ppp的CHAP认证,R5为主认证方
R3与R5之间使用HDLC封装
R1.R2、R3构建一个MGRE环境,R1为中心站点,R1、R4间为点到点的GRE
R1整个私有网络基本RIP全网可达
所有PC设置私有IP为源IP,可以访问R5环回
1.1.2地址命令配置
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]int s 4/0/0
[R1-Serial4/0/0]ip add 15.0.0.1 24
[R2]INT G 0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[R2-GigabitEthernet0/0/0]int s 4/0/0
[R2-Serial4/0/0]ip add 25.0.0.1 24
[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[R3-GigabitEthernet0/0/0]int s 4/0/0
[R3-Serial4/0/0]ip add 35.0.0.1 24
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.0.0.1 24
[R4-GigabitEthernet0/0/0]int g 0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[R5]int s 3/0/0
[R5-Serial3/0/0]ip add 15.0.0.2 24
[R5-Serial3/0/0]int s 3/0/1
[R5-Serial3/0/1]ip add 25.0.0.2 24
[R5-Serial3/0/1]int s 4/0/0
[R5-Serial4/0/0]ip add 35.0.0.2 24
[R5-Serial4/0/0]int g 0/0/0
[R5-GigabitEthernet0/0/0]ip add 45.0.0.2 24
[R5-GigabitEthernet0/0/0]q
[R5]int l 0
[R5-LoopBack0]ip add 5.5.5.5 24
1.1.3.配置缺省确保公网的互通性
[R1]ip route-static 0.0.0.0 0 15.0.0.2
[R2]ip route-static 0.0.0.0 0 25.0.0.2
[R3]ip route-static 0.0.0.0 0 35.0.0.2
[R4]ip route-static 0.0.0.0 0 45.0.0.2
1.2 NAT配置
[R1]acl 2000
[R1-acl-basic-2000]rule permit source any
[R1]int s 4/0/0
[R1-Serial4/0/0]nat outbound 2000
[R2]ACL 2000
[R2-acl-basic-2000]rule permit source any
[R2-acl-basic-2000]q
[R2-Serial4/0/0]nat outbound 2000
[R3]acl 2000
[R3-acl-basic-2000]rule permit source any
[R3-acl-basic-2000]q
[R3]int s 4/0/0
[R3-Serial4/0/0]nat outbound 2000
[R4]acl 2000
[R4-acl-basic-2000]rule permit source any
[R4-acl-basic-2000]q
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]nat outbound 2000
1.3 PPP认证与HDlC的封装
1.3.1 R1和R5使用PAP认证
认证方配置
[R5]aaa # 进入aaa模式
[R5-aaa]local-user huawei password cipher 123456 # 创建用户信息
[R5-aaa]local-user huawei service-type ppp # 规定服务协议
[R5-Serial3/0/0]ppp authentication-mode pap # 规定该串口的认证模式为PAP
被认证方配置
[R1-Serial4/0/0]ppp pap local-user huawei password cipher 123456
1.3.2 R2和R5使用chap认证
认证方配置
[R5]aaa
[R5-aaa]local-user huawei password cipher 123456
[R5-aaa]local-user huawie service-type ppp
[R5-Serial3/0/1]ppp authentication-mode chap
被认证方配置
[R2]int s 4/0/0
[R2-Serial4/0/0]ppp chap user huawie
[R2-Serial4/0/0]ppp chap password cipher 123456
1.3.3 R3和R5使用HDlC的封装
[R5]interface Serial 4/0/0
[R5-Serial4/0/0]link-protocol hdlc
[R3]int Serial 4/0/0
[R3-Serial4/0/0]link-protocol hdlc
1.4 .R1、R2、R3构建一个MGRE环境 ,R1为中心站点
1.4.1 中心站点AR1配置
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.0.0.1
1.4.2 分支站点AR2配置
[R2]int t 0/0/0
[R2-Tunnel0/0/0]ip add 10.0.0.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source S4/0/0
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
# 隧道地址 物理地址
1.4.3 分支站点AR3配置
[R3]int t 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source s 4/0/0
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
1.4.4 MGRE环境下配置RIP
1.5 R1、R4构建GRE
AR1 配置
[R1]int t 0/0/1
[R1-Tunnel0/0/1]ip add 10.1.2.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 15.0.0.1
[R1-Tunnel0/0/1]destination 45.0.0.1
AR 配置
[R4]int t 0/0/1
[R4-Tunnel0/0/1]ip add 10.1.2.2 24
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]source 45.0.0.1
[R4-Tunnel0/0/1]destination 15.0.0.1
1.5.1 GRE环境下配置RIP
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 10.1.2.0
[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 10.1.2.0
[R4-rip-1]network 192.168.4.0