hcia静态路由综合实验

(一)实验要求
(二)实验拓扑
(三)子网划分
(四)实验配置
(五)实验结果测试

(一)实验要求:

hcia静态路由综合实验_第1张图片
①R6为ISP,接口IP地址为公有地址;该设备只能配IP地址,之后不能在对其进行任何配置;
②R1-R5为局域网,私有IP地址192.168.1.0/24请合理分配;
③所有的路由器上均有换回,代表用户接口;
④R3下的两台PC通过DHCP自动获取IP地址;
⑤选路最佳,路由表尽量小,避免环路;
⑥R1-R5均可访问R6的环回;
⑦R6 telnet R5的公有IP地址时,实际登录到R1上;
⑧R4与R5正常通过千兆链路,故障时,通过百兆链路。

(二)实验拓扑:

hcia静态路由综合实验_第2张图片

(三)子网划分:

由实验要求图可知R1、R2、R4均需两个网段代表换回,R5需要一个网段代表换回,一共7个网段,同时为了路由表尽量少,我们把连线表示出来的网段放在一个网段的下面,因此只需将192.168.1.0/24分为8个网段,子网掩码向后借三个单位:
192.168.1.0/27(主网段)
192.168.1.32/27(R1环回)
192.168.1.64/27(R1环回)
192.168.1.96/27(R2环回)
192.168.1.128/27(R2环回)
192.168.1.160/27(R4环回)
192.168.1.192/27(R4环回)
192.168.1…224/27(用于R3dhcp使用)
其中192.168.1.0/27作为连线网段的主网段,而子网段需要7个网段,对其进行子网划分:
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.28/30(保留)

(四)实验配置:

