【网络】MGRE基础实验

题目

 一、实验拓扑

二、实验需求

1.R2为ISP,其上只能配置IP地址

2.R1-R2之间为HDLC封装

3.R2-R3之间为ppp封装,pap认证,R2为主认证方

4.R2-R4之间为PPP封装,chap认证,R2为主认证方

5.R1、R3、R4构建MGRE环境,仅R1IP地址固定

6.内网使用RIP获取路中,所有pc可以互相访问,并且可以访问R2的环回

三、实验思路

1.配置公网环境,实现公网全网通

2.R1-R2之间为HDLC封装

3.R2-R3之间为ppp封装,pap认证,R2为主认证方

4.R2-R4之间为PPP封装,chap认证,R2为主认证方

5.R1、R3、R4构建MGRE环境,仅R1IP地址固定

6.内网使用RIP获取路中,所有pc可以互相访问,并且可以访问R2的环回

四、实验步骤

1.配置公网环境,实现公网全网通

(1)配置公网IP

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[r1-GigabitEthernet0/0/0]q
[r1]int s 4/0/0
[r1-Serial4/0/0]ip address 12.1.1.1 24

[r2]int lo 0	
[r2-LoopBack0]ip address 2.2.2.2 24
[r2-LoopBack0]q
[r2]int s 3/0/0
[r2-Serial3/0/0]ip address 12.1.1.2 24
[r2-Serial3/0/0]q
[r2]int s 3/0/1
[r2-Serial3/0/1]ip address 32.1.1.2 24
[r2-Serial3/0/1]q
[r2]int s 4/0/0
[r2-Serial4/0/0]ip address 42.1.1.2 24

[r3]int s 4/0/0
[r3-Serial4/0/0]ip address 32.1.1.1 24
[r3-Serial4/0/0]q
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.2.1 24

[r4]int s 4/0/0
[r4-Serial4/0/0]ip address 42.1.1.1 24
[r4-Serial4/0/0]q
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.3.1 24

 (2)配置指向R2的缺省路由

[r1]ip route-static 0.0.0.0 0 12.1.1.2

[r3]ip route-static 0.0.0.0 0 32.1.1.2

[r4]ip route-static 0.0.0.0 0 42.1.1.2

(3)公网可通

2.R1-R2之间为HDLC封装

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

[r2]interface s3/0/0
[r2-Serial3/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y

3.R2-R3之间为ppp封装,pap认证,R2为主认证方

[r2]aaa	
[r2-aaa]local-user a password cipher 123456
[r2-aaa]local-user a service-type ppp
[r2-aaa]int s3/0/1
[r2-Serial3/0/1]ppp authentication-mode pap

[r3]int s4/0/0	
[r3-Serial4/0/0]ppp pap local-user a password cipher 123456

4.R2-R4之间为PPP封装,chap认证,R2为主认证方

[r2]aaa
[r2-aaa]local-user b password cipher 123456
[r2-aaa]local-user b service-type ppp
[r2-aaa]int s4/0/0
[r2-Serial4/0/0]ppp authentication-mode chap 

[r4]int s4/0/0
[r4-Serial4/0/0]ppp chap local-user b password cipher 123456

协议up

5.R1、R3、R4构建MGRE环境,仅R1IP地址固定

[r1]int t 0/0/0
[r1-Tunnel0/0/0]ip address 10.1.1.1 24  //隧道接口地址
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 12.1.1.1
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 

[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip address 10.1.1.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 	
[r3-Tunnel0/0/0]source Serial 4/0/0
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register 

[r4]int t 0/0/0
[r4-Tunnel0/0/0]ip address 10.1.1.3 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 	
[r4-Tunnel0/0/0]source Serial 4/0/0	
[r4-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register 

查看注册结果

 6.内网使用RIP获取路中,所有pc可以互相访问,并且可以访问R2的环回

(1)配置rip

[r1]rip 1
[r1-rip-1]vers 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 10.0.0.0

[r3]rip 1
[r3-rip-1]vers 2
[r3-rip-1]network 192.168.2.0	
[r3-rip-1]network 10.0.0.0

[r4]rip 1
[r4-rip-1]vers 2	
[r4-rip-1]network 192.168.3.0
[r4-rip-1]network 10.0.0.0

(2)关闭水平分割

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

(3)通过rip获得内网路由

 (4)配置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

[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000

[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]int s4/0/0
[r4-Serial4/0/0]nat outbound 2000

 (5)所有pc可以互相访问,并且可以访问R2的环回

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值