メインコンテンツへスキップ
  1. ネットワーク 記事一覧/
  2. IS-IS記事一覧/

IS-ISの認証(hello-password / lsp-password)

目次

IS-ISの認証(hello-password / lsp-password)

IS-ISの認証は隣接を守るものリンクステートデータベースを守るものの2種類に分かれ、設定する場所も守るPDUも別です。片方だけ入れても、もう片方は保護されません。失敗時の症状も正反対で、前者は隣接が上がらず、後者は隣接が上がったまま経路だけが来ません

この記事では規格が定める仕組みを確認し、2種類のパスワードが何を守るのかをIOS XRの実機とキャプチャーで確かめます。

規格が定めるのは平文パスワードだけ

ISO/IEC 10589:2002は6.6.1(設計目標)で、自らの認証をこう位置づけています。

この国際規格がサポートする仕組みはパスワードによる弱い形式の認証だけで、偶発的な設定ミスへの保護には有効だが、深刻なセキュリティ上の脅威への保護にはならない。

認証情報はTLV 10(CODE — 10LENGTH — 1〜254オクテット)で運びます。VALUEの先頭1オクテットがAuthentication Typeで、規格が定める値は1 = Cleartext Password(平文)と255(ドメイン私用)だけ、0と2〜254はRESERVEDです。このTLVは9.5〜9.13の全PDU(LAN IIH、P2P IIH、LSP、CSNP、PSNPのレベル1 / 2すべて)に同じ定義で置かれています。

受信時の扱いは、LSPとSNPが7.3.15、IIHが8.2.5と8.4.2に規定されています。Authentication Informationが無いか値が合わないPDUは破棄し、authenticationFailureイベントを生成する。破棄するだけで、相手には通知しません。

認証には3つのスコープがある

パスワードを保持する管理パラメータは3組あります。送信用が1つ、受信用は集合です。

管理パラメータ守るPDUIOS XRの設定
circuitTransmitPassword / circuitReceivePasswordsIIH(15 / 16 / 17)hello-password(インタフェース配下)
areaTransmitPassword / areaReceivePasswordsレベル1のLSPとSNP(18 / 24 / 26)lsp-password level 1
domainTransmitPassword / domainReceivePasswordsレベル2のLSPとSNP(19 / 25 / 27)lsp-password level 2

回線用は回線ごと、エリア用とドメイン用はルータ全体で1つです。受信用が集合なのは、入れ替え時に新旧両方を受け入れるためで、IOS XRではキーチェーンで実現します。

検査するのは「パスワードを設定した側」だけ

見落としやすいのは、受信側の検査が条件付きだという点です。7.3.15.1の書き出しはこうです。

レベル1のLSPであり、かつareaTransmitPasswordまたはareaReceivePasswordsが非nullなら、以下の検査を行う。

受信側にパスワードが無ければ検査は行われず、認証情報の有無にかかわらず受理されます。IIHもSNPも同じ条件付きです。したがって片側にだけ設定した状態では、壊れる向きは片方だけです。設定した側は相手のPDUを捨て、設定していない側は相手のPDUを受け入れます。

RFC 5304:HMAC-MD5(Type 54)

平文はキャプチャーすれば読めます。RFC 5304はこれをHMAC-MD5Authentication Type 54)に置き換えました。RFC 3567を廃止し、RFC 1195を更新しています。要点は2つです。

  • LSPはChecksumとRemaining Lifetimeを0にして計算する。中継のたびに変わるフィールドを含めると、中継先でダイジェストが合わなくなるためです
  • SNPはLSPと同じパスワードを使う。レベル1はエリア用、レベル2はドメイン用で、SNP専用のものはありません

同RFCのSecurity Considerationsはリプレイ攻撃は防げないと明記しています。内容が変わらないIIHは毎回同じダイジェストになります。

RFC 5310:HMAC-SHAへの一般化(Type 3)

