2021-07-10

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

首先给所有私有网段设计ip。
先到r5
sys
int serial 0/0/0
link
ip add 15.1.1.2 24
q
aaa
local-user me password cipher 123456 (定义用户)
local-user me service-type ppp(用途)
q
int serial 0/0/0
ppp authentication-mode pap(发起pap认证请求)
来到r1上
sys
int serial 0/0/0
ip add 15.1.1.1 24
ppp pap local-user me password cipher 123456(进行身份认证)

来到r5上
int serial 0/0/1
ppp authentication-mode chap
ip add 25.1.1.2 24
来到r2上
int serial 0/0/1
ip add 25.1.1.1 24
在r5上
shutdown
undo shutdown
r2上
ppp pap local-user me password cipher 123456

来到r5上
int serial 0/0/0
link-protocol hdlc
ip add 35.1.1.2 24
来到r3上
ip add 35.1.1.1 24
link-protocol hdlc
来到r5上
int g0/0/0
ip add 45.1.1.2 24
来到r4上
int g0/0/0
ip add 45.1.1.1 24

来到r5上
int lo0
ip add 5.5.5.5

分别在4个路由器上配上
int g0/0/2
ip add 192.168.1.1 24
int g0/0/2
ip add 192.168.2.1 24
int g0/0/2
ip add 192.168.3.1 24
int g0/0/2
ip add 192.168.4.1 24

分别在4个路由器上配置静态路由
ip route-static 0.0.0.0 0 15.1.1.2
ip route-static 0.0.0.0 0 25.1.1.2
ip route-static 0.0.0.0 0 35.1.1.2
ip route-static 0.0.0.0 0 45.1.1.2

来到r1上
int tunnel 0/0/0
ip add 10.1.1.1 24
tunnel-protocol gre
source 15.1.1.1
destination 45.1.1.1
来到r4上
int tunnel 0/0/0
ip add 10.1.1.2 24
tunnel-protocol gre
source 45.1.1.1
destination 15.1.1.1

来到r1上
int tunnel 0/0/1
ip add 10.1.2.1 24
tunnel-protocol gre p2mp
source 15.1.1.1
nhrp entry multicast dynamic
nhrp network-id 100
来到r2上
int tunnel 0/0/0
ip add 10.1.2.2 24
tunnel-protocol gre p2mp
source serial 4/0/0
nhrp entry 10.1.2.1 15.1.1.1 register
nhrp network-id 100
来到r3上
int tunnel 0/0/0
ip add 10.1.2.3 24
tunnel-protocol gre p2mp
source serial 4/0/0
nhrp entry 10.1.2.1 15.1.1.1 register
nhrp network-id 100

在r1上
rip 1
ver 2
un summary
network 192.168.1.0
network 10.0.0.0
来到r2上
rip 1
ver 2
un summary
network 192.168.2.0
network 10.0.0.0
来到r3上
rip 1
ver 2
un summary
network 192.168.3.0
network 10.0.0.0
来到r4上
rip 1
ver 2
un summary
network 192.168.4.0
network 10.0.0.0
来到r1上
int tunnel 0/0/1
undo rip split-horizon

来到r1上
acl 2000
rule permit source 192.168.1.0 0.0.0.255
int s4/0/0
nat outbound 2000
r2上
acl 2000
rule permit source 192.168.2.0 0.0.0.255
int s4/0/0
nat outbound 2000
r3上
acl 2000
rule permit source 192.168.3.0 0.0.0.255
int s4/0/0
nat outbound 2000
r4上
acl 2000
rule permit source 192.168.4.0 0.0.0.255
int s4/0/0
nat outbound 2000

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值