第一步先配置所有IP地址:
【R1】:
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[R1]int LoopBack 0
[R1-LoopBack0]ip address 192.168.1.33 27
[R1]int LoopBack 1
[R1-LoopBack1]ip address 192.168.1.65 27
【R2】:
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.9 30
[R2-GigabitEthernet0/0/0]int g0/0/01
[R2-GigabitEthernet0/0/1]ip address 192.168.1.2 30
[R2]int LoopBack 0
[R2-LoopBack0]ip address 192.168.1.97 27
[R2]int LoopBack 1
[R2-LoopBack1]ip address 192.168.1.129 27
【R3】:
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]ip address 192.168.1.225 27
R3的dhcp配置:
[R3]ip pool 1
[R3-ip-pool-1]network 192.168.1.224 mask 27
[R3-ip-pool-1]gateway-list 192.168.1.225
[R3-ip-pool-1]dns-list 8.8.8.8 8.8.4.4
[R3-ip-pool-1]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
PC1和PC2:
hcia静态路由综合实验_第3张图片hcia静态路由综合实验_第4张图片
【R4】:
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.10 30
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip address 192.168.1.14 30
[R4-GigabitEthernet0/0/2]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.1.21 30
[R4]int e4/0/0
[R4-Ethernet4/0/0]ip address 192.168.1.17 30
[R4]int LoopBack 0
[R4-LoopBack0]ip address 192.168.1.161 27
[R4-LoopBack0]int lo 1
[R4-LoopBack1]ip address 192.168.1.193 27
【R5】:
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.1.22 30
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip address 56.1.1.1 24
[R5]int e4/0/0
[R5-Ethernet4/0/0]ip address 192.168.1.18 30
[R5]int LoopBack 0
[R5-LoopBack0]ip address 5.5.5.5 24
【R6】:
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip address 56.1.1.2 24
[R6-GigabitEthernet0/0/0]int lo 0
[R6-LoopBack0]ip address 6.6.6.6 24
第二步配置静态路由和缺省:
【R1】:
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2//缺省走上
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.6//缺省走下
[R1]ip route-static 192.168.1.96 27 192.168.1.2//R2环回走上
[R1]ip route-static 192.168.1.128 27 192.168.1.2// R2环回走上
[R1]ip route-static 192.168.1.160 27 192.168.1.2//R4环回走上,负载分担
[R1]ip route-static 192.168.1.8 30 192.168.1.2//R2-R4网段走上
[R1]ip route-static 192.168.1.12 30 192.168.1.6//R3-R4网段走下
[R1]ip route-static 192.168.1.192 27 192.168.1.6//R4环回走下,负载分担
[R1]ip route-static 192.168.1.224 27 192.168.1.6//R3下面的网段走下
[R1]ip route-static 192.168.1.32 27 NULL 0//R1的环回空接口闭环
[R1]ip route-static 192.168.1.64 27 NULL 0//R1的环回空接口闭环
【R2】:
[R2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.10//缺省走右
[R2]ip route-static 192.168.1.32 27 192.168.1.1// R1环回走左
[R2]ip route-static 192.168.1.64 27 192.168.1.1// R1环回走左
[R2]ip route-static 192.168.1.4 30 192.168.1.1//R1-R3网段走左
[R2]ip route-static 192.168.1.224 27 192.168.1.1//到R3下面的网段负载均衡
[R2]ip route-static 192.168.1.224 27 192.168.1.10//到R3下面的网段负载均衡
[R2]ip route-static 192.168.1.96 27 NULL 0//R1的环回空接口闭环
[R2]ip route-static 192.168.1.128 27 NULL 0//R1的环回空接口闭环
【R3】:
[R3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.14//缺省走右
[R3]ip route-static 192.168.1.32 27 192.168.1.5//R1环回走左
[R3]ip route-static 192.168.1.64 27 192.168.1.5// R1环回走左
[R3]ip route-static 192.168.1.0 30 192.168.1.5//R1-R2网段走左
[R3]ip route-static 192.168.1.96 27 192.168.1.5//R2的环回走左,负载分担
[R3]ip route-static 192.168.1.128 27 192.168.1.14//R2的环回走右,负载分担
【R4】:
[R4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.22//缺省走千兆线右
[R4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.18 preference 61//备份缺省走百兆线右
[R4]ip route-static 192.168.1.96 27 192.168.1.9//R2的环回走上
[R4]ip route-static 192.168.1.128 27 192.168.1.9//R2的环回走上
[R4]ip route-static 192.168.1.0 30 192.168.1.9//R1-R2网段走上
[R4]ip route-static 192.168.1.32 27 192.168.1.9//R1的环回走上,负载分担
[R4]ip route-static 192.168.1.64 27 192.168.1.13//R1的环回走下,负载分担
[R4]ip route-static 192.168.1.4 30 192.168.1.13//R1-R3网段走下
[R4]ip route-static 192.168.1.224 27 192.168.1.13//R3下面的网段走下
[R4]ip route-static 192.168.1.160 27 NULL 0//R4环回空接口闭环
[R4]ip route-static 192.168.1.192 27 NULL 0// R4环回空接口闭环
[R4]ip route-static 192.168.1.24 30 NULL 0//保留地址空接口闭环
[R4]ip route-static 192.168.1.28 30 NULL 0//保留地址空接口闭环
【R5】:
[R5]ip route-static 0.0.0.0 0.0.0.0 56.1.1.2//缺省走右
[R5]ip route-static 192.168.1.0 24 192.168.1.21//到局域网走左千兆线
[R5]ip route-static 192.168.1.0 24 192.168.1.17 preference 61//备份到局域网走左百兆线
R1开启telnet:
[R1]aaa
[R1-aaa]local-user root privilege level 15 password cipher root
Info: Add a new user.
[R1-aaa]local-user root service-type telnet
[R1-aaa]q
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
第三步R5配置NAT以及端口映射:
配置NAT:
[R5]acl 2000
[R5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R5-acl-basic-2000]int g0/0/1
[R5-GigabitEthernet0/0/1]nat outbound 2000
端口映射:
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23(协议号) ins
ide 192.168.1.33 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

(五)实验结果测试:

hcia静态路由综合实验_第5张图片hcia静态路由综合实验_第6张图片hcia静态路由综合实验_第7张图片
hcia静态路由综合实验_第8张图片hcia静态路由综合实验_第9张图片hcia静态路由综合实验_第10张图片hcia静态路由综合实验_第11张图片

你可能感兴趣的:(网络实验,网络通信)