IS-ISの認証(hello-password / lsp-password)
IS-ISの認証は隣接を守るものとリンクステートデータベースを守るものの2種類に分かれ、設定する場所も守るPDUも別です。片方だけ入れても、もう片方は保護されません。失敗時の症状も正反対で、前者は隣接が上がらず、後者は隣接が上がったまま経路だけが来ません。
この記事では規格が定める仕組みを確認し、2種類のパスワードが何を守るのかをIOS XRの実機とキャプチャーで確かめます。
規格が定めるのは平文パスワードだけ
ISO/IEC 10589:2002は6.6.1(設計目標)で、自らの認証をこう位置づけています。
この国際規格がサポートする仕組みはパスワードによる弱い形式の認証だけで、偶発的な設定ミスへの保護には有効だが、深刻なセキュリティ上の脅威への保護にはならない。
認証情報はTLV 10(CODE — 10、LENGTH — 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つ、受信用は集合です。
| 管理パラメータ | 守るPDU | IOS XRの設定 |
|---|---|---|
circuitTransmitPassword / circuitReceivePasswords | IIH(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-MD5(Authentication 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 Typeは3、値は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-passwordはrouter isis配下です。選択肢は共通です。
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)#endtextが平文(Type 1)、hmac-md5がHMAC-MD5(Type 54)です。clearで入力した文字列はrunning-configにencryptedで保存されます。パスワードの後には次を続けられます。
| オプション | lsp-password | hello-password |
|---|---|---|
level | レベルを片方に限定 | 同左 |
send-only | 送信にだけ付け、受信は検査しない | 同左 |
snp | SNPの認証モードを個別指定 | — |
enable-poi | TLV 13(RFC 6232)を有効化 | — |
実機での検証
検証環境
R1 — R2 — R3を直列にし、R2のcircuit-typeでR1—R2はレベル1だけ、R2—R3はレベル2だけを通します。エリア用とドメイン用のパスワードを1つのラボで別々に確かめるためです。
| ルータ | NET | is-type | リンク |
|---|---|---|---|
| R1 | 49.0001.0010.0100.1001.00 | level-1 | Gi0/0/0/0 10.1.2.1 |
| R2 | 49.0001.0020.0200.2002.00 | level-1-2 | Gi0/0/0/0 10.1.2.2(circuit-type level-1)/ Gi0/0/0/1 10.2.3.2(circuit-type level-2-only) |
| R3 | 49.0002.0030.0300.3003.00 | level-2-only | Gi0/0/0/0 10.2.3.3 |
検証のSTEP
| STEP | 操作 | 狙い |
|---|---|---|
| 0 | 認証なし(既定) | TLV 10が無いことの確認 |
| 1 | R1—R2の両側にhello-password text | 平文パスワードがそのまま読めること |
| 2 | 両側をhello-password hmac-md5に | Typeが54に変わること |
| 3 | R1側だけ別のパスワードに | 隣接が落ちること |
| 4 | R1を戻し、R1・R2にだけlsp-password | 隣接は残りLSDBだけ壊れること、壊れる向きが片方だけなこと |
| 5 | R3にもlsp-password | 同期が戻ること |
| 6 | すべて削除(最終状態) | STEP 0と同じ |
認証なしの状態(STEP 0)
レベル1とレベル2の隣接が1つずつ上がっています。この時点のIIHにTLV 10は無く、キャプチャーisis-auth-hello-text.pcapのNo.29までがこの状態です。
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の両方に入れます。片側だけでは隣接が落ちるので続けて投入します。
router isis 1
interface GigabitEthernet0/0/0/0
hello-password text clear ISISHELLONo.30が投入直後にR2が送ったIIHです。直前のNo.29との違いはTLV 10だけです。
$ 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: 135clear text (1), password (length 9) = ISISHELLO。パスワードがそのまま載っています。規格が「偶発的な設定ミスへの保護にしかならない」と書いているのはこの形式です。
HMAC-MD5に変える(STEP 2)
同じパスワードのまま方式だけ変えます。両側に入れます。
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です。
$ 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: 128hmac-md5 (54), message digest (length 16)となり、パスワード自体は載りません。TLV長は10から17(型1 + ダイジェスト16)です。両側にほぼ同時に入れたため隣接は落ちていません。
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)
router isis 1
interface GigabitEthernet0/0/0/0
hello-password hmac-md5 clear ISISWRONG両側が相手のIIHを捨てるので、保持時間が切れて隣接が落ちます。理由の表示はHoldtime expiredで、認証とは書かれません。
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 interfaceのLast PDU Rejectedに出ます。R1側にも同じ表示があります。
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 sLSPにパスワードを入れる(STEP 4)
R1のパスワードを戻し、R1とR2にだけlsp-passwordを入れます。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.pcapのNo.10がそれです(No.4は設定前で、TLV 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.00R3はパスワードが無いので、このLSPを検査せずに受理します。逆にR3のPDUには認証情報が無く、R2が捨てます。
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 sR3が返すPSNP(LSPの受信確認)が捨てられるので、R2はLSPを再送し続けます。
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: 0R2が持つR3のLSPは更新されず、保持時間(1200秒)が切れて消えます。経路も消えますが、隣接はUpのままです。
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: 1RP/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/0R3側は何も失っていません。壊れているのは片方向だけです。
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が新しいシーケンス番号で入り直し、経路も戻ります。
router isis 1
lsp-password hmac-md5 clear ISISLSPRP/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: 1RP/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-passwordとlsp-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-password。show isis interfaceのLast PDU RejectedにPDUの種類とAuthentication Failedが出ます
本記事で検証したのはtextとhmac-md5です。keychain、send-only、snp、RFC 5310のHMAC-SHA系は確認していません。
検証Configおよびshow結果
各STEPで3台から次の種類をルータごとに取得しています。検証Configはこの..._run.txtです(最終状態はSTEP 6)。
| ファイル | 内容 |
|---|---|
..._show.txt | show 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.txt | CLIヘルプ。STEP 0のR1(lsp-password ? / hello-password ?)とSTEP 4のR2(lsp-password hmac-md5 clear ISISLSP ?) |
STEP 0:認証なし(既定)
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 1:R1—R2の両側にhello-password text
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 2:両側をhello-password hmac-md5に
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 3:R1側だけ別のパスワードに
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 4:R1を戻し、R1・R2にだけlsp-password
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 5:R3にもlsp-password
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
STEP 6:すべて削除(最終状態)
| ルータ | show出力 | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
キャプチャーは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 protocol | IS-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 5304 | IS-IS Cryptographic Authentication | HMAC-MD5(Type 54)。LSPはChecksumとRemaining Lifetimeを0にして計算。RFC 3567を廃止、RFC 1195を更新。リプレイ攻撃は防げないと明記。 |
| RFC 5310 | IS-IS Generic Cryptographic Authentication | Type 3。Key ID(2オクテット)+ Authentication Data。HMAC-SHA-1 / 224 / 256 / 384 / 512。 |
| RFC 6232 | Purge Originator Identification TLV for IS-IS | TLV 13。IOS XRのenable-poiが対応。 |
| RFC 1142 | OSI IS-IS Intra-domain Routing Protocol | ISO 10589のDraft Proposal(1990年)。現在はHistoric。ISO/IEC 10589の代わりに参照してはいけません(RFC 7142)。 |
| RFC 7142 | Reclassification of RFC 1142 to Historic | 参照すべきはISO/IEC 10589:2002 第2版であることを述べている。 |