本文主要是介绍基于RIP的GRE和MGRE实验,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
目录
一、实验拓扑
二、实验需求
三、实验步骤
1、配置PC端IP地址
2、配置路由器IP地址和R5环回
R1:
R2:
R3:
R4:
R5:
3、公网通(静态缺省路由)
4、PPP认证
(1)R1-R5PPP的PAP认证:
R5为主认证方:
R1被认证方:
(2)R2和R5PPP的CHAP认证
R5为主认证方:
R2被认证方:
5、R3和R5之间HDLC封装
6、R1、R2、R3构建MGRE隧道,R1为中心站点
R1:
R2:
R3:
7、R1-R4GRE隧道
R1:
R4:
8、rip动态路由(全网通)
R1:
R2:
R3:
R4:
9、NAT(easy ip)
R1:
R2:
R3:
R4:
一、实验拓扑
二、实验需求
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、配置PC端IP地址
2、配置路由器IP地址和R5环回
R1:
[R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[R1-Serial4/0/0]ip address 15.1.1.1 24
R2:
[R2-GigabitEthernet0/0/0]ip address 192.168.2.254 24
[R2-Serial4/0/0]ip address 25.1.1.1 24
R3:
[R3-GigabitEthernet0/0/0]ip address 192.168.3.254 24
[R3-Serial4/0/0]ip address 35.1.1.1 24
R4:
[R4-GigabitEthernet0/0/0]ip address 192.168.4.254 24
[R4-Serial4/0/0]ip address 45.1.1.1 24
R5:
[ISP-Serial4/0/0]ip address 25.1.1.2 24
[ISP-Serial4/0/1]ip address 15.1.1.2 24
[ISP-Serial3/0/0]ip address 35.1.1.2 24
[ISP-Serial3/0/1]ip address 45.1.1.2 24
[ISP-LoopBack0]ip address 5.5.5.1 24
3、公网通(静态缺省路由)
[R1]ip route-static 0.0.0.0 0 15.1.1.2
[R2]ip route-static 0.0.0.0 0 25.1.1.2
[R3]ip route-static 0.0.0.0 0 35.1.1.2
[R4]ip route-static 0.0.0.0 0 45.1.1.2
4、PPP认证
(1)R1-R5PPP的PAP认证:
R5为主认证方:
[ISP]aaa
[ISP-aaa]local-user huang password cipher 123
[ISP-aaa]local-user huang service-type ppp
[ISP-Serial4/0/1]ppp authentication-mode pap
R1被认证方:
[R1-Serial4/0/0]ppp pap local-user huang password cipher 123
(2)R2和R5PPP的CHAP认证
R5为主认证方:
[ISP]aaa
[ISP-aaa]local-user xie password cipher 123
[ISP-aaa]local-user xie service-type ppp
[ISP-Serial4/0/0]ppp authentication-mode chap
R2被认证方:
[R2-Serial4/0/0]ppp chap password cipher 123
[R2-Serial4/0/0]ppp chap user xie
5、R3和R5之间HDLC封装
[ISP-Serial3/0/0]link-protocol hdlc
[R3-Serial4/0/0]link-protocol hdlc
6、R1、R2、R3构建MGRE隧道,R1为中心站点
R1:
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.2.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source Serial 4/0/0
[R1-Tunnel0/0/0]nhrp network-id 100
R2:
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.2.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source 25.1.1.1
[R2-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register
R3:
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 10.1.2.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 35.1.1.1
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register
7、R1-R4GRE隧道
R1:
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 10.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 15.1.1.1
[R1-Tunnel0/0/1]destination 45.1.1.1
R4:
[R4]interface Tunnel 0/0/1
[R4-Tunnel0/0/1]ip address 10.1.1.4 24
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]source 45.1.1.1
[R4-Tunnel0/0/1]destination 15.1.1.1
8、rip动态路由(全网通)
R1:
[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]undo summary
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 10.0.0.0
R1开启伪广播:[R1-Tunnel0/0/0]nhrp entry multicast dynamic
R2:
[R2]rip 1
[R2-rip-1]v 2
[R2-rip-1]undo summary
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 10.0.0.0
[R2-Tunnel0/0/0]undo rip split-horizon
R3:
[R3]rip 1
[R3-rip-1]v 2
[R3-rip-1]undo summary
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 10.0.0.0
[R3-Tunnel0/0/0]undo rip split-horizon
R4:
[R4]rip 1
[R4-rip-1]v 2
[R4-rip-1]undo summary
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 10.0.0.0
9、NAT(easy ip)
R1:
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[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-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-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-Serial4/0/0]nat outbound 2000
这篇关于基于RIP的GRE和MGRE实验的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!