一、实验要求及拓扑图:
1.拓扑图:
.实验要求:
1、R6为ISP,接口IP地址均为公有地址,该设备只能配置IP地址,之后不能再对其进行任何配置;
2、R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
3、R1、R2、R4,各有两个环回IP地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;
4、R3下面的两台PC通过DHCP自动获取IP地址;
5、选路最佳,路由表尽量小,避免环路;
6、R1-R5均可以访问R6的环回;
7、R6 telnet R5的公有地址时,实际登录到R1上;
8、R4与R5正常通过1000M链路,故障时通过100m链路;
二、网段划分:
R1-R2:192.168.1.0/30
R1:GE 0/0/0:192.168.1.1/30
R2:GE 0/0/0:192.168.1.2/30
R1-R3:192.168.1.8/30
R1:GE 0/0/0:192.168.1.9/30
R3:GE 0/0/0:192.168.1.10/30
R2-R4:192.168.1.4/30
R2:GE 0/0/0:192.168.1.5/30
R4:GE 0/0/0:192.168.1.6/30
R3-R4:192.168.1.12/30
R3:GE 0/0/1:192.168.1.13/30
R4:GE 0/0/1:192.168.1.14/30
R4-R5千兆口:192.168.1.16/30
R4:GE 1/0/0:192.168.1.17/30
R5:GE 0/0/1:192.168.1.18/30
R4-R5百兆口:192.168.1.20/30
R4:192.168.1.21/30
R5:192.168.1.22/30
R5-R6:12.0.0.0/24
R5:12.0.0.1/24
R6:12.0.0.2/24
R1:环回:192.168.1.32/27
L0:192.168.1.33/28
L1:192.168.1.49/28
R2环回:192.168.1.64/27
L0:192.168.1.65/28
L2:192.168.1.81/28
R3下面的网段:
192.168.1.96/27
R4环回:192.168.1.128/27
L0:192.168.1.129/28
L1:192.168.1.145/28
R5环回:192.168.1.160/27
L0:192.168.1.161/28
R6:1.1.1.0/24
L0:1.1.1.1/25
三、R1-R6各路由配置:
1.手动配置R1-R6各接口IP地址:
R1:
<R1>sys # 进入[]视图
[R1]int g0/0/0 # 进入g0/0/0接口
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30 # 配置g0/0/0接口IP
[R1-GigabitEthernet0/0/0]quit # 退出g0/0/0接口
[R1]int g0/0/1 # 进入g0/0/1接口
[R1-GigabitEthernet0/0/1]ip address 192.168.1.9 30 # 配置g0/0/1接口IP
[R1-GigabitEthernet0/0/1]quit
[R1]
[R1]interface LoopBack 0 # 配置R1环回L0口
[R1-LoopBack0]ip address 192.168.1.33 28 # 配置L0环回IP
[R1-LoopBack0]quit
[R1]interface LoopBack 1 # 配置R1环回L1口
[R1-LoopBack1]ip address 192.168.1.49 28 # 配置L1环回IP
[R1-LoopBack1]quit
查看R1IP是否配置成功:
[R1]display ip interface brief
R2:
<R2>sys.
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[R2-GigabitEthernet0/0/0]q
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[R2-GigabitEthernet0/0/1]q
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 192.168.1.65 28
[R2-LoopBack0]q
[R2]interface LoopBack 1
[R2-LoopBack1]ip address 192.168.1.81 28
[R2-LoopBack1]q
查看R2IP是否配置成功:
[R2]display ip interfice brief
R3:
<R3>sys
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[R3-GigabitEthernet0/0/0]q
[R3]int
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[R3-GigabitEthernet0/0/1]q
[R3]interface g2/0/0
[R3-GigabitEthernet2/0/0]ip address 192.168.1.97 27
[R3-GigabitEthernet2/0/0]q
查看R3IP是否配置成功:
[R3]display ip interfice brief
R4:
<R4>system-view
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[R4-GigabitEthernet0/0/0]q
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[R4-GigabitEthernet0/0/1]q
[R4]interface g1/0/0
[R4-GigabitEthernet1/0/0]ip address 192.168.1.17 30
[R4-GigabitEthernet1/0/0]q
[R4]interface g0/0/2
[R4-GigabitEthernet0/0/2]ip address 192.168.1.21 30.
[R4-GigabitEthernet0/0/2]q
[R4]interface LoopBack 0
[R4-LoopBack0]ip address 192.168.1.129 28
[R4-LoopBack0]q
[R4]interface LoopBack 1
[R4-LoopBack1]ip address 192.168.1.145 28
[R4-LoopBack1]q
[R4]
查看R4IP是否配置成功:
[R4]display ip interfice brief
R5:
<R5>sys
[R5]interface g0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.1.18 30
[R5-GigabitEthernet0/0/1]q
[R5]interface g0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.1.22 30
[R5-GigabitEthernet0/0/0]q
[R5]interface g1/0/0
[R5-GigabitEthernet1/0/0]ip address 12.0.0.1 24
[R5-GigabitEthernet1/0/0]q
[R5]interface LoopBack 0
[R5-LoopBack0]ip address 192.168.1.161 28
[R5-LoopBack0]q
[R5]
查看R5IP是否配置成功:
[R5]display ip interface brief
R6:
<R6>sys
[R6]interface g0/0/0
[R6-GigabitEthernet0/0/0]ip address 12.0.0.2 24
[R6-GigabitEthernet0/0/0]q
[R6]interface LoopBack 0
[R6-LoopBack0]ip address 1.1.1.1 25
[R6-LoopBack0]q
[R6]
查看R6IP是否配置成功:
[R6]display ip interface brief
2.手动配置R1-R6各网段静态路由:
R1各网段静态路由配置:
[R1]ip route-static 192.168.1.4 30 192.168.1.2
[R1]ip route-static 192.168.1.96 27 192.168.1.10
[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 12.0.0.0 24 192.168.1.2
[R1]ip route-static 12.0.0.0 24 192.168.1.10
[R1]ip route-static 192.168.1.12 30 192.168.1.10
[R1]ip route-static 192.168.1.16 30 192.168.1.2
[R1]ip route-static 192.168.1.16 30 192.168.1.10
[R1]ip route-static 192.168.1.64 27 192.168.1.2
查看R1静态路由配置信息:
[R1]display ip routing-table protocol static
R2各网段静态路由配置:
[R2]ip route-static 12.0.0.0 24 192.168.1.6
[R2]ip route-static 192.168.1.12 30 192.168.1.6
[R2]ip route-static 192.168.1.16 30 192.168.1.6
[R2]ip route-static 192.168.1.20 30 192.168.1.6
[R2]ip route-static 192.168.1.32 27 192.168.1.1
[R2]ip route-static 192.168.1.96 27 192.168.1.6
[R2]ip route-static 192.168.1.128 27 192.168.1.6
查看R2静态路由配置信息 :
[R2]display ip routing-table protocol static
R3各网段静态路由配置 :
[R3]ip route-static 12.0.0.0 24 192.168.1.14
[R3]ip route-static 192.168.1.4 30 192.168.1.14
[R3]ip route-static 192.168.1.16 30 192.168.1.14
[R3]ip route-static 192.168.1.20 30 192.168.1.14
[R3]ip route-static 192.168.1.32 27 192.168.1.9
[R3]ip route-static 192.168.1.64 27 192.168.1.14
[R3]ip route-static 192.168.1.128 27 192.168.1.14
查看R3静态路由配置信息 :
[R3]display ip routing-table protocol static
R4各网段静态路由配置 :
[R4]ip route-static 12.0.0.0 24 192.168.1.18
[R4]ip route-static 192.168.1.0 30 192.168.1.5
[R4]ip route-static 192.168.1.18 30 192.168.1.13
[R4]ip route-static 192.168.1.32 27 192.168.1.5
[R4]ip route-static 192.168.1.32 27 192.168.1.13
[R4]ip route-static 192.168.1.64 27 192.168.1.5
[R4]ip route-static 192.168.1.96 27 192.168.1.13
[R4]ip route-static 192.168.1.160 27 192.168.1.18
查看R4静态路由配置信息 :
[R4]display ip routing-table protocol static
R5各网段静态路由配置 :
[R5]ip route-static 1.1.1.0 24 12.0.0.2
[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.8 30 192.168.1.17
[R5]ip route-static 192.168.1.12 30 192.168.1.17
[R5]ip route-static 192.168.1.32 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.96 27 192.168.1.17
[R5]ip route-static 192.168.1.128 27 192.168.1.17
查看R5各网段路由信息:
[R5]display ip routing-table protocol static
3.配置缺省路由:
R1:
-
[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.10
-
R2:
[R2]ip route-static 0.0.0.0 0 192.168.1.6
R3:
[R3]ip route-static 0.0.0.0 0 192.168.1.14
R4:
[R4]ip route-static 0.0.0.0 0 192.168.1.18
R5:
[R5]ip route-static 0.0.0.0 0 12.0.0.2
4.避免环路出现,编写空接口:
R1:
[R1]ip route-static 192.168.1.32 27 NULL 0
[R3]ip route-static 192.168.1.96 27 NULL 0
R4:
[R4]ip route-static 192.168.1.128 27 NULL 0
[R5]ip route-static 192.168.1.160 27 NULL 0
网段:
R1 ping R6 1.1.1.1网段:
R2 ping R6 1.1.1.1 网段:
R3 ping R6 1.1.1.1 网段:R4 ping R6 1.1.1.1 网段:
R5 ping R6 1.1.1.1 网段:
同理R1、R2、R3、R4、R5 ping 各个网段都能通
6.配百兆口静态路由:
R1百兆口:
[R1]ip route-static 192.168.1.20 30 192.168.1.2
[R1]ip route-static 192.168.1.20 30 192.168.1.10
R2百兆口:
[R2]ip route-static 192.168.1.20 30 192.168.1.6
R3百兆口:
[R3]ip route-static 192.168.1.20 30 192.168.1.14
R4更改百兆口优先级:
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
R5:
[R5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.32 255.255.255.254 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61
display this:
[R5]acl 2000
[R5-acl-basic-2000]rule 10 permit source 192.168.1.0 0.0.255.255
[R5-acl-basic-2000]int g1/0/0
[R5-GigabitEthernet1/0/0]nat outbound 2000
7.配置DHCP服务器(R3),下发给主机IP:
[R3]dhcp enable
[R3]ip pool aa
[R3-ip-pool-aa]network 192.168.1.96 mask 27
[R3-ip-pool-aa]gateway-list 192.168.1.97
[R3-ip-pool-aa]dns-list 114.114.114.114
[R3-ip-pool-aa]int g2/0/0
[R3-GigabitEthernet2/0/0]dhcp select global
查看IP是否下发成功:
PC>ipconfig
pc1 :
pc1 ping通 1.1.1.1:
pc2:
pc2 ping 通 1.1.1.1:
R1:
R1:
[R1]aaa
[R1-aaa]local-user admin privilege level 15 password cipher 123456
[R1-aaa]local-user admin service-type telnet
[R1-aaa]q
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
R5:
[R5]interface g1/0/0
[R5-GigabitEthernet1/0/0]nat server protocol tcp global current-interface 23 ins
ide 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
[R5-GigabitEthernet1/0/0]
R6验证telnet:
<R6>telnet 12.0.0.2
Trying 12.0.0.2 ...
Press CTRL+K to abort
Connected to 12.0.0.2 ...
Login authentication
Username:admin
Password:
Info: The max number of VTY users is 10, and the number of current VTY users on line is 1.
The current login time is 2024-03-18 22:16:39.
<R1>
<R1>q
<R6>
二、HCIA复习思维导图
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/m0_75254642/article/details/136973803