MD5の強度に懸念が出たため、RFC 5310がアルゴリズムを差し替えられる形式を定義しました。Authentication Type3、値はKey ID(2オクテット)+ Authentication Dataで、HMAC-SHA-1 / 224 / 256 / 384 / 512が使えます。Key IDがアルゴリズムと鍵の組を指すので、鍵の入れ替えが容易になります。

3も54も、ISOがRESERVEDとしている2〜254からIETFが割り当てた値です。

パスワードが合わないとどうなるか

hello-passwordが合わなければ隣接が成立せずlsp-passwordが合わなければ隣接はUpのまま相手のLSPだけが入りません。どちらも経路は流れませんが、show isis neighborsの見え方が正反対です。隣接が上がっているのに経路が来ないならlsp-passwordを疑います。受信側は黙って捨てるだけなので、送信側のログには何も出ません。

IOS XRでの設定

hello-passwordはインタフェース配下、lsp-passwordrouter isis配下です。選択肢は共通です。

lsp-password と hello-password の選択肢(IOS XR 26.1.1)
RP/0/RP0/CPU0:R1(config)#router isis 1
RP/0/RP0/CPU0:R1(config-isis)# lsp-password ?
  WORD       The unencrypted (clear text) LSP/SNP password
  accept     Use password for incoming authentication only
  clear      Specifies an unencrypted password will follow
  encrypted  Specifies an encrypted password will follow
  hmac-md5   Use HMAC-MD5 authentication
  keychain   Specifies a Key Chain name will follow
  text       Use cleartext password authentication
RP/0/RP0/CPU0:R1(config-isis)# lsp-password 
% Incomplete command.
RP/0/RP0/CPU0:R1(config-isis)# interface GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:R1(config-isis-if)#  hello-password ?
  WORD       The unencrypted (clear text) hello password
  accept     Use password for incoming authentication only
  clear      Specifies an unencrypted password will follow
  encrypted  Specifies an encrypted password will follow
  hmac-md5   Use HMAC-MD5 authentication
  keychain   Specifies a Key Chain name will follow
  text       Use cleartext password authentication
RP/0/RP0/CPU0:R1(config-isis-if)#  hello-password 
% Incomplete command.
RP/0/RP0/CPU0:R1(config-isis-if)#commit
Wed Sep  9 11:18:08.871 UTC
RP/0/RP0/CPU0:R1(config-isis-if)#end

textが平文(Type 1)、hmac-md5がHMAC-MD5(Type 54)です。clearで入力した文字列はrunning-configにencryptedで保存されます。パスワードの後には次を続けられます。

オプションlsp-passwordhello-password
levelレベルを片方に限定同左
send-only送信にだけ付け、受信は検査しない同左
snpSNPの認証モードを個別指定
enable-poiTLV 13(RFC 6232)を有効化

実機での検証

検証環境

R1 — R2 — R3を直列にし、R2のcircuit-typeR1—R2はレベル1だけ、R2—R3はレベル2だけを通します。エリア用とドメイン用のパスワードを1つのラボで別々に確かめるためです。

