MGRE基础实验

本文详细描述了一个关于网络配置的实验,包括IP地址规划、路由接口配置、HDLC和PPP封装、认证方式(PAP和CHAP)、MGRE环境建立以及RIP协议的应用,最后进行了内网连通性和终端互相访问的检测。

目录

一,实验题目

三,实验思路

三,实验步骤

3.1 搭建拓扑

3.2基本配置与缺省路由

3.3 R1-R2用HDLC封装

3.4 R2-R3用PPP封装,PAP认证,R2主认证

3.5 R2-R4用PPP封装,CHAP认证,R2主认证

3.6 R1 R3 R4建立MGRE环境,R1固定IP地址

3.7 RIP协议通内网

四,检测

ping通内网:

终端互相访问:


一,实验题目

三,实验思路

1、进行合理的ip地址规划

2、配置路由接口IP

3,由内到外进行配置,做公网的缺省路由,将R1-R4之间实现全网通

4,R2与其他路由之间配置类型封装与认证(PPP/HDLC PAP/CHAP)

5,R1 R3 R4间搭建MGRE环境

6,用RIP协议获取路由,使pc端可互相访问

三,实验步骤

3.1 搭建拓扑

3.2基本配置与缺省路由

通过缺省路由和ACL规则允许PC端访问R2环回

[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
[r1-Serial4/0/0]q
[r1]ip route-static 0.0.0.0 0 12.1.1.2
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
[r3-Serial4/0/0]q
[r3]ip route-static 0.0.0.0 0 23.1.1.2
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]int s4/0/0
[r4-Serial4/0/0]nat outbound 2000
[r4-Serial4/0/0]q
[r4]ip route-static 0.0.0.0 0 24.1.1.2
3.3 R1-R2用HDLC封装
[r1]int s4/0/0
[r1-Serial4/0/0]ip add 12.1.1.1 24
[r1-Serial4/0/0]link-p
[r1-Serial4/0/0]link-protocol h
[r1-Serial4/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[r2]int s4/0/0
[r2-Serial4/0/0]ip add 12.1.1.2 24
[r2-Serial4/0/0]link-p
[r2-Serial4/0/0]link-protocol h
[r2-Serial4/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
3.4 R2-R3用PPP封装,PAP认证,R2主认证
[r2]aaa
[r2-aaa]local-user wl password cipher 123456
Info: Add a new user.
[r2-aaa]local-user wl service-type ppp
[r2-aaa]q
[r2]int s3/0/1
[r2-Serial3/0/1]ppp authentication-mode pap 
[r2-Serial3/0/1]q
[r3]int s4/0/0
[r3-Serial4/0/0]ppp pap local-user wl password cipher 123456
[r3-Serial4/0/0]q
3.5 R2-R4用PPP封装,CHAP认证,R2主认证
[r2]aaa
[r2-aaa]local-user zr password cipher 123456
[r2-aaa]local-user zr service-type ppp
[r2-aaa]int s3/0/0
[r2-Serial3/0/0]ppp authentication-mode chap 
[r4]int s4/0/0
[r4-Serial4/0/0]ppp chap user zr
[r4-Serial4/0/0]ppp chap password cipher 123456
[r4-Serial4/0/0]q
3.6 R1 R3 R4建立MGRE环境,R1固定IP地址
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]so
[r1-Tunnel0/0/0]source 12.1.1.1
Aug  4 2023 00:12:43-08:00 r1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state. 
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]q
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 192.168.4.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register 
[r3-Tunnel0/0/0]nhrp network-id 100
[r4]int s4/0/0
[r4-Serial4/0/0]ppp chap user zr
[r4-Serial4/0/0]ppp chap password cipher 123456
[r4-Serial4/0/0]q
[r4]int t0/0/0
[r4-Tunnel0/0/0]ip add 192.168.4.3 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]source s4/0/0
[r4-Tunnel0/0/0]nhrp en
[r4-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register 
[r4-Tunnel0/0/0]nhrp network-id 100
[r4-Tunnel0/0/0]q
​
3.7 RIP协议通内网
[r1]rip
[r1-rip-1]vers
[r1-rip-1]version 2
[r1-rip-1]netw
[r1-rip-1]network 192.168.4.0
[r1-rip-1]network 192.168.1.0
[r1-rip-1]q
[r3-Tunnel0/0/0]rip
[r3-rip-1]vers
[r3-rip-1]version 2
[r3-rip-1]net
[r3-rip-1]network 192.168.4.0
[r3-rip-1]network 192.168.2.0
[r3-rip-1]q
[r4]rip
[r4-rip-1]vers
[r4-rip-1]version 2
[r4-rip-1]netw
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.3.0
[r4-rip-1]q

四,检测

ping通内网:

终端互相访问:


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Smiling Mr. Rui

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值