• HCIP静态路由综合实验


    题目: 

    步骤:

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

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

    R1:

    1. [R1]display current-configuration int
    2. interface GigabitEthernet0/0/0
    3.  ip address 192.168.1.1 255.255.255.252 
    4. interface GigabitEthernet0/0/1
    5.  ip address 192.168.1.5 255.255.255.252 
    6. interface LoopBack0
    7.  ip address 192.168.1.33 255.255.255.240 
    8. interface LoopBack1
    9.  ip address 192.168.1.49 255.255.255.240 

    R2:

    1. [R2]display current-configuration interface
    2. interface GigabitEthernet0/0/0
    3. ip address 192.168.1.2 255.255.255.252
    4. #
    5. interface GigabitEthernet0/0/1
    6. ip address 192.168.1.9 255.255.255.252
    7. #
    8. interface NULL0
    9. #
    10. interface LoopBack0
    11. ip address 192.168.1.65 255.255.255.240
    12. #
    13. interface LoopBack1
    14. ip address 192.168.1.81 255.255.255.252

    R3:

    1. <R3>display current-configuration interface
    2. interface GigabitEthernet0/0/0
    3. ip address 192.168.1.6 255.255.255.252
    4. interface GigabitEthernet0/0/1
    5. ip address 192.168.1.13 255.255.255.252
    6. interface LoopBack0
    7. ip address 192.168.1.97 255.255.255.224

    R4:

    1. [R4]display current-configuration int
    2. interface GigabitEthernet0/0/0
    3. ip address 192.168.1.10 255.255.255.252
    4. interface GigabitEthernet0/0/1
    5. ip address 192.168.1.14 255.255.255.252
    6. interface GigabitEthernet2/0/0
    7. ip address 192.168.1.17 255.255.255.252
    8. interface GigabitEthernet2/0/2
    9. ip address 192.168.1.21 255.255.255.252
    10. interface LoopBack0
    11. ip address 192.168.1.129 255.255.255.240
    12. interface LoopBack1
    13. ip address 192.168.1.145 255.255.255.240

    R5:

    1. [R5]display current-configuration interface
    2. interface GigabitEthernet0/0/0
    3. ip address 192.168.1.18 255.255.255.252
    4. interface GigabitEthernet0/0/1
    5. ip address 12.0.0.1 255.255.255.0
    6. interface GigabitEthernet2/0/2
    7. ip address 192.168.1.22 255.255.255.252
    8. interface LoopBack0
    9. ip address 192.168.1.193 255.255.255.224

    R6:

    1. [R6-LoopBack0]display current-configuration interface
    2. interface GigabitEthernet0/0/0
    3. ip address 12.0.0.2 255.255.255.0
    4. interface LoopBack0
    5. ip address 1.0.0.1 255.255.255.0

    第三步:配置静态路由;

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

    R1:

    1. ip route-static 12.0.0.0 255.255.255.0 192.168.1.2
    2. ip route-static 12.0.0.0 255.255.255.0 192.168.1.6
    3. ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
    4. ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
    5. ip route-static 192.168.1.16 255.255.255.252 192.168.1.6
    6. ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
    7. ip route-static 192.168.1.20 255.255.255.252 192.168.1.6
    8. ip route-static 192.168.1.20 255.255.255.252 192.168.1.2
    9. ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
    10. ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
    11. ip route-static 192.168.1.128 255.255.255.224 192.168.1.2
    12. ip route-static 192.168.1.128 255.255.255.224 192.168.1.6
    13. ip route-static 192.168.1.192 255.255.255.224 192.168.1.2
    14. ip route-static 192.168.1.192 255.255.255.224 192.168.1.6
    15. ip route-static 0.0.0.0 0 192.168.1.2
    16. ip route-static 0.0.0.0 0 192.168.1.6

    R2:

    1. ip route-static 12.0.0.0 255.255.255.0 192.168.1.10
    2. ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
    3. ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
    4. ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
    5. ip route-static 192.168.1.20 255.255.255.252 192.168.1.10
    6. ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
    7. ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
    8. ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
    9. ip route-static 192.168.1.128 255.255.255.224 192.168.1.10
    10. ip route-static 192.168.1.192 255.255.255.224 192.168.1.10
    11. ip route-static 0.0.0.0 0 192.168.1.10

    R3:

    1. ip route-static 12.0.0.0 255.255.255.0 192.168.1.14
    2. ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
    3. ip route-static 192.168.1.8 255.255.255.252 192.168.1.14
    4. ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
    5. ip route-static 192.168.1.20 255.255.255.252 192.168.1.14
    6. ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
    7. ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
    8. ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
    9. ip route-static 192.168.1.128 255.255.255.224 192.168.1.14
    10. ip route-static 192.168.1.192 255.255.255.224 192.168.1.14
    11. ip route-static 0.0.0.0 0 192.168.1.14

    R4:

    1. ip route-static 12.0.0.0 255.255.255.0 192.168.1.18
    2. ip route-static 12.0.0.0 255.255.255.0 192.168.1.22
    3. ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
    4. ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
    5. ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
    6. ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
    7. ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
    8. ip route-static 192.168.1.96 255.255.255.224 192.168.1.13
    9. ip route-static 192.168.1.128 255.255.255.224 192.168.1.18
    10. ip route-static 192.168.1.128 255.255.255.224 192.168.1.22
    11. ip route-static 0.0.0.0 0 192.168.1.18
    12. ip route-static 0.0.0.0 0 192.168.1.22

    R5:

    1. ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
    2. ip route-static 192.168.1.0 255.255.255.252 192.168.1.21
    3. ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
    4. ip route-static 192.168.1.4 255.255.255.252 192.168.1.21
    5. ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
    6. ip route-static 192.168.1.8 255.255.255.252 192.168.1.21
    7. ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
    8. ip route-static 192.168.1.12 255.255.255.252 192.168.1.21
    9. ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
    10. ip route-static 192.168.1.32 255.255.255.224 192.168.1.21
    11. ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
    12. ip route-static 192.168.1.64 255.255.255.224 192.168.1.21
    13. ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
    14. ip route-static 192.168.1.96 255.255.255.224 192.168.1.21
    15. ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
    16. 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         对应接口激活全局池塘的配置

    检测:

    第五步:在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

  • 相关阅读:
    QImage相关
    聊一聊装饰者模式
    swagger-02-配置swagger
    ROS参数名称设置
    [Java反序列化]jdk原生链分析
    [ 云计算 华为云 ] 华为云开天 aPaaS:构建高效的企业数字化平台(下)
    什么品牌的台灯护眼比较好?推荐护眼效果好的护眼灯品牌
    java基于springboot+vue驾校预约网站管理系统
    [含lw+源码等]计算机毕业论文Java项目源码下载微信小程序记事本+后台管理系统[包运行成功]
    数组去重
  • 原文地址:https://blog.csdn.net/2302_77035737/article/details/133864934