zoukankan      html  css  js  c++  java
  • 默认路由

    默认路由—匹配的是所有网段

    当路由器在路由表中找不到目标网络的路由条目时,路由器把请求转发到默认路由接口

    在末梢网络(该路由器后面没有在接其他路由器)时可以使用默认路由

    默认路由是静态路由的一种特殊形式,它属于静态路由中的一种,使用它是有条件的,只能在末梢网络中使用

     

     

    例题:

    R1:

    <Huawei>undo terminal monitor

    Info: Current terminal monitor is off.

    <Huawei>system-view

    Enter system view, return user view with Ctrl+Z.

    [Huawei]sysname R1

    [R1]user-interface console 0

    [R1-ui-console0]idle-timeout 0 0

    [R1-ui-console0]quit

    [R1]int g0/0/0

    [R1-GigabitEthernet0/0/0]ip add 10.1.1.1 24

    [R1-GigabitEthernet0/0/0]undo shut

    Info: Interface GigabitEthernet0/0/0 is not shutdown.

    [R1-GigabitEthernet0/0/0]int loop 0

    [R1-LoopBack0]ip add 1.1.1.1 32

    [R1-LoopBack0]quit

    [R1]ip route-static 0.0.0.0 0.0.0.0 10.1.1.2

    4个0代表所有网段,后4个0代表子网掩码,10.1.1.2代表下一跳的接口

     

     

    R2:

     

    <Huawei>undo terminal monitor

     

    Info: Current terminal monitor is off.

     

    <Huawei>system-view

     

    Enter system view, return user view with Ctrl+Z.

     

    [Huawei]sysname R2

     

    [R2]user-interface console 0

     

    [R2-ui-console0]idle-timeout 0 0

     

    [R2-ui-console0]quit

     

    [R2]int g0/0/0

     

    [R2-GigabitEthernet0/0/0]ip add 10.1.1.2 24

     

    [R2-GigabitEthernet0/0/0]undo shut

     

    Info: Interface GigabitEthernet0/0/0 is not shutdown.

     

    [R2-GigabitEthernet0/0/0]int g0/0/1

     

    [R2-GigabitEthernet0/0/1]ip add 10.1.2.2 24

     

    [R2-GigabitEthernet0/0/1]undo shut

     

    Info: Interface GigabitEthernet0/0/1 is not shutdown.

     

    [R2-GigabitEthernet0/0/1]int loop 0

     

    [R2-LoopBack0]ip add 2.2.2.2 32

     

    [R2-LoopBack0]quit

     

    R3:

    <Huawei>undo terminal monitor

    Info: Current terminal monitor is off.

    <Huawei>system-view

    Enter system view, return user view with Ctrl+Z.

    [Huawei]sysname R3

    [R3]user-interface console 0

    [R3-ui-console0]idle-timeout 0 0

    [R3-ui-console0]quit

    [R3]int g0/0/0

    [R3-GigabitEthernet0/0/0]ip add 10.1.2.3 24

    [R3-GigabitEthernet0/0/0]undo shut

    Info: Interface GigabitEthernet0/0/0 is not shutdown.

    [R3-GigabitEthernet0/0/0]int loop 0

    [R3-LoopBack0]ip add 3.3.3.3 32

    [R3-LoopBack0]quit

    [R3]ip route-static 0.0.0.0 0.0.0.0 10.1.2.2

     

     

     

  • 相关阅读:
    2020.02.28 【ABAP随笔】- EXCEL批导程式3
    2020.02.27 【ABAP随笔】- EXCEL批导程式2
    2020.02.26 【ABAP随笔】- EXCEL批导程式1
    2020.02.24 【ABAP随笔】- EXCEL常见操作笔记 1
    2020.02.15 【ABAP随笔】- 物料主数据增强
    2020.01.14 【ABAP随笔】-程序优化笔记
    2020.01.11 【ABAP随笔】获取标准报表数据(MB52)数据进行客制ALV
    2020.01.11 【ABAP随笔】SM30常见增强操作-自动带描述等
    2020.01.10 【ABAP随笔】ALV上的下拉框
    Linux资源监控命令/工具(调试)
  • 原文地址:https://www.cnblogs.com/Xing88/p/13430638.html
Copyright © 2011-2022 走看看