IS-IS与静态BFD联动示例

组网需求

  1. 网络中有三台路由器通过IS-IS协议实现互联互通
  2. Router A与Router B之间通过二层交换实现互联
  3. 要求当Router A与Router B之间路由器故障能够对故障结果做出反应,重新建立邻居

网络拓扑

IS-IS与静态BFD联动网络拓扑

配置思路

  1. 配置路由器基本功能以及IP地址
  2. 配置IS-IS协议以及接口使能IS-IS协议
  3. 配置静态BFD
  4. 配置IS-IS协议与BFD联动

配置命令

  1. 配置路由器基本功能以及IP地址

    • Router A配置

      1
      2
      3
      4
      sys
      sys Router A
      int g0/0/0
      ip add 100.1.1.1 30
  • Router B配置

    1
    2
    3
    4
    5
    6
    sys
    sys Router B
    int g0/0/0
    ip add 100.1.1.2 30
    int g0/0/1
    ip add 100.2.1.1 30
  • Router C配置

    1
    2
    3
    4
    sys
    sys Router C
    int g0/0/1
    ip add 100.2.1.2 30
  1. 配置IS-IS协议以及接口使能IS-IS协议

    • Router A配置

      1
      2
      3
      4
      5
      6
      7
      sys
      isis 1
      is-level level-2
      network-entity 86.0010.1000.0100.1001.00
      int g0/0/0
      isis enable 1
      isis small-hello
  • Router B配置

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    sys
    isis 1
    is-level level-2
    network-entity 86.0010.1000.0100.1002.00
    int g0/0/0
    isis enable 1
    isis small-hello
    int g0/0/1
    isis enable 1
    isis small-hello
  • Router C配置

    1
    2
    3
    4
    5
    6
    7
    sys
    isis 1
    is-level level-2
    network-entity 86.0010.1000.0200.1002.00
    int g0/0/1
    isis enable 1
    isis small-hello
  1. 配置静态BFD

    • Router A配置

      1
      2
      3
      4
      5
      6
      7
      8
      sys
      bfd
      q
      bfd A-to-B bind peer-ip 100.1.1.2 int g0/0/0
      discriminator local 1
      discriminator remote 2
      commit
      q
  • Router B配置

    1
    2
    3
    4
    5
    6
    7
    8
    sys
    bfd
    q
    bfd B-to-A bind peer-ip 100.1.1.1 int g0/0/0
    discriminator local 2
    discriminator remote 1
    commit
    q
  1. 配置IS-IS接口使能BFD

    • Router A配置

      1
      2
      3
      sys
      int g0/0/0
      isis bfd static
  • Router B配置

    1
    2
    3
    sys
    int g0/0/0
    isis bfd static

测试结果

  1. 查看命令

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    # 查看IS-IS邻居
    dis isis peer
    <Router A>dis isis peer

    Peer information for ISIS(1)

    System Id Interface Circuit Id State HoldTime Type PRI
    -------------------------------------------------------------------------------
    1000.0100.1002 GE0/0/0 1000.0100.1001.01 Up 20s L2 64

    Total Peer(s): 1


    # 查看IS-IS路由
    dis isis route
    <Router A>dis isis route

    Route information for ISIS(1)
    -----------------------------

    ISIS(1) Level-2 Forwarding Table
    --------------------------------

    IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
    -------------------------------------------------------------------------------
    100.1.1.0/30 10 NULL GE0/0/0 Direct D/-/L/-
    100.2.1.0/30 20 NULL GE0/0/0 100.1.1.2 A/-/-/-
    Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
    U-Up/Down Bit Set

    #查看BFD会话状态
    dis bfd session all
    <Router A>dis bfd session all
    --------------------------------------------------------------------------------
    Local Remote PeerIpAddr State Type InterfaceName
    --------------------------------------------------------------------------------

    1 2 100.1.1.2 Up S_IP_IF GigabitEthernet0/0/0
    --------------------------------------------------------------------------------
    Total UP/DOWN Session Number : 1/0
  1. 打开终端日志信息功能

    1
    2
    3
    terminal logging

    terminal monitor
  1. 测试

    • Router B端口down掉

      1
      2
      3
      sys
      int g0/0/0
      shutdown
  • Router A日志信息和BFD状态以及IS-IS邻居状态

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    # 日志信息
    <Router A>
    Mar 2 2022 11:25:10-08:00 Router A %%01BFD/4/STACHG_TODWN(l)[0]:BFD session cha
    nged to Down. (SlotNumber=0, Discriminator=16777216, Diagnostic=DetectDown, Appl
    ications=None, ProcessPST=False, BindInterfaceName=GigabitEthernet0/0/0, Interfa
    cePhysicalState=Up, InterfaceProtocolState=Up)
    <Router A>
    Mar 2 2022 11:25:10-08:00 Router A %%01ISIS/4/PEER_DOWN_BFDDOWN(l)[1]:ISIS 256
    neighbor 1000.0100.1002 was Down on interface GE0/0/0 because the BFD node was d
    own. The Hello packet was received at 11:18:26 last time; the maximum interval f
    or sending Hello packets was 270991360; the local router sent 4127719424 Hello p
    ackets and received 83886080 packets; the type of the Hello packet was Lan Level
    -2.
    <Router A>
    Mar 2 2022 11:25:10-08:00 Router A %%01ISIS/4/ADJ_CHANGE_LEVEL(l)[2]:The neighb
    or of ISIS was changed. (IsisProcessId=256, Neighbor=1000.0100.1002, InterfaceNa
    me=GE0/0/0, CurrentState=up, ChangeType=L2_BFD_DOWN, Level=Level-2)
    <Router A>
    Mar 2 2022 11:25:10-08:00 Router A %%01ISIS/4/ADJ_CHANGE_LEVEL(l)[3]:The neighb
    or of ISIS was changed. (IsisProcessId=256, Neighbor=1000.0100.1002, InterfaceNa
    me=GE0/0/0, CurrentState=down, ChangeType=L2_HOLDTIMER_EXPIRED, Level=Level-2)

    # BFD会话状态
    <Router A>dis bfd session all
    --------------------------------------------------------------------------------
    Local Remote PeerIpAddr State Type InterfaceName
    --------------------------------------------------------------------------------

    1 2 100.1.1.2 Down S_IP_IF GigabitEthernet0/0/0
    --------------------------------------------------------------------------------
    Total UP/DOWN Session Number : 0/1

    # IS-IS邻居
    dis isis peer

    #dis isis route
    <Router A>dis isis route

    Route information for ISIS(1)
    -----------------------------

    ISIS(1) Level-2 Forwarding Table
    --------------------------------

    IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
    -------------------------------------------------------------------------------
    100.1.1.0/30 10 NULL GE0/0/0 Direct D/-/L/-
    Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
    U-Up/Down Bit Set
吴超 wechat
subscribe to my blog by scanning my public wechat account