1.R2为ISP,其上只能配置IP地址
2.R1-R2之间为HDLC封装
3.R2-R3之间为PPP封装,pap认证,R2为主认证方
4.R2-R4之间为ppp封装,chap认证,R2为主认证方
5.R1、R2、R3构建MGRE环境,仅R1IP地址固定
6.内网使用RIP获取路由,所以可以互相访问,并且可访问R2的环回
第一步:地址划分
设备 |
地址 |
网关 |
PC1 |
192.168.1.2 24 |
192.168.1.1 24 |
PC2 |
192.168.2.2 24 |
192.168.2.1 24 |
PC3 |
192.168.3.2 24 |
192.168.3.1 24 |
设备地址
设备 |
接口 |
IP |
R1 |
S4/0/0 |
12.1.1.1 24 |
R3 |
S4/0/0 |
32.1.1.2 24 |
R4 |
S4/0/0 |
42.1.1.3 24 |
R2 |
S4/0/0 |
12.1.1.4 24 |
S4/0/1 |
32.1.1.4 24 | |
S3/0/0 |
42.1.1.4 24 | |
Lookback0 |
2.2.2.2 24 |
第二步:配置IP
R1配置
[R1]interface g 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[R1]interface s 4/0/0
[R1-Serial4/0/0]ip address 12.1.1.1 24
R3配置
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[R3]interface s4/0/0
[R3-Serial4/0/0]ip address 32.1.1.1 24
R4配置
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.3.1 24
[R4]interface s 4/0/0
[R4-Serial4/0/0]ip address 42.1.1.1 24
R2配置
[R2]interface s4/0/0
[R2-Serial4/0/0]ip address 12.1.1.4 24
[R2]interface s4/0/1
[R2-Serial4/0/1]ip address 32.1.1.4 24
[R2]interface s3/0/0
[R2-Serial3/0/0]ip address 42.1.1.4 24
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 2.2.2.2 24
第三步:配置缺省路由
[R1]ip route-static 0.0.0.0 0 12.1.1.4
[R3]ip route-static 0.0.0.0 0 32.1.1.4
[R4]ip route-static 0.0.0.0 0 42.1.1.4
第四步:NAT
第五步:R1-R2之间为HDLC封装
第六步:R2-R3之间为PPP封装,pap认证,R2为主认证方
主认证方配置
[R2]aaa
[R2-aaa]local-user huawei password cipher huawei
[R2-aaa]local-user huawei service-type ppp
[R2]interface s4/0/1
[R2-Serial4/0/1]ppp au
[R2-Serial4/0/1]ppp authentication-mode pap
被认证方配置
第七步:R2-R4之间为ppp封装,chap认证,R2为主认证方
主认证方配置
被认证方配置
第八步:R1、R2、R3构建MGRE环境
R1配置
R3配置
R4配置
验证
第九步:书写RIP路由
R1配置
MGRE环境下RIP需要开启伪⼴播和关闭⽔平分割
验证