PPP,GRE,MGRE,RIP相关实验

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

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,只能进行IP地址配置;其所有地址均配为公有IP地址;

    ISP只进行IP地址配置,因此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.2
[r3]ip route-static 0.0.0.0 0 35.0.0.2
[r4]ip route-static 0.0.0.0 0 45.0.0.2

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

R1;

[r1]int s 4/0/0
[r1-Serial4/0/0]ppp pap local-user admin password cipher 12345

R5;

[r5]aaa	
[r5-aaa]local-user admin password cipher 12345
[r5-aaa]local-user admin service-type ppp
[r5-aaa]q

[r5]int s 3/0/0
[r5-Serial3/0/0]ppp authentication-mode pap

R2于R5之间使用PPP的CHAP认证,R5为主认证方;

R2:

[r2]int s 4/0/0
[r2-Serial4/0/0]ppp chap user admin
[r2-Serial4/0/0]ppp chap password cipher 12345

R5:

[r5]aaa	
[r5-aaa]local-user admin password cipher 12345
[r5-aaa]local-user admin service-type ppp
[r5-aaa]q
[r5]int s 3/0/1	
[r5-Serial3/0/1]ppp authentication-mode chap

R3于R5之间使用HDLC封装:

        R3,R5华为默认的封装是PPP,所以修改接口的封装协议即可

R3:

[r3]int s 4/0/0
[r3-Serial4/0/0]link-protocol hdlc

R5:

[r5]int s 4/0/0
[r5-Serial4/0/0]link-protocol hdlc

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

R1:

[r1]int t 0/0/0
[r1-Tunnel0/0/0]ip ad 192.168.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 15.0.0.1
Jul 10 2022 18:04:48-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r1-Tunnel0/0/0]nhrp network-id 1000

R2:

[r2]int t 0/0/0
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s 4/0/0
Jul 10 2022 18:11:55-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r2-Tunnel0/0/0]nhrp network-id 1000  (选择相同的id号)	
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 

R3:

[r3]int t 0/0/0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s 4/0/0
Jul 10 2022 18:16:21-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 	
[r3-Tunnel0/0/0]nhrp network-id 1000	
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 

 R1、R4间为点到点的GRE:

R1:

[r1-Tunnel0/0/0]int t 0/0/1
[r1-Tunnel0/0/1]ip ad 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]int t 0/0/0
[r4-Tunnel0/0/0]ip ad 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

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

        用RIP进行网段宣告(按主类宣告)

R1:

[r1]rip
[r1-rip-1]v 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

R2:

[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

 R3:

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

R4:

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

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

        私有IP想要访问公网网段,则需要出接口进行流量匹配(nat服务)(R1-R4的配置均相似,这里只展示R1)

R1:

[r1]acl 2000
[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]int s 4/0/0
[r1-Serial4/0/0]nat outbound 2000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值