HCIP第二天实验(网络类型)

该实验涉及网络设备间不同封装协议的配置,如hdlc和ppp,以及pap和chap认证。还涵盖了MGRE隧道的建立,包括在R1、R3和R4上的配置。此外,实验中也设置了默认路由和RIPv2协议以实现网络互通,并实施了NAT地址转换,确保内部网络的私有地址可以安全地访问外部网络。
摘要由CSDN通过智能技术生成

1.实验要求

 2.实验步骤

1.网络拓扑搭建及IP划分如下

2. r1和r2之间为hdlc封装

 1)R1

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

2)R2

[r2]int Serial 4/0/0
[r2-Serial4/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为主认证方

1)R2


[r2]aaa
[r2-aaa]local-user qq privilege level 15 password cipher 123456
Info: Add a new user.
[r2]int s4/0/1
[r2-Serial4/0/1]ppp authentication-mode pap

2)R3


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

4.R2和R4之间是ppp认证,chap认证,R2为主认证方

1)R2


[r2]aaa
[r2-aaa]local-user ww privilege level 15 password cipher 123456
Info: Add a new user.
[r2-aaa]local-user ww service-type ppp
[r2]int s3/0/0
[r2-Serial3/0/0]ppp authentication-mode chap

2)R4


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

5.构建MGRE环境

1)R1


[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 12.1.1.1
Dec 31 2022 20:43:05-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 entry multicast  dynamic 
[r1-Tunnel0/0/0]nhrp network-id 100

2)R3


[r3]interface Tunnel 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 s4/0/0
Dec 31 2022 20:46:12-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 100
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register 

3)R4


[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add	
[r4-Tunnel0/0/0]ip address 10.1.1.3 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source s4/0/0
Dec 31 2022 20:48:46-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r4-Tunnel0/0/0]nhrp network-id 100
[r4-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register 

6.路由缺省和rip配置

1)R1


[r1]ip route-static 0.0.0.0 0 12.1.1.2
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 10.0.0.0
[r1-rip-1]network 192.168.1.0
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon 

2)R3


[r3]ip route-static 0.0.0.0 0 22.1.1.2
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 10.0.0.0
[r3-rip-1]network 192.168.2.0

3)R4


[r4]ip route-static 0.0.0.0 0 32.1.1.2
[r4]rip 1
[r4-rip-1]ver 2
[r4-rip-1]net 10.0.0.0
[r4-rip-1]net 192.168.3.0

7.NAT地址转换

1)R1

[R1]acl 2000

[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255

[R1-Serial4/0/0]nat outbound 2000

2)R2

[R3]acl 2000

[R3-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255

[R3-Serial4/0/0]nat outbound 2000

3)R3

[R4]acl 2000

[R4-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255

[R4-Serial4/0/0]nat outbound 2000

8.测试

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值