ルータNETis-typeリンク
R149.0001.0010.0100.1001.00level-1Gi0/0/0/0 10.1.2.1
R249.0001.0020.0200.2002.00level-1-2Gi0/0/0/0 10.1.2.2(circuit-type level-1)/ Gi0/0/0/1 10.2.3.2(circuit-type level-2-only
R349.0002.0030.0300.3003.00level-2-onlyGi0/0/0/0 10.2.3.3

検証のSTEP

STEP操作狙い
0認証なし(既定)TLV 10が無いことの確認
1R1—R2の両側にhello-password text平文パスワードがそのまま読めること
2両側をhello-password hmac-md5Typeが54に変わること
3R1側だけ別のパスワードに隣接が落ちること
4R1を戻し、R1・R2にだけlsp-password隣接は残りLSDBだけ壊れること、壊れる向きが片方だけなこと
5R3にもlsp-password同期が戻ること
6すべて削除(最終状態)STEP 0と同じ

認証なしの状態(STEP 0)

レベル1とレベル2の隣接が1つずつ上がっています。この時点のIIHにTLV 10は無く、キャプチャーisis-auth-hello-text.pcapNo.29までがこの状態です。

STEP 0:R2の show isis neighbors
RP/0/RP0/CPU0:R2#show isis neighbors
Wed Sep  9 11:17:29.419 UTC

IS-IS 1 neighbors:
System Id      Interface        SNPA           State Holdtime Type IETF-NSF
R1             Gi0/0/0/0        *PtoP*         Up    29       L1   Capable 
R3             Gi0/0/0/1        *PtoP*         Up    20       L2   Capable 

Total neighbor count: 2

平文パスワードを入れる(STEP 1)

R1とR2の両方に入れます。片側だけでは隣接が落ちるので続けて投入します。

STEP 1:R1とR2の両方に投入した設定
router isis 1
 interface GigabitEthernet0/0/0/0
  hello-password text clear ISISHELLO

No.30が投入直後にR2が送ったIIHです。直前のNo.29との違いはTLV 10だけです。

STEP 1の状態でR2が送ったIIH(No.30)
$ tshark -r isis-auth-hello-text.pcap -n -V -Y "frame.number == 30"
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
    Intradomain Routing Protocol Discriminator: ISIS (0x83)
    Length Indicator: 20
    Version/Protocol ID Extension: 1
    ID Length: 0
    000. .... = Reserved: 0x0
    ...1 0001 = PDU Type: P2P HELLO (17)
    Version: 1
    Reserved: 0
    Maximum Area Addresses: 0
ISIS HELLO
    .... ..01 = Circuit type: Level 1 only (0x1)
    0000 00.. = Reserved: 0x00
    SystemID {Sender of PDU}: 0020.0200.2002
    Holding timer: 30
    PDU length: 1497
    Local circuit ID: 0
    Point-to-point Adjacency State (t=240, l=15)
        Type: 240
        Length: 15
        Adjacency State: Up (0)
        Extended Local circuit ID: 0x00000004
        Neighbor SystemID: 0010.0100.1001
        Neighbor Extended Local circuit ID: 0x00000003
    Authentication (t=10, l=10)
        Type: 10
        Length: 10
        clear text (1), password (length 9) = ISISHELLO
    Protocols Supported (t=129, l=1)
        Type: 129
        Length: 1
        NLPID: IP (0xcc)
            NLPID: 0xcc
    Restart Signaling (t=211, l=3)
        Type: 211
        Length: 3
        Restart Signaling Flags: 0x00
            .... .0.. = Suppress Adjacency: False
            .... ..0. = Restart Acknowledgment: False
            .... ...0 = Restart Request: False
    Area address(es) (t=1, l=4)
        Type: 1
        Length: 4
        Area address (3): 49.0001
    IP Interface address(es) (t=132, l=4)
        Type: 132
        Length: 4
        IPv4 interface address: 10.1.2.2
    Unknown code (t=21, l=4)
        Type: 21
        Length: 4
        Dissector for IS-IS CLV (21) code not implemented, Contact Wireshark developers if you want this supported
            [Expert Info (Note/Undecoded): Dissector for IS-IS CLV (21) code not implemented, Contact Wireshark developers if you want this supported]
                [Dissector for IS-IS CLV (21) code not implemented, Contact Wireshark developers if you want this supported]
                [Severity level: Note]
                [Group: Undecoded]
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=135)
        Type: 8
        Length: 135
上のtshark出力のパケット(No.30 IIH)のpcapをダウンロード

clear text (1), password (length 9) = ISISHELLOパスワードがそのまま載っています。規格が「偶発的な設定ミスへの保護にしかならない」と書いているのはこの形式です。

HMAC-MD5に変える(STEP 2)

同じパスワードのまま方式だけ変えます。両側に入れます。

STEP 2:R1とR2の両方に投入した設定
router isis 1
 interface GigabitEthernet0/0/0/0
  hello-password hmac-md5 clear ISISHELLO

キャプチャーisis-auth-hello-md5.pcapではNo.3までが平文、No.4からhmac-md5です。

