HCIP第二天——网络类型实验报告

题目

如图所示在这里插入图片描述

根据题目设置拓扑图

在这里插入图片描述
路由器之间的连接方式是Serial接口,本身没有,需要单独加
如图所示在这里插入图片描述

配置公网IP

AR2

设置S3/0/0口封装类型为HDLC
[r2]int s3/0/0
[r2-Serial3/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Jan 10 2023 20:43:17-08:00 r2 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed 
the configuration that will change the encapsulation protocol of the link and th
en selected Y. 
[r2-Serial3/0/0]
Jan 10 2023 20:43:17-08:00 r2 %%01PPP/4/PHYSICALDOWN(l)[1]:On the interface Seri
al3/0/0, PPP link was closed because the status of the physical layer was Down. 
*注:S3/0/1口封装类型为PPP,华为本身就是PPP,不需要改*

IP地址和环回:
[r2-Serial3/0/0]ip address 12.1.1.2 24
[r2-Serial3/0/0]int lo0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2-LoopBack0]q
[r2]interface Serial 3/0/1
[r2-Serial3/0/1]ip address 23.1.1.2 24
[r2-Serial3/0/1]q
[r2]interface Serial 4/0/0
[r2-Serial4/0/0]ip address 24.1.1.1 24

定义账号:
[r2]aaa
[r2-aaa]local-user cn password cipher 123456
Info: Add a new user.
[r2-aaa]local-user cn service-type ppp

[r2-aaa]local-user wjh password cipher 654321
Info: Add a new user.
[r2-aaa]local-user wjh service-type ppp

设置S3/0/1接口需要进行pap认证
[r2-Serial3/0/1]ppp authentication-mode pap
设置S4/0/0接口需要进行chap认证
[r2-Serial4/0/0]ppp authentication-mode chap 
[r2-Serial4/0/0]q

AR1

[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
Jan 10 2023 21:14:21-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]q
[r1]interface Serial 4/0/0
[r1-Serial4/0/0]ip add 12.1.1.1 24

设置S4/0/0口封装类型为HDLC
[r1]interface Serial 4/0/0
[r1-Serial4/0/0]link-protocol HDLC
*检验是否设置成功ping 12.1.1.1(S3/0/0)*

AR3

[r3-Serial4/0/0]ip add 23.1.1.1 24
[r3-Serial4/0/0]
Jan 10 2023 21:22:09-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
 IPCP on the interface Serial4/0/0 has entered the UP state. 

AR4

[r4-Serial4/0/0]ip address 24.1.1.1 24

配置公网路由

缺省路由
AR1:
[r1]ip route-static 0.0.0.0 0 12.1.1.2
AR3:
[r3]ip route-static 0.0.0.0 0 23.1.1.2
AR4:
[r4]ip route-static 0.0.0.0 0 24.1.1.2

检测:
用r1pingr2的环回和23.1.1.1、24.1.1.1,查看是否能够ping通
在这里插入图片描述
在这里插入图片描述

配置私网IP

AR3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.2.1 24
Jan 10 2023 22:15:15-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

AR4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.3.1 24
Jan 10 2023 22:15:42-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

PC1在这里插入图片描述
PC2
在这里插入图片描述
PC3
在这里插入图片描述

构建MRGE环境(R1、R2、R3)

AR1

[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.4.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 12.1.1.1
Jan 10 2023 22:30:28-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

AR3

[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 192.168.4.3 24	
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source Serial 4/0/0
Jan 10 2023 22:34:28-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 entry 192.168.4.1 12.1.1.1 register 
[r3-Tunnel0/0/0]nhrp network-id 100

AR4

[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 192.168.4.4 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]source Serial 4/0/0
Jan 10 2023 22:36:34-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 entry 192.168.4.1 12.1.1.1 register 
[r4-Tunnel0/0/0]nhrp network-id 100

使用rip获取路由

AR1
[r1]rip 1
[r1-rip-1]ver 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.4.0

AR3
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 192.168.2.0
[r3-rip-1]network 192.168.4.0

AR4
[r4]rip 1
[r4-rip-1]ver 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.3.0

用PC1ping192.168.2.2或192.168.3.2,查看是否能ping通
在这里插入图片描述

使PC可以上网(ping通R2的环回)

AR1

[r1]acl 2000
[r1-acl-basic-2000]per	
[r1-acl-basic-2000]ru	
[r1-acl-basic-2000]rule per	
[r1-acl-basic-2000]rule permit so	
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]int s4/0/0
[r1-Serial4/0/0]nat ou	
[r1-Serial4/0/0]nat outbound 2000

在这里插入图片描述

AR3

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

在这里插入图片描述

AR4

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

在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值