PAP-CHAP-GRE-MGRE综合实验

要求:

在这里插入图片描述

拓扑图:

在这里插入图片描述

IP配置:

R1:

[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[r1]ip pool p0 //使用户使用DHCP获取IP地址
[r1-ip-pool-p0]network 192.168.1.0 mask 24
[r1-ip-pool-p0]gateway-list 192.168.1.1
[r1-ip-pool-p0]dns-list 192.168.1.255
[r1]dhcp enable
[r1-GigabitEthernet0/0/0]dhcp select global
验证:
在这里插入图片描述
[r1-Serial4/0/0]ip address 15.0.0.1 24

R5:

[r5-Serial3/0/0]ip address 15.0.0.2 24
[r5-Serial3/0/0]int Serial 3/0/1
[r5-Serial3/0/1]ip address 25.0.0.2 24
[r5-Serial3/0/1]int Serial 4/0/0
[r5-Serial4/0/0]ip address 35.0.0.2 24
[r5-GigabitEthernet0/0/0]ip address 45.0.0.2 24
[r5-Serial4/0/0]int lo0
[r5-LoopBack0]ip address 5.5.5.5 24

R2:

[r2-Serial4/0/0]ip address 25.0.0.1 24
[r2-Serial4/0/0]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[r2]dhcp enable
[r2]ip pool p0
Info: It’s successful to create an IP address pool.
[r2-ip-pool-p0]network 192.168.2.0 mask 24
[r2-ip-pool-p0]gateway-list 192.168.2.1
[r2-ip-pool-p0]dns-list 192.168.2.255
[r2-GigabitEthernet0/0/0]dhcp select global

验证:
在这里插入图片描述

R3:

[r3-Serial4/0/0]ip address 35.0.0.1 24
[r3-GigabitEthernet0/0/0]ip address 192.168.3.1 24
[r3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r3]ip pool p0
Info: It’s successful to create an IP address pool.
[r3-ip-pool-p0]network 192.168.3.0 mask 24
[r3-ip-pool-p0]gateway-list 192.168.3.1
[r3-ip-pool-p0]dns-list 192.168.3.255
[r3-GigabitEthernet0/0/0]dhcp select global
验证:
在这里插入图片描述

R4:

[R4-GigabitEthernet0/0/0]ip address 45.0.0.1 24
[R4]dhcp enable
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]q
[R4]ip pool p0
[R4-ip-pool-p0]network 192.168.4.0 mask 24
[R4-ip-pool-p0]gateway-list 192.168.4.1
[R4-ip-pool-p0]dns-list 192.168.4.255
[R4-ip-pool-p0]q
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]dhcp select global
验证:
在这里插入图片描述

完成认证:

PAP认证:
R1:

[r1-aaa]local-user wgq password cipher 123456 //添加用户
Info: Add a new user.
[r1-Serial4/0/0]ppp authentication-mode pap //进入接口开启认证模式

R5:

[r5-Serial3/0/0]ppp pap local-user wgq password cipher 123456

CHAP认证:
R2:

[r2-aaa]local-user zqj password cipher 123456
Info: Add a new user.
[r2-aaa]local-user zqj service-type ppp
[r2-Serial4/0/0]ppp authentication-mode chap

R5:

[r5-Serial3/0/1]ppp chap user zqj
[r5-Serial3/0/1]ppp chap password cipher 123456

修改封装:
R3:

[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
在这里插入图片描述

R5:

[r5-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
在这里插入图片描述

RIP:

R1:

[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 123.0.0.0

R2:

[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 123.0.0.0

R3:

[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 123.0.0.0

R4:

[R4-rip-1]network 192.168.4.0

MGRE环境搭建:

MGRE使用123.123.123.0/24网段

R1中心:

创建接口:
[r1]int Tunnel 0/0/0
定义封装:
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 15.0.0.1
创建NHRP域:
[r1-Tunnel0/0/0]nhrp network-id 1
配置虚拟接口IP
[r1-Tunnel0/0/0]ip address 123.123.123.1 24

R2分支:

创建接口:
[r2]int Tunnel 0/0/0
虚拟接口IP配置:
[r2-Tunnel0/0/0]ip address 123.123.123.2 24
定义封装:
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source Serial 4/0/0 //实现动态 IP可变化
加入NHRP域:
[r2-Tunnel0/0/0]nhrp network-id 1
注册:
[r2-Tunnel0/0/0]nhrp entry 123.123.123.2 15.0.0.1 register

R3同理

中心站点开启伪广播:

[r1-Tunnel0/0/0]nhrp entry multicast dynamic

中心站点关闭RIP水平分割:

[r1-Tunnel0/0/0]undo rip split-horizon

结果:

在这里插入图片描述
在这里插入图片描述

RIP路由:
在这里插入图片描述
在这里插入图片描述

GRE环境搭建:

R1:

[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip address 14.1.1.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

R4:

[R4-Tunnel0/0/0]ip address 14.1.1.2 24
[R4-Tunnel0/0/0]tunnel-protocol gre
[R4-Tunnel0/0/0]source 45.0.0.1
[R4-Tunnel0/0/0]destination 15.0.0.1

结果:
在这里插入图片描述
R1学习到了R4的路由
在这里插入图片描述
R4学习到了所有路由

NAT地址转换:

[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.255.255
[r1]int Serial 4/0/0
[r1-Serial4/0/0]nat outbound 2000
R2,R3,R4同理处理
到此全网可达!

验证全网可达:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

本次实验到此完成所有要求,若有地方不足望指点指点

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值