要求:
1、R5为ISP,只能进行IP地址配置,其所有接口配置为公有IP地址
2、R1与R5间使用PPP的PAP认证,R5为主认证方;R2与R5间使用PPP的CHAP认证R5为主认证方;R3与R5间使用HDLC封装
3、R1/2/3构建一个MGRE环境,R1为中心站点;R1/4间为点到点GRE
4、整个私有网络基于RIP全网可达
5、所有PC私有地址为源ip 时,可以正常访问R5环回
配置:
1、所有设备接口配置IP地址;R5为ISP,只能进行IP地址配置,其所有接口配置为公有IP地址
R1:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0]int s4/0/0
[r1-Serial4/0/0]ip add 15.1.1.1 24
R2:
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[r2-GigabitEthernet0/0/0]int s4/0/0
[r2-Serial4/0/0]ip add 25.1.1.2 24
R3:
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[r3-GigabitEthernet0/0/0]int s4/0/0
[r3-Serial4/0/0]ip add 35.1.1.3 24
R4:
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 45.1.1.4 24
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.4.1 24
ISP:
[ISP]int s4/0/0
[ISP-Serial4/0/0]ip add 15.1.1.5 24
[ISP-Serial4/0/0]int s4/0/1
[ISP-Serial4/0/1]ip add 25.1.1.5 24
[ISP-Serial4/0/1]int s3/0/0
[ISP-Serial3/0/0]ip add 35.1.1.5 24
[ISP-Serial3/0/0]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 45.1.1.5 24
私有设备分别下放缺省指向ISP
R1:[r1]ip route-static 0.0.0.0 0 15.1.1.5
R2:[r2]ip route-static 0.0.0.0 0 25.1.1.5
R3:[r3]ip route-static 0.0.0.0 0 35.1.1.5
R4:[r4]ip route-static 0.0.0.0 0 45.1.1.5
2、R1与R5间使用PPP的PAP认证,R5为主认证方;R2与R5间使用PPP的CHAP认证R5为主认证方;R3与R5间使用HDLC封装
R1与R5间:
R5:
[ISP]aaa
[ISP-aaa]local-user huawei password cipher huawei123
Info: Add a new user.
[ISP-aaa]local-user huawei service-type ppp
[ISP-aaa]int s4/0/0
[ISP-Serial4/0/0]link-protocol ppp
[ISP-Serial4/0/0]ppp authentication-mode pap
R1:
[r1]int s4/0/0
[r1-Serial4/0/0]link-protocol ppp
[r1-Serial4/0/0]ppp pap local-user huawei password cipher huawei123
R2与R5间:
R5:
[ISP]aaa
[ISP-aaa]local-user huawei password cipher huawei123
[ISP-aaa]local-user huawei service-type ppp
[ISP-aaa]int s4/0/1
[ISP-Serial4/0/1]link-protocol ppp
[ISP-Serial4/0/1]ppp authentication-mode chap
R2:
[r2]int s4/0/0
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]ppp chap user huawei
[r2-Serial4/0/0]ppp chap password cipher huawei123
3、R1/2/3构建一个MGRE环境,R1为中心站点;R1/4间为点到点GRE
R1/2/3间:
R1(中心站点):
R2:
R3:
R1与R4间:
R1:
R4:
4、整个私有网络基于RIP全网可达
R1:
R2:
R3:
R4:
为了使R2和R3的私网能够上网,需要在R1上关闭水平分割:
[r1-Tunnel0/0/1]undo rip split-horizon
5、所有PC私有地址为源ip 时,可以正常访问R5环回
R1:
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
R2:
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]int s4/0/0
[r2-Serial4/0/0]nat outbound 2000
R3:
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
R4:
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]int g0/0/0
[r4-GigabitEthernet0/0/0]nat outbound 2000
这时,所有PC的源ip 就可以上网了