HCIA实验复习

HCIA实验复习

一.拓扑图
在这里插入图片描述

二.需求分析

子网划分

一个环回需要配置一个独立网段,R1,R2,R4各自有两个环回,R5,R6各自有一个环回,因为R6已经给定了网段,所以需要7个网段;R3也需要一个独立网段连接交换机,此时需要8个网段;骨干链路也需要独立网段,所以一共需要14个网段。因为题目要求路由表尽量小,所以需要汇总,所以把R1、R2、R4的两个两个环回地址汇总一下,变成一个网段;六个骨干链路,每个骨干链路需要2个地址,所以进行地址分配的时候要本着节约地址的原则,所以借出三个网段,所以,只需要6个网段。
首先将192.168.1.0/24划分为(取其6):

 192.168.1.0/27 (骨干)          192.168.1.32/27       192.168.1.64/27       192.168.1.96/27 (R3)       192.168.1.128/27      192.168.1.160/27 (R5环回)    192.168.1.192/27     192.168.1.224/27 

将192.168.1.0/27用于骨干网段在此进行划分,避免地址浪费,便于管理直接划分为

(取其6):

   192.168.1.0/30     192.168.1.4/30      192.168.1.8/30         192.168.1.12/30    192.168.1.16/30   192.168.1.20/30    192.168.1.24/30       192.168.1.128/30

将R1,R2 , R4的网段二次划分为两个环回地址:

  R1:192.168.1.32/27:192.168.1.32/28           192.168.1.48/28 

  R2:192.168.1.64/27 :192.168.1.64/28          192.168.1.80/28 

  R4:192.168.1.128/27 :192.168.1.128/28       192.168.1.144/28

三.配置

配ip

[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add	
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Mar 18 2024 20:14:56-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Mar 18 2024 20:18:55-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]int lo0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int lo1
[r1-LoopBack1]ip address 192.168.1.49 28

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add	
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Mar 18 2024 20:31:32-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add	
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
Mar 18 2024 20:33:18-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r2-GigabitEthernet0/0/1]int lo0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]int lo1
[r2-LoopBack1]ip address 192.168.1.81 28

[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
Mar 18 2024 20:39:02-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[r3-GigabitEthernet0/0/1]
Mar 18 2024 20:41:25-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]int g0/0/2
[r3-GigabitEthernet0/0/2]ip add 192.168.1.97 27
[r3-GigabitEthernet0/0/2]
Mar 18 2024 20:42:39-08:00 r3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 

[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
Mar 18 2024 20:43:59-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
Mar 18 2024 20:45:04-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.21 30
[r4-GigabitEthernet4/0/0]
Mar 18 2024 20:49:04-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[r4-GigabitEthernet4/0/0]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[r4-GigabitEthernet0/0/2]
Mar 18 2024 20:50:41-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r4-GigabitEthernet0/0/2]int lo0
[r4-LoopBack0]int lo1
[r4-LoopBack1]ip add 192.168.1.145 28
[r4-LoopBack1]int lo0
[r4-LoopBack0]ip add 192.168.1.129 28

[Huawei]sys r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
Mar 18 2024 20:57:07-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]int g0/0/2
[r5-GigabitEthernet0/0/2]ip add 192.168.1.22 30
Mar 18 2024 20:58:05-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 12.0.0.1 24
Mar 18 2024 20:59:47-08:00 r5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]int lo0
[r5-LoopBack0]ip add 192.168.1.161 27
[r5-LoopBack0]

[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[r6-GigabitEthernet0/0/0]
Mar 18 2024 21:03:41-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r6-GigabitEthernet0/0/0]int lo0
[r6-LoopBack0]ip add 1.1.1.1 24
[r6-LoopBack0]

开启DHCP