STEP 2の状態でR2が送ったIIH(No.4)
$ tshark -r isis-auth-hello-md5.pcap -n -V -Y "frame.number == 4"
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
    Intradomain Routing Protocol Discriminator: ISIS (0x83)
    Length Indicator: 20
    Version/Protocol ID Extension: 1
    ID Length: 0
    000. .... = Reserved: 0x0
    ...1 0001 = PDU Type: P2P HELLO (17)
    Version: 1
    Reserved: 0
    Maximum Area Addresses: 0
ISIS HELLO
    .... ..01 = Circuit type: Level 1 only (0x1)
    0000 00.. = Reserved: 0x00
    SystemID {Sender of PDU}: 0020.0200.2002
    Holding timer: 30
    PDU length: 1497
    Local circuit ID: 0
    Point-to-point Adjacency State (t=240, l=15)
        Type: 240
        Length: 15
        Adjacency State: Up (0)
        Extended Local circuit ID: 0x00000004
        Neighbor SystemID: 0010.0100.1001
        Neighbor Extended Local circuit ID: 0x00000003
    Authentication (t=10, l=17)
        Type: 10
        Length: 17
        hmac-md5 (54), message digest (length 16) = 15e744957bb46c8bda9f08ba36bcdb40
    Protocols Supported (t=129, l=1)
        Type: 129
        Length: 1
        NLPID: IP (0xcc)
            NLPID: 0xcc
    Restart Signaling (t=211, l=3)
        Type: 211
        Length: 3
        Restart Signaling Flags: 0x00
            .... .0.. = Suppress Adjacency: False
            .... ..0. = Restart Acknowledgment: False
            .... ...0 = Restart Request: False
    Area address(es) (t=1, l=4)
        Type: 1
        Length: 4
        Area address (3): 49.0001
    IP Interface address(es) (t=132, l=4)
        Type: 132
        Length: 4
        IPv4 interface address: 10.1.2.2
    Unknown code (t=21, l=4)
        Type: 21
        Length: 4
        Dissector for IS-IS CLV (21) code not implemented, Contact Wireshark developers if you want this supported
            [Expert Info (Note/Undecoded): Dissector for IS-IS CLV (21) code not implemented, Contact Wireshark developers if you want this supported]
                [Dissector for IS-IS CLV (21) code not implemented, Contact Wireshark developers if you want this supported]
                [Severity level: Note]
                [Group: Undecoded]
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=255)
        Type: 8
        Length: 255
    Padding (t=8, l=128)
        Type: 8
        Length: 128
上のtshark出力のパケット(No.4 IIH)のpcapをダウンロード

hmac-md5 (54), message digest (length 16)となり、パスワード自体は載りません。TLV長は10から17(型1 + ダイジェスト16)です。両側にほぼ同時に入れたため隣接は落ちていません。

STEP 2:R1の show isis adjacency-log
RP/0/RP0/CPU0:R1#show isis adjacency-log
Wed Sep  9 11:22:01.084 UTC

  IS-IS 1  Level 1  Adjacency Log                Capacity: 100, Size: 2

When          System          Interface          State   Details
--- Wed Sep  9 2026 ---
11:15:49.412  R2              Gi0/0/0/0          d -> i  
11:15:50.021  R2              Gi0/0/0/0          i -> u  New adjacency
                                                         IPv4 Unicast Up

片側だけパスワードを変える(STEP 3)

STEP 3:R1にだけ投入した設定
router isis 1
 interface GigabitEthernet0/0/0/0
  hello-password hmac-md5 clear ISISWRONG

両側が相手のIIHを捨てるので、保持時間が切れて隣接が落ちます。理由の表示はHoldtime expiredで、認証とは書かれません

STEP 3:R1の show isis adjacency-log
RP/0/RP0/CPU0:R1#show isis adjacency-log
Wed Sep  9 11:29:07.146 UTC

  IS-IS 1  Level 1  Adjacency Log                Capacity: 100, Size: 3

