HCIP:RIP环境下的MGRE实验

HCIP:RIP环境下的MGRE实验_第1张图片

一、IP的划分和拓扑的建立

根据图中的划分的IP来进行配置 

HCIP:RIP环境下的MGRE实验_第2张图片

二 、使用ppp认证和HDLC封装

1、R1和R5间使用PPP的PAP认证,R5为主认证方;

ISP-aaa]local-user xsl password cipher 123456
[ISP-aaa]local-user xsl service-type ppp
[ISP-aaa]q  
[ISP]interface s3/0/0
[ISP-Serial3/0/0]ppp authentication-mode pap
[ISP-Serial3/0/0]q

在ISP上进行ppp账号的注册,再在接口出注账号的认证方向

再在R1接口处进行认证输入账号和密码

2、R2与R5之间使用PPP的chap认证,R5为主认证方

进入与R2的接口进行PPP chap认证的选择,因为的在之前已经有账号的设置了,也是对R2适用的。
[ISP]interface s3/0/1
[ISP-Serial3/0/1]ppp authentication-mode chap
 再在R2的接口处进行选这用户和输入密码来进行认证

 [R2-Serial4/0/0]ppp chap user LYK
[R2-Serial4/0/0]ppp chap password cipher 123456

HCIP:RIP环境下的MGRE实验_第3张图片

3、 R3与R5之间使用HDLC封装
 在isp与R3的接口上改变二层封装协议改为hdlc

[ISP-Serial4/0/0]link-protocol hdcl

HCIP:RIP环境下的MGRE实验_第4张图片

 再在R3接口处进行修改二层协议

[R3-Serial4/0/0]link-protocol hdlc 

HCIP:RIP环境下的MGRE实验_第5张图片

建一个MGRE环境,R1为中心站点;

创建隧道接口配置IP地址(私网IP地址)
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168. 5 .1 24
定义封装协议
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp ---
MGRE


三、定义封装内容


[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 50
 

R2同上 

R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp   
[R2-Tunnel0/0/0]source Serial 4/0/0
[R2-Tunnel0/0/0]nhrp network-id 50

[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 
分支的MGRE配置

HCIP:RIP环境下的MGRE实验_第6张图片

R3同上配置

 R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 192.168.5.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp   
[R3-Tunnel0/0/0]source Serial 4/0/0
[R3-Tunnel0/0/0]nhrp network-id 50

[R3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 

最后查看[R1]display nhrp peer all 

HCIP:RIP环境下的MGRE实验_第7张图片

 2、R1、R4间为点到点的GRE。

[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 192.168.6.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]interface Tunnel 0/0/0
[R4-Tunnel0/0/0]ip address 192.168.6.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

HCIP:RIP环境下的MGRE实验_第8张图片

四、整个私有网络基于RIP全网可达

每个路由器进行RIP配置

[R1]rip    
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 192.168.5.0
[R1-rip-1]network 192.168.6.0

进行宣告网段

HCIP:RIP环境下的MGRE实验_第9张图片

查看R1的RIP表[R1]display ip routing-table protocol rip 

HCIP:RIP环境下的MGRE实验_第10张图片

因为NBSA环境不支持广播与组播所以在中心R1上开启伪广播
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic 

同时也要避免水平水平分割
[R1-Tunnel0/0/0]undo rip split-horizon

查看R2的路由表 

HCIP:RIP环境下的MGRE实验_第11张图片

五、所有PC设置私有IP为源IP,可以访问R5环回 

配置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]interface Serial 4/0/0
[R1-Serial4/0/0]nat outbound 2000

R2,R3,R4同上

最后用PC1来连接R5的环回1.1.1.1

HCIP:RIP环境下的MGRE实验_第12张图片

你可能感兴趣的:(网络)