目录
题目:编辑
第一步:地址规划(子网划分)
第二步:设计拓扑并规划地址配置
第三步:VLAN规划配置
LW1
LW2
第四步:网关配置
第五步:及静态路由配置
第六步防止成环
题目:
第一步:地址规划(子网划分)
192.168.0.0 24 四等分
主干链路(分八分):192.168.0.0 26
192.168.0.0 29
192.168.8.0 29
192.168.16.0 29
192.168.24.0 29
192.168.32.0 29
192.168.40.0 29
192.168.48.0 29
192.168.56.0 29
环回(四份):192.168.64.0 26
192.168.64.0 28
192.168.64.64 28
192.168.64.128 28
192.168.64.192 28
VLAN(二份):192.168.128.0 26
192.168.128.0 27
192.168.128.128 27
备份:192.168.1.192 26
第二步:设计拓扑并规划地址配置
第三步:VLAN规划配置
LW1
配置命令:
改名:
system-view
[Huawei]sy LW1
创建VLAN
[LW1]vlan batch 2 3
接口分配链路类型
[LW1]interface Eth 0/0/3
[LW1-Ethernet0/0/3]port link-type access
接口划分VLAN
[LW1-Ethernet0/0/3]port default vlan 2
[LW1-Ethernet0/0/3]q
接口分配链路类型
[LW1]interface Eth 0/0/4
[LW1-Ethernet0/0/4]port link-type access
接口划分VLAN
[LW1-Ethernet0/0/4]port default vlan 3
[LW1-Ethernet0/0/4]q
配置命令使交换机与路由器之间的链路可以让VLAN1和VLAN2 的命令通过
[LW1]interface Eth 0/0/1
[LW1-Ethernet0/0/1]port link-type trunk
[LW1-Ethernet0/0/1]port trunk allow-pass vlan 2 3
配置命令使交换机之间的链路可以让VLAN1和VLAN2 的命令通过
[LW1]interface Eth 0/0/2
[LW1-Ethernet0/0/2]port link-type trunk
[LW1-Ethernet0/0/2]port trunk allow-pass vlan 2 3
LW2
配置命令:
<Huawei>SY
[Huawei]SY LW2
[LW2]vlan batch 2 3
[LW2]interface Eth 0/0/2
[LW2-Ethernet0/0/2]port link-type access
[LW2-Ethernet0/0/2]port default vlan 2
[LW2-Ethernet0/0/2]q
[LW2]interface Eth 0/0/3
[LW2-Ethernet0/0/3]port link-type access
[LW2-Ethernet0/0/3]port default vlan 3
[LW2-Ethernet0/0/3]q
[LW2-Ethernet0/0/1]port link-type trunk
[LW2-Ethernet0/0/1]port trunk allow-pass vlan 2 3
[LW2-Ethernet0/0/1]q
第四步:网关配置
R1
VLAN续配:
<Huawei>system-view
[r14]sy r1
[r1]interface GigabitEthernet 0/0/2.2
[r1-GigabitEthernet0/0/2.2]dot1q termination vid 2 让路由器的子接口服务某个VLAN
[r1-GigabitEthernet0/0/2.2]arp broadcast enable 开启ARP广播功能
[r1-GigabitEthernet0/0/2.2]ip address 192.168.128.1 27
[r1-GigabitEthernet0/0/2.2]q
[r1]interface GigabitEthernet 0/0/2.3
[r1-GigabitEthernet0/0/2.3]dot1q termination vid 3
[r1-GigabitEthernet0/0/2.3]arp broadcast enable
[r1-GigabitEthernet0/0/2.3]ip add 192.168.1.129 27
检测:用PC1去pingPC3检测
配置网关:
[r1-GigabitEthernet0/0/1]ip address 192.168.0.1 29
[r1-GigabitEthernet0/0/0]ip add 192.168.16.1 29
R2
网关:
<Huawei>system-view
[Huawei]sy r2
[r2]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.0.2 29
[r2-GigabitEthernet0/0/1]q
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.8.1 29
配置回环接口:
[r2]int LoopBack 0
[r2-LoopBack0]ip add 192.168.64.1 28
[r2-LoopBack0]q
[r2]int l 1
[r2-LoopBack1]ip add 192.168.64.65 28
[r2-LoopBack1]q
[r2]int l 2
[r2-LoopBack2]ip add 192.168.64.129 28
[r2-LoopBack2]q
R3
<Huawei>sy
<Huawei>system-view
[Huawei]sy r3
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.16.1 29
[r3]interface GigabitEthernet 4/0/0
[r3-GigabitEthernet4/0/0]ip add
[r3-GigabitEthernet4/0/0]ip address 192.168.32.1 29
Jul 15 2023 20:01:20-08:00 r3 %%01IFNET/4/LINK_STATE(l)[9]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
[r3-GigabitEthernet4/0/0]q
[r3]int
[r3]interface g
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.16.2 29
[r3-GigabitEthernet0/0/1]q
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.24.2 29
[r3-GigabitEthernet0/0/0]q
[r3]int g 2/0/0
[r3-GigabitEthernet2/0/0]ip add 192.168.40.1 29
R4
<Huawei>sy
<Huawei>system-view
[Huawei]sy r4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.8.2 29
[r4-GigabitEthernet0/0/0]q
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.24.1 29
R5
<Huawei>sy
[Huawei]sy r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.32.2 29
[r5-GigabitEthernet0/0/0]q
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.40.2 29
[r5-GigabitEthernet0/0/1]q
[r5]int g 0/0/2
[r5-GigabitEthernet0/0/2]ip add 192.168.48.1 29
R6
<Huawei>sy
<Huawei>system-view
[Huawei]sy r6
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]ip add 192.168.48.2 29
[r6-GigabitEthernet0/0/0]q
[r6]int l 0
[r6-LoopBack0]ip add 100.1.1.1 24
第五步:及静态路由配置
R1
[r1]ip route-static 192.168.8.0 29 192.168.0.2
[r1]ip route-static 192.168.64.0 26 192.168.0.2
[r1]ip route-static 192.168.32.0 29 192.168.16.2
[r1]ip route-static 192.168.40.0 29 192.168.16.2
[r1]ip route-static 192.168.48.0 29 192.168.16.2
[r1]ip route-static 192.168.24.0 29 192.168.16.2
[r1]ip route-static 0.0.0.0 0 192.168.16.2
R2
[r2]ip route-static 192.168.128.0 26 192.168.0.1
[r2]ip route-static 192.168.16.0 29 192.168.0.1
[r2]ip route-static 192.168.40.0 29 192.168.0.1
[r2]ip route-static 192.168.48.0 29 192.168.0.1
[r2]ip route-static 0.0.0.0 0 192.168.0.1
[r2]ip route-static 192.168.24.0 29 192.168.8.2
[r2]ip route-static 192.168.32.0 29 192.168.8.2
[r2]ip route-static 192.168.40.0 29 192.168.8.2
[r2]ip route-static 192.168.48.0 29 192.168.8.2
[r2]ip route-static 0.0.0.0 0 192.168.8.2
R3
[r3]ip route-static 192.168.8.0 29 192.168.24.1
[r3]ip route-static 192.168.64.0 26 192.168.24.1
[r3]ip route-static 192.168.128.0 26 192.168.16.1
[r3]ip route-static 192.168.0.0 29 192.168.16.1
[r3]ip route-static 192.168.64.0 26 192.168.16.1
p route-static 192.168.48.0 29 192.168.40.2
[r3]ip route-static 0.0.0.0 0 192.168.40.2
R4
[r4]ip route-static 192.168.64.0 26 192.168.8.1
[r4]ip route-static 192.168.128.0 26 192.168.8.1
[r4]ip route-static 192.168.0.0 29 192.168.8.1
[r4]ip route-static 192.168.32.0 29 192.168.24.2
[r4]ip route-static 192.168.40.0 29 192.168.24.2
[r4]ip route-static 192.168.16.0 29 192.168.24.2
[r4]ip route-static 192.168.128.0 26 192.168.24.2
[r4]ip route-static 0.0.0.0 0 192.168.24.2
[r3]ip route-static 192.168.48.0 29 192.168.32.0 preference 62
[r3]ip route-static 0.0.0.0 0 192.168.32.0 preference 62
R5
[r5]ip route-static 192.168.16.0 29 192.168.40.1
[r5]ip route-static 192.168.24.0 29 192.168.40.1
[r5]ip route-static 192.168.8.0 29 192.168.40.1
[r5]ip route-static 192.168.0.0 29 192.168.40.1
[r5]ip route-static 192.168.64.0 26 192.168.40.1
[r5]ip route-static 192.168.128.0 26 192.168.40.1
[r5]ip route-static 192.168.16.0 29 192.168.32.1 preference 62
[r5]ip route-static 192.168.24.0 29 192.168.32.1 preference 62
[r5]ip route-static 192.168.8.0 29 192.168.32.1 preference 62
[r5]ip route-static 192.168.0.0 29 192.168.32.1 preference 62
[r5]ip route-static 192.168.64.0 26 192.168.32.1 preference 62
[r5]ip route-static 192.168.128.0 26 192.168.32.1 preference 62
R6
[r6]ip route-static 192.168.40.0 29 192.168.48.1
[r6]ip route-static 192.168.32.0 29 192.168.48.1
[r6]ip route-static 192.168.24.0 29 192.168.48.1
[r6]ip route-static 192.168.8.0 29 192.168.48.1
[r6]ip route-static 192.168.16.0 29 192.168.48.1
[r6]ip route-static 192.168.0.0 29 192.168.48.1
[r6]ip route-static 192.168.64.0 26 192.168.48.1
[r6]ip route-static 192.168.128.0 26 192.168.48.1
第六步防止成环
[r2]ip route-static 192.168.0.0 22 NULL 0
至此实验结束文章来源:https://www.toymoban.com/news/detail-567443.html
文章来源地址https://www.toymoban.com/news/detail-567443.html
到了这里,关于HCIP第一课实验小练习的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!