When          System          Interface          State   Details
--- Wed Sep  9 2026 ---
11:15:49.412  R2              Gi0/0/0/0          d -> i  
11:15:50.021  R2              Gi0/0/0/0          i -> u  New adjacency
                                                         IPv4 Unicast Up
11:23:45.302  R2              Gi0/0/0/0          u -> d  Holdtime expired
                                                         IPv4 Unicast Down

認証で捨てたことはshow isis interfaceLast PDU Rejectedに出ます。R1側にも同じ表示があります。

STEP 3:R2の show isis interface(Gi0/0/0/0の先頭部分)
GigabitEthernet0/0/0/0      Enabled
  Adjacency Formation:      Enabled
  Prefix Advertisement:     Enabled
  Bandwidth:                1000000
  RSI SRLG:                 Not Registered
  
  Circuit Type:             level-1
  Media Type:               P2P
  Circuit Number:           0
  Extended Circuit Number:  0
  Last IIH Received:        11:23:19 (00:06:02 ago), 1497 octets
  Last PDU Rejected:        11:29:18 (3.33 sec ago), 1497 octets, P2P IIH, Authentication Failed
  Last IIH Sent:            11:29:18 (3.63 sec ago), 1497 octets
  Sending next P2P IIH in:  4 s

LSPにパスワードを入れる(STEP 4)

R1のパスワードを戻し、R1とR2にだけlsp-passwordを入れます。R3には入れません。

STEP 4:R1とR2に投入した設定(R3は未設定)
router isis 1
 lsp-password hmac-md5 clear ISISLSP
 interface GigabitEthernet0/0/0/0
  hello-password hmac-md5 clear ISISHELLO

レベル1側は両方設定済みなので変化はありません。R2が送るレベル2 LSPにはIIHと同じTLV 10が載ります。キャプチャーisis-auth-lsp.pcapNo.10がそれです(No.4は設定前で、TLV 10がありません)。

STEP 4の状態でR2が送ったレベル2 LSP(No.10)
$ tshark -r isis-auth-lsp.pcap -n -V -Y "frame.number == 10"
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
    Intradomain Routing Protocol Discriminator: ISIS (0x83)
    Length Indicator: 27
    Version/Protocol ID Extension: 1
    ID Length: 0
    000. .... = Reserved: 0x0
    ...1 0100 = PDU Type: L2 LSP (20)
    Version: 1
    Reserved: 0
    Maximum Area Addresses: 0
