MGRE综合实验
要求:
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环回。
一,给R1-R5配置IP地址和环回地址。
1,在R1上配置IP
2,在R2上配置IP
3,在R3上配置IP
4,在R4上配置IP
5,在R5上配置IP
二,给每个路由器写上缺省路由,使内网都能通信。
[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
三,R1和R5间使用PPP的PAP认证,R5为主认证方;
1,在主认证方:
[isp]aaa
[isp-aaa]local-user malihua password cipher 123456
[isp-aaa]local-user malihua service-type ppp
[isp]int s3/0/0
[isp-Serial3/0/0]ppp authentication-mode pap
2,在被认证方:
[r1]int s4/0/0
[r1-Serial4/0/0]ppp pap local-user malihau password 123456
现在看不出来是因为PPP之前建立过一次,看不出来,从新关闭接口,从重新打开,如果能ping通,说明建立成功,ping不通,建立失败。
[r1-Serial4/0/0]shutdown
[r1-Serial4/0/0]undo shutdown
现在能ping通,说明PAP人认证做的没有问题
四,R2于R5之间使用PPP的chap认证,R5为主认证方;
1,在主认证方:
[isp]aaa
[isp-aaa]local-user xiaoming password cipher 123
[isp-aaa]local-user xiaoming service-type ppp
[isp]int s3/0/1
[isp-Serial3/0/1]ppp authentication-mode chap
2,在被认证方:
[r2]int s4/0/0
[r2-Serial4/0/0]ppp chap user xiaoming
[r2-Serial4/0/0]ppp chap password cipher 123
还是一样, 现在看不出来是因为PPP之前建立过一次,看不出来,从新关闭接口,从重新打开,如果能ping通,说明建立成功,ping不通,建立失败。
[r1-Serial4/0/0]shutdown
[r1-Serial4/0/0]undo shutdown
OK,可以ping通。
五,R3于R5之间使用HDLC封装。
[r3-Serial4/0/0]link-protocol hdlc
[isp-Serial4/0/0]link-protocol hdlc
全部改成HDLC,OK
六,R1为中心站点,R1/R2/R3构建一个MGRE环境。
1,在R1上配置
[r1]int t0/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 15.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100
2,在R2上配置
[r2]int t0/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 4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
3,在R3上配置
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip address 192.168.5.3 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial 4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
4,查看NHRP信息收集情况
七,R1为中心站点;R1、R4间为点到点的GRE。
1,在R1上配置:
[r1]int t0/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 15.0.0.1
[r1-Tunnel0/0/1]destination 45.0.0.1
2,在R4上进行配置
[r4]int t0/0/1
[r4-Tunnel0/0/1]ip address 192.168.6.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 45.0.0.1
[r4-Tunnel0/0/1]description 15.0.0.1
八,整个私有网络基于RIP全网可达。
1,给R1进行宣告
[r1]rip
[r1-rip-1]v 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
2,给R2进行宣告
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
3,给R3进行宣告
[r3]rip
[r3-rip-1]v 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0
4,给R4进行宣告
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0
[r1-Tunnel0/0/0]nhrp entry multicast dynamic —开启中心站点伪广播
[r1-Tunnel0/0/0]undo rip split-horizon —关闭接口水平分割功能
九,所有Pc设置私有IP为源IP,可以访问R5环回。
给所有的边缘路由器接口做nat转换。
R1上:
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1]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]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]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
R4上:
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r4-acl-basic-2000]int g0/0/0
[r4-GigabitEthernet0/0/0]nat outbound 2000
完成!