网络类型实验

1 篇文章 0 订阅
1 篇文章 0 订阅

在这里插入图片描述
条件: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/4间为点到点GRE
4.整个私有网络基于RIP全网可达
5.所有 PC私有IP地址为源IP时均可以访问R5环回
如下图:
在这里插入图片描述
首先给所有的路由器配上如上图的IP地址 配置太过简单 就不展示了
之后我们给所有的电脑通过DHCP来获取IP地址:
这里我们示范一个:
[R1]dhcp enable
[R1]ip pool a
[R1-ip-pool-a]network 192.168.1.0 mask 24
[R1-ip-pool-a]gateway-list 192.168.1.1
[R1-ip-pool-a]dns 8.8.8.8
[R1-ip-pool-a]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]dhcp select global
这时我们查看电脑是否获取IP地址
在这里插入图片描述
看下来的操作,R1与R5直接使用PPP的pap认证 R5为主认证方
在R5上:[r5]aaa
[r5-aaa]local-user huawei password cipher 123456
[r5-aaa]local-user huawei service-type ppp
[r5-aaa]int s3/0/0
[r5-Serial3/0/0]link-protocol ppp
[r5-Serial3/0/0]ppp authentication-mode pap
[r5-Serial3/0/0]ip add 11.1.1.10 24

在到R1上来:
[R1]int s4/0/0
[R1-Serial4/0/0]link-protocol ppp
[R1-Serial4/0/0]ppp pap local-user huawei password cipher 123456
[R1-Serial4/0/0]ip add 11.1.1.11 24

我们的PPP pap已经做好
我们来试着ICMP检查一下
在这里插入图片描述
R2与R5直接使用 ppp的chap认证R5为主认证方
在R5上
[r5]aaa
[r5-aaa]local-user huawei password cipher 123456
[r5-aaa]local-user huawei service-type ppp
[r5-aaa]int s3/0/1
[r5-Serial3/0/1]link-protocol ppp
[r5-Serial3/0/1]ppp authentication-mode chap

在到R2上来
[r2]int s4/0/0
[r2-Serial4/0/0]link-protocol PPP
[r2-Serial4/0/0]ppp chap user huawei
[r2-Serial4/0/0]ppp chap password cipher 123456
在这里插入图片描述
我们关掉在检测一下 发现可以ping通
在这里插入图片描述
R3与R5使用HDLC封装
在R5上:
[r5-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
然后我们试着PING一下 发现不可以PING通
在这里插入图片描述
然后我们在R3上也改成HDLC可以发现
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
我们可以发现他们直接通了
在这里插入图片描述

R1/2/3构成一个MGRE环境 R1为中心站点 R1/R4直接点到点GRE

[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 172.16.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source s4/0/0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100

[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 172.16.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 172.16.1.1 11.1.1.11 register

[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 172.16.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 172.16.1.1 11.1.1.11 register

R1与R4为GRE
[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 10.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre
[R1-Tunnel0/0/1]source 11.1.1.11
[R1-Tunnel0/0/1]description 14.1.1.1

[r4]int t0/0/1
[r4-Tunnel0/0/1]ip add 10.1.1.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre
[r4-Tunnel0/0/1]source 14.1.1.1
[r4-Tunnel0/0/1]description 11.1.1.11

整个网络基于RIP全网可达
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]undo summary
[R1-rip-1]net 192.168.1.0
[R1-rip-1]net 10.0.0.0

给所有的路由器写完RIP
之后在R1上
[R1]int t0/0/0
[R1-Tunnel0/0/0]undo rip split-horizon

之后给每一个路由器写上nat 实验就完成了
[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-4写上缺省路由

然后测试 用所有的电脑来PING 5.5.5.5看是否通
在这里插入图片描述
故实验完成

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值