ISO 10589 ISIS Link State Protocol Data Unit
    PDU length: 133
    Remaining lifetime: 1200
    LSP-ID: 0020.0200.2002.00-00
    Sequence number: 0x0000000b
    Checksum: 0xd687 [correct]
    [Checksum Status: Good]
    Type block(0x03): Partition Repair:0, Attached bits:0, Overload bit:0, IS type:3
        0... .... = Partition Repair: Not supported
        .000 0... = Attachment: 0
            .0.. .... = Error metric: Not set
            ..0. .... = Expense metric: Not set
            ...0 .... = Delay metric: Not set
            0... .... = Default metric: Not set
        .... .0.. = Overload bit: Not set
        .... ..11 = Type of Intermediate System: Level 2 (3)
    Authentication (t=10, l=17)
        Type: 10
        Length: 17
        hmac-md5 (54), message digest (length 16) = b2f6439f0c9e610b8c2205d9b6fcac43
    Area address(es) (t=1, l=4)
        Type: 1
        Length: 4
        Area address (3): 49.0001
    Originating neighbor buffer size (t=14, l=2)
        Type: 14
        Length: 2
        Neighbor originating buffer size: 1492
    Protocols supported (t=129, l=1)
        Type: 129
        Length: 1
        NLPID: IP (0xcc)
            NLPID: 0xcc
    IP Interface address(es) (t=132, l=4)
        Type: 132
        Length: 4
        IPv4 interface address: 2.2.2.2
    Hostname (t=137, l=2)
        Type: 137
        Length: 2
        Hostname: R2
    IP Internal reachability (t=128, l=48)
        Type: 128
        Length: 48
        IPv4 prefix: 1.1.1.1/32
            ..00 1010 = Default Metric: 10
            .0.. .... = Default Metric IE: Internal
            0... .... = Distribution: Up
            ..00 0000 = Delay Metric: 0
            1... .... = Delay Metric: Not Supported
            .0.. .... = Delay Metric: Internal
            ..00 0000 = Expense Metric: 0
            1... .... = Expense Metric: Not Supported
            .0.. .... = Expense Metric: Internal
            ..00 0000 = Error Metric: 0
            1... .... = Error Metric: Not Supported
            .0.. .... = Error Metric: Internal
        IPv4 prefix: 2.2.2.2/32
            ..00 0000 = Default Metric: 0
            .0.. .... = Default Metric IE: Internal
            0... .... = Distribution: Up
            ..00 0000 = Delay Metric: 0
            1... .... = Delay Metric: Not Supported
            .0.. .... = Delay Metric: Internal
            ..00 0000 = Expense Metric: 0
            1... .... = Expense Metric: Not Supported
            .0.. .... = Expense Metric: Internal
            ..00 0000 = Error Metric: 0
            1... .... = Error Metric: Not Supported
            .0.. .... = Error Metric: Internal
        IPv4 prefix: 10.1.2.0/24
            ..00 1010 = Default Metric: 10
            .0.. .... = Default Metric IE: Internal
            0... .... = Distribution: Up
            ..00 0000 = Delay Metric: 0
            1... .... = Delay Metric: Not Supported
            .0.. .... = Delay Metric: Internal
            ..00 0000 = Expense Metric: 0
            1... .... = Expense Metric: Not Supported
            .0.. .... = Expense Metric: Internal
            ..00 0000 = Error Metric: 0
            1... .... = Error Metric: Not Supported
            .0.. .... = Error Metric: Internal
        IPv4 prefix: 10.2.3.0/24
            ..00 1010 = Default Metric: 10
            .0.. .... = Default Metric IE: Internal
            0... .... = Distribution: Up
            ..00 0000 = Delay Metric: 0
            1... .... = Delay Metric: Not Supported
            .0.. .... = Delay Metric: Internal
            ..00 0000 = Expense Metric: 0
            1... .... = Expense Metric: Not Supported
            .0.. .... = Expense Metric: Internal
            ..00 0000 = Error Metric: 0
            1... .... = Error Metric: Not Supported
            .0.. .... = Error Metric: Internal
    IS Reachability (t=2, l=12)
        Type: 2
        Length: 12
        Reserved: 0x00
        IS Neighbor: 0030.0300.3003.00
            ..00 1010 = Default Metric: 10
            .0.. .... = Default Metric: Internal
            ..00 1010 = Delay Metric: 10
            0... .... = Delay Metric: Supported
            .0.. .... = Delay Metric: Internal
            ..00 1010 = Expense Metric: 10
            0... .... = Expense Metric: Supported
            .0.. .... = Expense Metric: Internal
            ..00 1010 = Error Metric: 10
            0... .... = Error Metric: Supported
            .0.. .... = Error Metric: Internal
            IS Neighbor: 0030.0300.3003.00
上のtshark出力のパケット(No.10 LSP)のpcapをダウンロード

R3はパスワードが無いので、このLSPを検査せずに受理します。逆にR3のPDUには認証情報が無く、R2が捨てます。

STEP 4:R2の show isis interface(Gi0/0/0/1の先頭部分)
GigabitEthernet0/0/0/1      Enabled
  Adjacency Formation:      Enabled
  Prefix Advertisement:     Enabled
  Bandwidth:                1000000
  RSI SRLG:                 Not Registered
  
  Circuit Type:             level-2-only
  Media Type:               P2P
  Circuit Number:           0
  Extended Circuit Number:  3
  Last IIH Received:        11:49:53 (3.28 sec ago), 1497 octets
  Last PDU Rejected:        11:49:55 (0.88 sec ago), 35 octets, L2 PSNP, Authentication Failed
  Last IIH Sent:            11:49:55 (1.59 sec ago), 1497 octets
  Sending next P2P IIH in:  6 s