[r3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r3]ip pool a
Info: It's successful to create an IP address pool.
[r3-ip-pool-a]network 192.168.1.96 mask 27
[r3-ip-pool-a]gate	
[r3-ip-pool-a]gateway-list 192.168.1.97
[r3-ip-pool-a]dns	
[r3-ip-pool-a]dns-list 114.114.114.114 8.8.8.8
[r3-ip-pool-a]int g0/0/2
[r3-GigabitEthernet0/0/2]dhcp	
[r3-GigabitEthernet0/0/2]dhcp s	
[r3-GigabitEthernet0/0/2]dhcp select g	
[r3-GigabitEthernet0/0/2]dhcp select global 

在这里插入图片描述

在这里插入图片描述

关闭百兆接口

[r4]int g4/0/0
[r4-GigabitEthernet4/0/0]shu	
[r4-GigabitEthernet4/0/0]shutdown 
Mar 18 2024 21:21:15-08:00 r4 %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEthern
et4/0/0 has turned into DOWN state.
[r4-GigabitEthernet4/0/0]
[r4-GigabitEthernet4/0/0]
Mar 18 2024 21:21:15-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the DOWN state. 
[r4-GigabitEthernet4/0/0]

写缺省路由

[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.6

[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.32 27 192.168.1.10
[r2]ip route-static 0.0.0.0 0 192.168.1.10

[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 0.0.0.0 0 192.168.1.14

[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 0.0.0.0 0 12.0.0.2

避免环路

[r1]ip tatic 192.168.1.32 27 NULL 0

[r2]ip route-static 192.168.1.64 27 NULL 0

[r4]ip route-static 192.168.1.128 27 NULL 0

NAT(一对多)

[r5]acl 2000
[r5-acl-basic-2000]rule per	
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]int g 0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000

R4与R5正常通过1000M链路,故障时通过100M链路;

[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61

[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 pr 61
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 pr 61

R6telnetR5的公有Ip地址时,实际登陆到R1上

[r1]aaa
[r1-aaa]local	
[r1-aaa]local-user liuu p	
[r1-aaa]local-user liuu password c	
[r1-aaa]local-user liuu password cipher 1234
Info: Add a new user.
[r1-aaa]local-user liuu service-type telnet
[r1-aaa]user-i	
[r1-aaa]user-i
[r1-aaa]user-interface vty 0 4
[r1-ui-vty0-4]au	
[r1-ui-vty0-4]authentication-mode aaa
[r1-ui-vty0-4]q

[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface  23 inside 192.168.1.1 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y

四.测试

R3下的两台Pc通在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

R1-R5均可以访问R6的环回

在这里插入图片描述
在这里插入图片描述

R6telnetR5的公有Ip地址时,实际登陆到R1上

在这里插入图片描述

``

  • 9
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
嘉环华为HCIA实验手册是华为认证网络工程师的培训教材之一,主要用于帮助学员学习和实践华为网络产品与解决方案。 该手册内容丰富全面,涵盖了网络基础知识、华为网络产品的配置与管理、网络故障排除等方面。通过实验手册的学习,学员可以了解并掌握华为网络产品的基本功能和配置方法,提升其网络工程师的实践能力。 嘉环华为HCIA实验手册的特点如下: 首先,手册的编写具有实际性和实用性。手册中的实验案例都是根据真实场景和网络需求设计的,学员通过实际实验可以深入理解网络知识,能够在实际工作中应用所学技能。 其次,手册的设计合理。手册的内容安排循序渐进,从基础知识到应用实践,层层递进。每个实验都有详细的步骤和配置说明,学员可以按照手册一步一步进行实验,提高效率和学习效果。 此外,手册的内容丰富多样。不仅包含了核心的网络知识点,还介绍了华为产品常用的配置与管理方法。学员可以通过实验手册了解到华为网络产品的特性和优势,为今后的实际工作提供参考。 总的来说,嘉环华为HCIA实验手册是一本全面且实用的教材,对于帮助学员学习华为网络产品和解决方案具有重要的意义。通过实验手册的学习,学员可以提高自己的网络工程师技能,适应和满足不断发展的网络行业需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值