实验要求及其拓扑图如下所示:
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环回
配置接口IP ——R5为ISP
..........
1.配置R1——R4向ISP的缺省路由
[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.0
[r3]ip route-static 0.0.0.0 0 35.0.0.0
[r4]ip route-static 0.0.0.0 0 45.0.0.0
2.R1和R5间使用PPP的PAP认证,R5(ISP)为主认证方
[r1]int s 4/0/0
[r1-Serial4/0/0]ppp pap local-user admin password cipher 123456
[isp]aaa
[isp-aaa]local-user admin password cipher 123456
[isp-aaa]local-user admin service-type ppp
[isp-aaa]int s3/0/0[isp-Serial3/0/0]ppp authentication-mode pap
3.R2于ISP之间使用PPP的CHAP认证,R5(ISP)为主认证方
[r2]int s4/0/0
[r2-Serial4/0/0]ppp chap user admin
[r2-Serial4/0/0]ppp chap password cipher 123456
[isp]aaa
[isp-aaa]local-user admin password cipher 123456
[isp-aaa]local-user admin service-type ppp
[isp-aaa]q
[isp]int s3/0/1
[isp-Serial3/0/1]ppp authentication-mode chap
[isp-Serial3/0/1]
4.R3与R5之间使用HDLC封装
(修改接口的封装协议)
[r3]int s4/0/0
[r3-Serial4/0/0]link
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[isp]int s4/0/0
[isp-Serial4/0/0]link
[isp-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
5.R1/R2/R3构建一个MGRE环境,R1为中心站点
[r1]int t0/0/0
[r1-Tunnel0/0/0]ip add 192.168.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0]
[r2]int t0/0/0
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s4/0/0
[r2-Tunnel0/0/0]nhrp n
[r2-Tunnel0/0/0]nhrp network-id 1000[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[r2-Tunnel0/0/0]
[r3]int t0/0/0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nh
[r3-Tunnel0/0/0]nhrp n
[r3-Tunnel0/0/0]nhrp network-id 1000
[r3-Tunnel0/0/0]nhrp e
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 r
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[r3-Tunnel0/0/0]
6.R1与R4间为点到点的GRE
[r1]int t0/0/0
[r1-Tunnel0/0/0]int t0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.2 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]sou
[r1-Tunnel0/0/1]source 15.0.0.1
[r1-Tunnel0/0/1]de
[r1-Tunnel0/0/1]description 45.0.0.1
[r1-Tunnel0/0/1]
[r4]int t0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24
[r4-Tunnel0/0/0]tun
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]sou
[r4-Tunnel0/0/0]source 45.0.0.1
[r4-Tunnel0/0/0]de
[r4-Tunnel0/0/0]description 15.0.0.1
[r4-Tunnel0/0/0]
7.RIP全网可达
[r1]rip
[r1-rip-1]v2
^
Error: Unrecognized command found at '^' position.
[r1-rip-1]v 2
[r1-rip-1]ne
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0
[r1-rip-1]
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]net
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
[r2-rip-1]
[r3]rip
[r3-rip-1]v 2
[r3-rip-1]n
[r3-rip-1]network 192.168.5.0
[r3-rip-1]network 192.168.3.0
[r3-rip-1]
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]n
[r4-rip-1]network 192.168.6.0
[r4-rip-1]network 192.168.4.0
[r4-rip-1]n
[r4-rip-1]network 45.0.0.0
[r4-rip-1]
8.所有PC设置私有IP为源IP,可以访问R5
[r1]acl 2000
[r1-acl-basic-2000]ru
[r1-acl-basic-2000]rule p
[r1-acl-basic-2000]rule permit s
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]
[r2]acl 2000
[r2-acl-basic-2000]ru
[r2-acl-basic-2000]rule p
[r2-acl-basic-2000]rule permit s
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]
[r3]acl 2000
[r3-acl-basic-2000]ru
[r3-acl-basic-2000]rule p
[r3-acl-basic-2000]rule permit s
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]
[r4]acl 2000
[r4-acl-basic-2000]ru
[r4-acl-basic-2000]rule p
[r4-acl-basic-2000]rule permit s
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]