R3が返すPSNP(LSPの受信確認)が捨てられるので、R2はLSPを再送し続けます。

STEP 4:R2の show isis statistics(先頭部分)
IS-IS 1 Packet and Event Statistics
                                              Dropped        Dropped
  Total PDUs       Sent       Received       On Input      By Update
    Hello:          480            426              0              -
    CSNP:             3              3              -              0
    PSNP:            10             10              0              0
    LSP:            270             12              0              0
  
  LSP Retransmissions:           255
  LSP Checksum Errors:           0

R2が持つR3のLSPは更新されず、保持時間(1200秒)が切れて消えます。経路も消えますが、隣接はUpのままです。

STEP 4:R2の show isis database
RP/0/RP0/CPU0:R2#show isis database
Wed Sep  9 11:49:57.515 UTC

IS-IS 1 (Level-1) Link State Database
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime/Rcvd  ATT/P/OL
R1.00-00              0x00000008   0xe79d        912  /1200         0/0/0
R2.00-00            * 0x0000000c   0xb665        1083 /*            0/0/0

 Total Level-1 LSP count: 2     Local Level-1 LSP count: 1

IS-IS 1 (Level-2) Link State Database
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime/Rcvd  ATT/P/OL
R2.00-00            * 0x0000000c   0x157a        917  /*            0/0/0
0030.0300.3003.00-00  0x00000006   0x013f        0 (3)/*            0/0/0

 Total Level-2 LSP count: 2     Local Level-2 LSP count: 1
STEP 4:R2の show route isis
RP/0/RP0/CPU0:R2#show route isis
Wed Sep  9 11:49:56.056 UTC

i L1 1.1.1.1/32 [115/10] via 10.1.2.1, 00:19:26, GigabitEthernet0/0/0/0

R3側は何も失っていません。壊れているのは片方向だけです。

STEP 4:R3の show route isis
RP/0/RP0/CPU0:R3#show route isis
Wed Sep  9 11:50:14.462 UTC

i L2 1.1.1.1/32 [115/20] via 10.2.3.2, 00:19:45, GigabitEthernet0/0/0/0
i L2 2.2.2.2/32 [115/10] via 10.2.3.2, 00:34:08, GigabitEthernet0/0/0/0
i L2 10.1.2.0/24 [115/20] via 10.2.3.2, 00:34:08, GigabitEthernet0/0/0/0

相手側にも入れる(STEP 5)

R3にも同じlsp-passwordを入れると、R3のLSPが新しいシーケンス番号で入り直し、経路も戻ります。

STEP 5:R3に投入した設定
router isis 1
 lsp-password hmac-md5 clear ISISLSP
STEP 5:R2の show isis database
RP/0/RP0/CPU0:R2#show isis database
Wed Sep  9 11:52:26.455 UTC

IS-IS 1 (Level-1) Link State Database
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime/Rcvd  ATT/P/OL
R1.00-00              0x00000008   0xe79d        763  /1200         0/0/0
R2.00-00            * 0x0000000d   0x4013        1161 /*            1/0/0

 Total Level-1 LSP count: 2     Local Level-1 LSP count: 1

IS-IS 1 (Level-2) Link State Database
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime/Rcvd  ATT/P/OL
R2.00-00            * 0x0000000c   0x157a        768  /*            0/0/0
R3.00-00              0x00000008   0x42f3        1161 /1200         0/0/0

 Total Level-2 LSP count: 2     Local Level-2 LSP count: 1
STEP 5:R2の show route isis
RP/0/RP0/CPU0:R2#show route isis
Wed Sep  9 11:52:25.191 UTC

i L1 1.1.1.1/32 [115/10] via 10.1.2.1, 00:21:56, GigabitEthernet0/0/0/0
i L2 3.3.3.3/32 [115/10] via 10.2.3.3, 00:00:36, GigabitEthernet0/0/0/1

すべて外す(STEP 6)

hello-passwordlsp-passwordをすべて削除すると初期状態に戻ります(STEP 0とSTEP 6の..._run.txtが一致)。削除も投入と同じく、両端を短い間隔で行います。

設計の指針

  • 両方入れるhello-passwordだけではLSPとSNPが素通りし、lsp-passwordだけでは隣接を誰でも張れます
  • hmac-md5以上にするtextはパスワードがそのまま載ります
  • 両端をまとめて変える。片側だけの状態は隣接を落とします。一斉に変えられないときはsend-onlyで送信を先に全台へ入れ、行き渡ってから受信の検査を有効にします。入れ替えはkeychain
  • 切り分けはshow isis neighborsから。隣接が無ければhello-password、隣接があるのに経路が無ければlsp-passwordshow isis interfaceLast PDU RejectedにPDUの種類とAuthentication Failedが出ます

本記事で検証したのはtexthmac-md5です。keychainsend-onlysnp、RFC 5310のHMAC-SHA系は確認していません。

検証Configおよびshow結果

各STEPで3台から次の種類をルータごとに取得しています。検証Configはこの..._run.txtです(最終状態はSTEP 6)。

ファイル内容
..._show.txtshow version / show interface description / show route / show route isis / show isis / show isis hostname / show isis interface / show isis interface brief / show isis neighbors / show isis neighbors detail / show isis database / show isis database detail / show isis topology / show isis adjacency / show isis adjacency-log / show isis spf-log / show isis lsp-log / show isis statistics / show cef
..._log.txtそのSTEPの範囲に絞ったshow logging(STEP 0は起動時からの全履歴)
..._run.txtそのSTEP時点のshow running-config
..._debug.txtCLIヘルプ。STEP 0のR1(lsp-password ? / hello-password ?)とSTEP 4のR2(lsp-password hmac-md5 clear ISISLSP ?

STEP 0:認証なし(既定)

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

STEP 1:R1—R2の両側にhello-password text

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

STEP 2:両側をhello-password hmac-md5

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

STEP 3:R1側だけ別のパスワードに

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

STEP 4:R1を戻し、R1・R2にだけlsp-password

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

STEP 5:R3にもlsp-password

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

STEP 6:すべて削除(最終状態)

ルータshow出力syslogrunning-config
R1showlogrun
R2showlogrun
R3showlogrun

CLIヘルプ: STEP 0のR1 / STEP 4のR2

キャプチャーは3本です。

R1—R2の平文パスワード投入まで(STEP 0〜1)のキャプチャー

R1—R2のHMAC-MD5への切り替え(STEP 2)のキャプチャー

R2—R3のlsp-password投入とその後(STEP 4)のキャプチャー

参考

標準タイトル概要
ISO/IEC 10589:2002(第2版)Intermediate System to Intermediate System intra-domain routeing information exchange protocolIS-IS本体の仕様。参照したのは、認証を弱い形式と位置づける6.6.1、TLV 10とAuthentication Typeを定義する9.5〜9.13、受信時の検査手順を定める7.3.15(LSP・SNP)と8.2.5 / 8.4.2(IIH)、パスワードの管理パラメータ(circuit / area / domain)。
RFC 5304IS-IS Cryptographic AuthenticationHMAC-MD5(Type 54)。LSPはChecksumとRemaining Lifetimeを0にして計算。RFC 3567を廃止、RFC 1195を更新。リプレイ攻撃は防げないと明記。
RFC 5310IS-IS Generic Cryptographic AuthenticationType 3。Key ID(2オクテット)+ Authentication Data。HMAC-SHA-1 / 224 / 256 / 384 / 512。
RFC 6232Purge Originator Identification TLV for IS-ISTLV 13。IOS XRのenable-poiが対応。
RFC 1142OSI IS-IS Intra-domain Routing ProtocolISO 10589のDraft Proposal(1990年)。現在はHistoric。ISO/IEC 10589の代わりに参照してはいけません(RFC 7142)。
RFC 7142Reclassification of RFC 1142 to Historic参照すべきはISO/IEC 10589:2002 第2版であることを述べている。

関連記事