HCIP静态路由综合实验

题目: 

HCIP静态路由综合实验_第1张图片

步骤:

第一步:搭建上图所示拓扑;

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

 第二步:为路由器接口配置IP地址;

R1:

[R1]display current-configuration int

interface GigabitEthernet0/0/0
 ip address 192.168.1.1 255.255.255.252 
interface GigabitEthernet0/0/1
 ip address 192.168.1.5 255.255.255.252 
interface LoopBack0
 ip address 192.168.1.33 255.255.255.240 
interface LoopBack1
 ip address 192.168.1.49 255.255.255.240 

R2:

[R2]display current-configuration interface
interface GigabitEthernet0/0/0
 ip address 192.168.1.2 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.9 255.255.255.252 
#
interface NULL0
#
interface LoopBack0
 ip address 192.168.1.65 255.255.255.240 
#
interface LoopBack1
 ip address 192.168.1.81 255.255.255.252 

R3:

display  current-configuration interface 
interface GigabitEthernet0/0/0
 ip address 192.168.1.6 255.255.255.252 
interface GigabitEthernet0/0/1
 ip address 192.168.1.13 255.255.255.252 
interface LoopBack0
 ip address 192.168.1.97 255.255.255.224

R4:

[R4]display  current-configuration int  
interface GigabitEthernet0/0/0
 ip address 192.168.1.10 255.255.255.252 
interface GigabitEthernet0/0/1
 ip address 192.168.1.14 255.255.255.252 
interface GigabitEthernet2/0/0
 ip address 192.168.1.17 255.255.255.252 
interface GigabitEthernet2/0/2
 ip address 192.168.1.21 255.255.255.252 
interface LoopBack0
 ip address 192.168.1.129 255.255.255.240 
interface LoopBack1
 ip address 192.168.1.145 255.255.255.240 

R5:

[R5]display current-configuration interface 

interface GigabitEthernet0/0/0
 ip address 192.168.1.18 255.255.255.252 
interface GigabitEthernet0/0/1
 ip address 12.0.0.1 255.255.255.0 
interface GigabitEthernet2/0/2
 ip address 192.168.1.22 255.255.255.252 
interface LoopBack0
 ip address 192.168.1.193 255.255.255.224 

R6:

[R6-LoopBack0]display current-configuration interface

interface GigabitEthernet0/0/0
 ip address 12.0.0.2 255.255.255.0 
interface LoopBack0
 ip address 1.0.0.1 255.255.255.0 

第三步:配置静态路由;

配置完成后输入:[R1]display ip routing-table protocol static  进行查看已经配置的静态路由

R1:

ip route-static 12.0.0.0 255.255.255.0 192.168.1.2
ip route-static 12.0.0.0 255.255.255.0 192.168.1.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.20 255.255.255.252 192.168.1.6
ip route-static 192.168.1.20 255.255.255.252 192.168.1.2
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.2
ip route-static 192.168.1.128 255.255.255.224 192.168.1.6
ip route-static 192.168.1.192 255.255.255.224 192.168.1.2
ip route-static 192.168.1.192 255.255.255.224 192.168.1.6
ip route-static 0.0.0.0 0 192.168.1.2
ip route-static 0.0.0.0 0 192.168.1.6

R2:

ip route-static 12.0.0.0 255.255.255.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
ip route-static 192.168.1.20 255.255.255.252 192.168.1.10
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.128 255.255.255.224 192.168.1.10
ip route-static 192.168.1.192 255.255.255.224 192.168.1.10
ip route-static 0.0.0.0 0 192.168.1.10

R3:

ip route-static 12.0.0.0 255.255.255.0 192.168.1.14
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.8 255.255.255.252 192.168.1.14
ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
ip route-static 192.168.1.20 255.255.255.252 192.168.1.14
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
ip route-static 192.168.1.128 255.255.255.224 192.168.1.14
ip route-static 192.168.1.192 255.255.255.224 192.168.1.14
ip route-static 0.0.0.0 0 192.168.1.14

R4:

ip route-static 12.0.0.0 255.255.255.0 192.168.1.18
ip route-static 12.0.0.0 255.255.255.0 192.168.1.22
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 192.168.1.13
ip route-static 192.168.1.128 255.255.255.224 192.168.1.18
ip route-static 192.168.1.128 255.255.255.224 192.168.1.22
ip route-static 0.0.0.0 0 192.168.1.18
ip route-static 0.0.0.0 0 192.168.1.22

R5:

ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
ip route-static 192.168.1.0 255.255.255.252 192.168.1.21
ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21
ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
ip route-static 192.168.1.128 255.255.255.224 192.168.1.21

第四步:给R3配置DHCP服务

[R1]dhcp enable  启动DHCP服务

[R3]ip pool aaa (池塘名字例如aaa)  创建名为aaa的DHCP池塘,
[R3-ip-pool-aaa]network 192.168.1.96 mask 27        绑定接口,可分配地址范围
[R3-ip-pool-aaa]gateway-list 192.168.1.97        下发网关
[R3-ip-pool-aaa]dns-list 114.114.114.114 8.8.8.8        下发DNS服务器信息
[R3-GigabitEthernet2/0/0]dhcp select global         对应接口激活全局池塘的配置

检测:

HCIP静态路由综合实验_第3张图片

HCIP静态路由综合实验_第4张图片

第五步:在R5上配置NAT

[R5]acl 2000                
[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                接口调用NAT

第六步:完成空接口防环

[R1]ip route-static 192.168.1.32 27 NULL 0

[R2]ip route-static 192.168.1.64 27 NULL 0

[R3]ip route-static 192.168.1.64 27 NULL 0

[R4]ip route-static 192.168.1.128 27 NULL 0

第七步:完成远程登陆协议

[R1]telnet server enable  开启远程登录服务
 Error: TELNET server has been enabled
[R1]aaa    
[R1-aaa]local-user  huawei password  cipher 123456 privilege  level 15
[R1-aaa]local-user huawei service-type telnet 
[R1-aaa]q
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]quit 

开启端口映射:

[R5]int g0/0/1

[R5-GigabitEthernet0/0/1]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

第八步:浮动路由

ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference  61
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference  61
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference  61
ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference  61
目的完成千兆百兆路径选择!

扩展:查看从该设备到设有该IP的设备的跳数。

        [R1]tracert 192.168.161

HCIP静态路由综合实验_第5张图片

HCIP静态路由综合实验_第6张图片

你可能感兴趣的:(网络)