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环回
步骤1配IP
[R1]in g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]in s1/0/0
[R1-Serial1/0/0]ip add 1.1.1.1 24
[R2]in g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[R2-GigabitEthernet0/0/0]in s1/0/1
[R2-Serial1/0/1]ip add 2.2.2.1 24
[R3]in g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[R3-GigabitEthernet0/0/0]in s2/0/0
[R3-Serial2/0/0]ip add 4.4.4.1 24
[R4]in g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.4.1 24
[R4-GigabitEthernet0/0/0]in s2/0/1
[R4-Serial2/0/1]ip add 3.3.3.1 24
[R5]in s1/0/0
[R5-Serial1/0/0]ip add 1.1.1.2 24
[R5-Serial1/0/0]in s1/0/1
[R5-Serial1/0/1]ip add 2.2.2.2 24
[R5-Serial1/0/1]in s2/0/0
[R5-Serial2/0/0]ip add 4.4.4.2 24
[R5-Serial2/0/0]in s2/0/1
[R5-Serial2/0/1]ip add 3.3.3.2 24
[R5-Serial2/0/1]in l0
[R5-LoopBack0]ip add 5.5.5.5 24
步骤2--配置缺省路由
[r1]ip route-static 0.0.0.0 0 1.1.1.2
[r2]ip route-static 0.0.0.0 0 2.2.2.2
[r3]ip route-static 0.0.0.0 0 4.4.4.2
[r4]ip route-static 0.0.0.0 0 3.3.3.2
步骤3---R1、R5之间使用PPP的PAP认证
[R5]aaa
[R5-aaa]local-user huawei password cipher 123456
[R5-aaa]local-user huawei service-type ppp
[R5-aaa]in s1/0/0
[R5-Serial1/0/0]ppp authentication-mode pap
[R1]in s1/0/0
[R1-Serial1/0/0]ppp authentication-mode pap
[R1-Serial1/0/0]ppp pap local-user huawei password cipher 123456
测试
步骤4---R2、R5之间使用PPP的CHAP认证
[R5]aaa
[R5-aaa]local-user huawei password cipher 123456
[R5-aaa]local-user huawei service-type ppp
[R5]int s1/0/1
[R5-Serial1/0/1]ppp authentication-mode chap
[R2]int s1/0/1
[R2-Serial1/0/1]ppp chap user huawei
[R2-Serial1/0/1]ppp chap password cipher 123456
测试
步骤5----R3、R5之间使用HDLC封装
[R5]int s2/0/0
[R5-Serial2/0/0]link-protocol hdlc
[R3]int s2/0/0
[R3-Serial2/0/0]link-protocol hdlc
测试
步骤6----在R1、R2、R3、R4上配置地址转换
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1]int Serial 1/0/0
[R1-Serial1/0/0]nat outbound 2000
[R2]acl 2000
[R2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[R2]int s1/0/1
[R2-Serial1/0/1]nat outbound 2000
[R3]acl 2000
[R3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[R3]int s2/0/0
[R3-Serial2/0/0]nat outbound 2000
[R4]acl 2000
[R4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]nat outbound 2000
步骤7---R1,R2、R3为一个MGRE环境,R1为中心站点
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 192.168.5.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 1.1.1.1
[R1-Tunnel0/0/0]nhrp network-id 100
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source Serial 1/0/1
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 1.1.1.1 register
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 192.168.5.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source Serial 2/0/0
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 192.168.5.1 1.1.1.1 register
步骤8---R1、R4间为点到点的GRE
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 192.168.6.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 1.1.1.1
[R1-Tunnel0/0/1]destination 3.3.3.1
[R4]interface Tunnel 0/0/0
[R4-Tunnel0/0/0]ip address 192.168.6.2 24
[R4-Tunnel0/0/0]tunnel-protocol gre
[R4-Tunnel0/0/0]source 3.3.3.1
[R4-Tunnel0/0/0]destination 1.1.1.1
测试
步骤9---配置RIP
[R1]rip
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 192.168.5.0
[R1-rip-1]network 192.168.6.0
[R2]rip
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 192.168.5.0
[R3]rip
[R3-rip-1]version 2
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 192.168.5.0
[R4]rip
[R4-rip-1]version 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.6.0
[R1]int t0/0/0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]undo rip split-horizon
测试(PC1访问AR5环回)