MGRE实验——9步

实验要求及其拓扑图如下所示:

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环回 

配置接口IP ——R5为ISP

 ..........

1.配置R1——R4向ISP的缺省路由 

[r1]ip route-static 0.0.0.0 0 15.0.0.2

[r2]ip route-static 0.0.0.0 0 25.0.0.0

[r3]ip route-static 0.0.0.0 0 35.0.0.0

[r4]ip route-static 0.0.0.0 0 45.0.0.0

 2.R1和R5间使用PPP的PAP认证,R5(ISP)为主认证方

[r1]int s 4/0/0

[r1-Serial4/0/0]ppp pap local-user admin password cipher 123456 

[isp]aaa  
[isp-aaa]local-user admin password cipher 123456
[isp-aaa]local-user admin service-type ppp
[isp-aaa]int s3/0/0       

[isp-Serial3/0/0]ppp authentication-mode pap 

3.R2于ISP之间使用PPP的CHAP认证,R5(ISP)为主认证方 

[r2]int s4/0/0  
[r2-Serial4/0/0]ppp chap  user admin      
[r2-Serial4/0/0]ppp chap password cipher 123456 

[isp]aaa     
[isp-aaa]local-user admin password cipher 123456 
[isp-aaa]local-user admin service-type ppp
[isp-aaa]q
[isp]int s3/0/1
[isp-Serial3/0/1]ppp authentication-mode chap 
[isp-Serial3/0/1] 

4.R3与R5之间使用HDLC封装 

        (修改接口的封装协议)

[r3]int s4/0/0
[r3-Serial4/0/0]link    
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y 

[isp]int s4/0/0  
[isp-Serial4/0/0]link    
[isp-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y 

5.R1/R2/R3构建一个MGRE环境,R1为中心站点 

[r1]int t0/0/0
[r1-Tunnel0/0/0]ip add 192.168.5.1 24  
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0] 

[r2]int t0/0/0
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp    
[r2-Tunnel0/0/0]source s4/0/0   
[r2-Tunnel0/0/0]nhrp n    
[r2-Tunnel0/0/0]nhrp network-id 1000[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 
[r2-Tunnel0/0/0]

[r3]int t0/0/0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nh    
[r3-Tunnel0/0/0]nhrp n    
[r3-Tunnel0/0/0]nhrp network-id 1000
[r3-Tunnel0/0/0]nhrp e    
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 r    
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 
[r3-Tunnel0/0/0] 

6.R1与R4间为点到点的GRE

 [r1]int t0/0/0
[r1-Tunnel0/0/0]int t0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.2 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]sou    
[r1-Tunnel0/0/1]source 15.0.0.1
[r1-Tunnel0/0/1]de    
[r1-Tunnel0/0/1]description 45.0.0.1
[r1-Tunnel0/0/1]

[r4]int t0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24
[r4-Tunnel0/0/0]tun    
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]sou    
[r4-Tunnel0/0/0]source 45.0.0.1
[r4-Tunnel0/0/0]de    
[r4-Tunnel0/0/0]description 15.0.0.1
[r4-Tunnel0/0/0] 

7.RIP全网可达 

[r1]rip
[r1-rip-1]v2
          ^
Error: Unrecognized command found at '^' position.
[r1-rip-1]v 2
[r1-rip-1]ne    
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0
[r1-rip-1] 

[r2]rip
[r2-rip-1]v 2
[r2-rip-1]net    
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
[r2-rip-1] 

[r3]rip
[r3-rip-1]v 2
[r3-rip-1]n    
[r3-rip-1]network 192.168.5.0
[r3-rip-1]network 192.168.3.0
[r3-rip-1] 

[r4]rip
[r4-rip-1]v 2
[r4-rip-1]n    
[r4-rip-1]network 192.168.6.0
[r4-rip-1]network 192.168.4.0
[r4-rip-1]n    
[r4-rip-1]network 45.0.0.0
[r4-rip-1] 

 8.所有PC设置私有IP为源IP,可以访问R5

[r1]acl 2000
[r1-acl-basic-2000]ru    
[r1-acl-basic-2000]rule p    
[r1-acl-basic-2000]rule permit s    
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000] 

[r2]acl 2000
[r2-acl-basic-2000]ru    
[r2-acl-basic-2000]rule p    
[r2-acl-basic-2000]rule permit s    
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000] 

 [r3]acl 2000
[r3-acl-basic-2000]ru    
[r3-acl-basic-2000]rule p    
[r3-acl-basic-2000]rule permit s    
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]

[r4]acl 2000
[r4-acl-basic-2000]ru    
[r4-acl-basic-2000]rule p    
[r4-acl-basic-2000]rule permit s    
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000] 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

电力小子sp

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

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

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

打赏作者

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

抵扣说明:

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

余额充值