IS-ISパケットの種類とヘッダーフォーマット
IS-ISはネイバーの発見からLSDBの同期までを専用のパケットで行います(IS-ISとは)。ISO/IEC 10589ではPDU(Protocol Data Unit)と呼びますが、本記事では「パケット」と書きます。
特徴は、ヘッダーが短く、中身のほとんどがTLV(Type-Length-Value)であることです。共通ヘッダーは8バイトで、その後ろに種別ごとの固定部とTLVが並びます。
9種類のパケットの役割、共通ヘッダー、TLVの仕組みを、Cisco IOS XRのキャプチャで確認します。9種類すべてのtshark出力を載せています。
IS-ISパケットが使うアドレスとカプセル化
IS-ISのパケットはIPに載らず、イーサネットフレームに直接載ります(IS-ISとは)。
| 項目 | 内容 |
|---|---|
| カプセル化 | イーサネット(IEEE 802.3)+ LLC(DSAP/SSAP = 0xFE、Control = 0x03) |
| 宛先MACアドレス | ブロードキャストリンクでは01:80:C2:00:00:14(AllL1ISs)/01:80:C2:00:00:15(AllL2ISs)。ポイントツーポイントとして動作するリンクでは09:00:2B:00:00:05 |
| IS-ISの開始 | 共通ヘッダー先頭の0x83(Intradomain Routeing Protocol Discriminator) |
3つともISO/IEC 10589:2002の表9に載っていますが、09:00:2B:00:00:05は「AllIntermediateSystems — ISO 9542が使う」とあり、ES-IS(ISO 9542)のアドレスです。イーサネット上のpoint-to-pointでこれを使うのは、RFC 5309の4.1がAllISsの使用を推奨しているためです。
本記事では3つすべてを観測しています。
パケットの種類
パケットは3つのカテゴリに分かれ、ISO/IEC 10589:2002の9.4が列挙するのは次の9種類だけです。
| カテゴリ | パケット | PDU Type | 役割 |
|---|---|---|---|
| Hello | LAN Level 1 IIH | 15 | ブロードキャストリンクでレベル1の隣接を確立・維持する |
| Hello | LAN Level 2 IIH | 16 | ブロードキャストリンクでレベル2の隣接を確立・維持する |
| Hello | Point-to-Point IIH | 17 | ポイントツーポイントリンクで隣接を確立・維持する。レベルは中のCircuit typeで示す |
| Link State | Level 1 LSP | 18 | レベル1のリンク状態を配布する |
| Link State | Level 2 LSP | 20 | レベル2のリンク状態を配布する |
| Sequence Number | Level 1 CSNP | 24 | レベル1のLSDBにあるLSPの一覧を見せる |
| Sequence Number | Level 2 CSNP | 25 | レベル2のLSDBにあるLSPの一覧を見せる |
| Sequence Number | Level 1 PSNP | 26 | レベル1で足りないLSPを要求する/受信を確認する |
| Sequence Number | Level 2 PSNP | 27 | レベル2で足りないLSPを要求する/受信を確認する |
OSPFと対応づけると次のようになります。
| OSPF | IS-IS |
|---|---|
| Hello(Type 1) | IIH(15 / 16 / 17) |
| DBD(Type 2) | CSNP(24 / 25) |
| LSR(Type 3) | PSNP(26 / 27) |
| LSU(Type 4) | LSP(18 / 20) |
| LSAck(Type 5) | PSNP(26 / 27) |
PSNPは要求(LSR)と確認応答(LSAck)の両方を兼ねます(PSNP(PDU Type 26 / 27)で確認します)。またHelloはリンク種別とレベルで3種類に分かれます。
19番のPDUは存在しません。
共通ヘッダーのフォーマット
9種類すべてが先頭に同じ8バイトのヘッダーを持ちます。各フィールドは1バイトです。
| フィールド | 長さ | 内容 |
|---|---|---|
| Intradomain Routeing Protocol Discriminator | 1バイト | IS-ISであることを示す固定値0x83(二進10000011、10進131)。ISO/IEC 10589:2002の表2にアーキテクチャ定数IntradomainRouteingPDとして載っており、値そのものはISO/TR 9577(ネットワーク層プロトコル識別子の登録)で割り当てられたもの |
| Length Indicator | 1バイト | 固定ヘッダーの長さ(バイト)。TLVは含まない |
| Version/Protocol ID Extension | 1バイト | 1 |
| ID Length | 1バイト | このルーティングドメインで使うSystem IDの長さ。0は6バイトを意味する。1〜8は実際のバイト数、255は長さ0。それ以外の値は不正 |
| PDU Type | 1バイト | 下位5ビット(ビット1〜5)がパケットの種類(15〜27)。上位3ビット(ビット6〜8)は予約で、送信時は0、受信時は無視する |
| Version | 1バイト | 1 |
| Reserved | 1バイト | 未使用。0で送り、受信時は無視する |
| Maximum Area Addresses | 1バイト | このISのエリアで許されるエリアアドレスの数。1〜254が有効値で、0は受信時に3として扱われる |
ID LengthとMaximum Area Addressesは、0が既定値(6バイト/3個)を意味します。
ISO/IEC 10589:2002の9.1はビットを1〜8で数えます(ビット1が最下位)。
Length Indicatorは種別ごとに異なります。共通8バイトに固定部を足した値です。
| パケット | Length Indicator | 内訳(共通8バイト+固定部) |
|---|---|---|
| LAN IIH(15 / 16) | 27 | 8 + Circuit type 1 + Source ID 6 + Holding Time 2 + PDU Length 2 + Priority 1 + LAN ID 7 |
| Point-to-Point IIH(17) | 20 | 8 + Circuit type 1 + Source ID 6 + Holding Time 2 + PDU Length 2 + Local Circuit ID 1 |
| LSP(18 / 20) | 27 | 8 + PDU Length 2 + Remaining Lifetime 2 + LSP ID 8 + Sequence Number 4 + Checksum 2 + Type block 1 |
| CSNP(24 / 25) | 33 | 8 + PDU Length 2 + Source ID 7 + Start LSP ID 8 + End LSP ID 8 |
| PSNP(26 / 27) | 17 | 8 + PDU Length 2 + Source ID 7 |
TLVという仕組み
固定部の後ろにはTLV(Type-Length-Value)が並びます。
| 要素 | 長さ | 内容 |
|---|---|---|
| Type | 1バイト | そのTLVが何を表すかを示す番号 |
| Length | 1バイト | Valueの長さ(バイト) |
| Value | 可変長 | 中身 |
Lengthが1バイトなので1つのTLVは最大255バイトで、超える場合は同じTypeを繰り返します。ISO/IEC 10589:2002は「認識できないCODEは無視する」と定め、LSPでは「そのまま変更せずに中継する」としています(9.8)。知らないTLVがあってもフラッディングは壊れません。
規格はこれをVARIABLE LENGTH FIELDSと呼び、先頭1バイトをCODEと表記します(9.5〜9.13)。「TLV」も「CLV」も規格の語ではありませんが、本記事はTLVで統一します。
新しい情報はTLVを追加するだけで運べます。IPv6(RFC 5308)やセグメントルーティングもTLVの追加で実現されました。主要なTLVはIS-ISの主要TLVで解説しています。
ISO/IEC 10589:2002が定義するCODEは1〜10と14だけで、キャプチャに出るそれ以外のTLVはIETFが足したものです。
| TLV | 名称 | 出典 |
|---|---|---|
| 1 | Area Addresses | ISO/IEC 10589:2002 |
| 6 | IS Neighbours(6バイトMACアドレス) | ISO/IEC 10589:2002。LAN IIHにしか現れない |
| 8 | Padding | ISO/IEC 10589:2002 |
| 9 | LSP Entries | ISO/IEC 10589:2002。CSNPとPSNPが使う |
| 14 | originatingLSPBufferSize | ISO/IEC 10589:2002 |
| 129 | Protocols Supported | RFC 1195 |
| 132 | IP Interface Address | RFC 1195 |
| 137 | Dynamic Hostname | RFC 5301 |
| 211 | Restart Signaling | RFC 5306 |
| 240 | Point-to-Point Adjacency State | RFC 5303 |
実機での検証
検証環境
9種類すべてを観測するため、ブロードキャストとポイントツーポイントの両方を含む構成です。LANでしか流れないパケット(15・16・24)があり、またPSNPが確認応答として出るのはポイントツーポイントだからです。
| ルータ | NET | is-type | 接続 |
|---|---|---|---|
| R1 | 49.0001.0010.0100.1001.00 | level-1 | LANのみ |
| R2 | 49.0001.0020.0200.2002.00 | (既定=level-1-2) | LANのみ |
| R3 | 49.0001.0030.0300.3003.00 | (既定=level-1-2) | LAN + R4へのP2P |
| R4 | 49.0001.0040.0400.4004.00 | (既定=level-1-2) | R3へのP2P + R5へのP2P |
| R5 | 49.0002.0050.0500.5005.00 | (既定=level-1-2) | R4へのP2Pのみ |
R1・R2・R3は同じエリア49.0001のブロードキャストセグメント(10.0.0.0/24)です。R3–R4も同じエリアのポイントツーポイントで、R4–R5だけエリアをまたぎます。
LAN側にはpoint-to-pointを書きません。既定のブロードキャスト動作にすることでDISが選出され、LAN IIHとCSNPが流れます。
R3–R4を同じエリアにしているのは、ポイントツーポイントでレベル1とレベル2の両方の隣接を張らせるためです。こうするとP2P IIHのCircuit typeが両方を示す値になり、レベル1とレベル2のPSNPがどちらも確認応答として流れます。
RP/0/RP0/CPU0:R3#show isis neighbors
Tue Oct 6 00:54:26.102 UTC
IS-IS 1 neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
R1 Gi0/0/0/0 5254.004e.accf Up 29 L1 Capable
R2 Gi0/0/0/0 5254.006d.5fdf Up 24 L1L2 Capable
R4 Gi0/0/0/1 *PtoP* Up 28 L1L2 Capable
Total neighbor count: 3Gi0/0/0/0に2本の隣接があるのは、R1がレベル1のみ、R2がレベル1-2だからです。Gi0/0/0/1(R4)はL1L2で、同じエリアのポイントツーポイントなので両方のレベルが成立しています。SNPA欄はLAN側が相手のMACアドレス、P2P側が*PtoP*です。ポイントツーポイントでは相手が1台なのでMACアドレスが不要なためです。
show isis interface briefでも違いが出ます。
RP/0/RP0/CPU0:R3#show isis interface brief
Tue Oct 6 00:54:25.915 UTC
IS-IS 1 Interfaces
Interface All Adjs Adj Topos Adv Topos CLNS MTU Prio
OK L1 L2 Run/Cfg Run/Cfg L1 L2
----------------- --- --------- --------- --------- ---- ---- --------
Lo0 Yes - - 0/0 1/1 No - - -
Gi0/0/0/0 Yes 2* 1* 1/1 1/1 Up 1497 64 64
Gi0/0/0/1 Yes 1 1 1/1 1/1 Up 1497 - -LAN側はPrioが64、P2P側は-です。優先度はDISを選ぶためのものなので、ポイントツーポイントには値がありません。隣接数の*はこのルータがDISであることを示し、R3が両レベルでDISです。
64はISO/IEC 10589:2002のl1IntermediateSystemPriority / l2IntermediateSystemPriorityの既定値です。選出規則(8.4.5)は「優先度が最大のIS、同点ならMACアドレスが最大」で、同点なのでMACアドレスで決まっています。詳細はIS-ISのDISと疑似ノードで解説しています。
検証のSTEP
| STEP | 操作 | 確かめること |
|---|---|---|
| 0 | 初期状態 | 定常で流れるIIH(15/16/17)とCSNP(24/25) |
| 1 | 全5台でprocess restart isis | 再同期でLSP(18/20)とPSNP(26/27)が流れる |
| 2 | R1だけprocess restart isis | LANでレベル1のPSNPが要求として流れる |
| 3 | R5のLoopback1をIS-ISに入れる | LSPが増え、p2pでPSNPが確認応答として出る |
| 4 | LANの3台にhello-padding disable | パディングが消える。両端とも無効なので隣接は落ちない |
| 5 | hello-paddingを戻す | 復旧する |
| 6 | R5のLoopback1を外す(最終状態) | 初期状態と同じ |
STEP 1と2のprocess restart isisはLSDBを捨てて再同期させるためのもので、CSNPで一覧を受け取り、足りないLSPをPSNPで要求し、LSPを受け取るという流れが観測できます。
9種類すべてを観測した
添付した全21本のpcapから、PDU種別を数えると9種類すべてがそろっています。
$ for f in isis-packet-step*-*.pcap; do
> tshark -r $f -V 2>/dev/null | grep -oE "PDU Type: [A-Za-z0-9 -]+ \([0-9]+\)"
> done | sort | uniq -c
239 PDU Type: L1 CSNP (24)
1206 PDU Type: L1 HELLO (15)
110 PDU Type: L1 LSP (18)
32 PDU Type: L1 PSNP (26)
245 PDU Type: L2 CSNP (25)
964 PDU Type: L2 HELLO (16)
158 PDU Type: L2 LSP (20)
60 PDU Type: L2 PSNP (27)
974 PDU Type: P2P HELLO (17)19番のPDUは存在しないので、これが全種類です。以降の節で1つずつ中身を見ます。
IIH(PDU Type 15 / 16 / 17)
IIHは隣接を確立・維持するパケットです。リンク種別とレベルで3種類に分かれます。
LAN Level 1 IIH(PDU Type 15)
R1(level-1)がLANへ送ったIIHです。宛先MACは01:80:c2:00:00:14(AllL1ISs)です。
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
...0 1111 = PDU Type: L1 HELLO (15)
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}: 0010.0100.1001
Holding timer: 30
PDU length: 1497
.100 0000 = Priority: 64
0... .... = Reserved: 0
SystemID {Designated IS}: 0030.0300.3003.01
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.0.0.1
IS Neighbor(s) (t=6, l=12)
Type: 6
Length: 12
IS Neighbor: 52:54:00:6d:5f:df (52:54:00:6d:5f:df)
IS Neighbor: 52:54:00:fd:70:64 (52:54:00:fd:70:64)共通ヘッダーの8バイトが表どおりに並びます。PDU Typeが...0 1111と5ビットで展開され、上位3ビットがReservedと別表示されています。Length Indicatorは27で、表の値と一致します。
固定部はISO/IEC 10589:2002の9.5で次のように定義されています。
| フィールド | 長さ | この出力での値 | 内容 |
|---|---|---|---|
| Reserved/Circuit Type | 1バイト | 0x1 | 下位2ビットが送信元の扱えるレベル。1=レベル1のみ、2=レベル2のみ、3=レベル1とレベル2の両方。0は予約値で、指定されていたらPDU全体を破棄する。上位6ビットは予約 |
| Source ID | ID Lengthバイト(既定6) | 0010.0100.1001 | 送信元ルータのSystem ID |
| Holding Time | 2バイト | 30 | この秒数だけIIHが届かなければ隣接を落とす |
| PDU Length | 2バイト | 1497 | ヘッダーを含むPDU全体の長さ(バイト) |
| Reserved/Priority | 1バイト | 64 | 下位7ビットがLANレベル1 DISになるための優先度。値が大きいほうが優先。ビット8は予約 |
| LAN ID | ID Length + 1バイト | 0030.0300.3003.01 | DISのSystem IDと、DISが割り当てる1バイトの番号 |
R1はlevel-1なのでCircuit typeがLevel 1 only (0x1)です(ISO/IEC 10589:2002の注記55は「LAN Level 1 IIHのCircuit Typeは1か3」と定めています)。
LAN IDはR1自身ではなくDISであるR3のSystem IDです(0030.0300.3003.01)。9.5はLAN IDを「DISのSystem IDにDISが割り当てた1バイトを付けたもの。DISのIIHからコピーする」と定めています。末尾の.01が疑似ノードLSPR3.01-00の番号です。
LAN IIH固有のTLV 6(IS Neighbours)には、R1が見えているルータのMACアドレスが並びます。相手が自分を見えていることをこのTLVで確かめるのがブロードキャストでの双方向性の確認です。この出力の後ろにはパディング(TLV 8)が続きます(IIHのパディングで見ます)。
LAN Level 2 IIH(PDU Type 16)
同じLANに、レベル2のIIHも流れます。宛先MACは01:80:c2:00:00:15(AllL2ISs)です。
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 0000 = PDU Type: L2 HELLO (16)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISIS HELLO
.... ..11 = Circuit type: Level 1 and 2 (0x3)
0000 00.. = Reserved: 0x00
SystemID {Sender of PDU}: 0030.0300.3003
Holding timer: 10
PDU length: 1497
.100 0000 = Priority: 64
0... .... = Reserved: 0
SystemID {Designated IS}: 0030.0300.3003.01
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.0.0.3
IS Neighbor(s) (t=6, l=6)
Type: 6
Length: 6
IS Neighbor: 52:54:00:6d:5f:df (52:54:00:6d:5f:df)PDU Typeが...1 0000(16)に変わるだけで、フォーマットはレベル1と同じです(Length Indicatorも27)。LAN IDも同じR3ですが、こちらはレベル2のDISとしての値です。レベルごとに別のDISが選ばれるので、両者が一致するとは限りません。
R1はlevel-1なのでレベル2のIIHを送りません。この出力の送信元はR2またはR3です。
Point-to-Point IIH(PDU Type 17)
R3–R4のポイントツーポイントに流れるIIHです。
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
.... ..11 = Circuit type: Level 1 and 2 (0x3)
0000 00.. = Reserved: 0x00
SystemID {Sender of PDU}: 0030.0300.3003
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: 0040.0400.4004
Neighbor Extended Local circuit ID: 0x00000004
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.0.34.3Length Indicatorが20で、LAN IIHの27より7バイト短くなっています。表のとおりPriority(1バイト)とLAN ID(7バイト)が無く、代わりにLocal Circuit ID(1バイト)が入るためです。DISはブロードキャストだけの仕組みなので、ポイントツーポイントには優先度もLAN IDもありません。
Circuit type は Level 1 and 2 (0x3) です。R3とR4は同じエリアなので、1本のリンクでレベル1とレベル2の両方の隣接が成立しています。PDU Typeが15・16のように分かれないのは、ポイントツーポイントではレベルを中のCircuit typeで示すためです。
LSP(PDU Type 18 / 20)
LSPはリンク状態を配布するパケットです。レベルごとに番号が分かれます。
Level 1 LSP(PDU Type 18)
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 0010 = PDU Type: L1 LSP (18)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISO 10589 ISIS Link State Protocol Data Unit
PDU length: 113
Remaining lifetime: 1200
LSP-ID: 0030.0300.3003.00-00
Sequence number: 0x0000000d
Checksum: 0x6271 [correct]
[Checksum Status: Good]
Type block(0x0b): Partition Repair:0, Attached bits:1, Overload bit:0, IS type:3
0... .... = Partition Repair: Not supported
.000 1... = Attachment: 1
.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)Length Indicatorは27です。固定部はISO/IEC 10589:2002の9.8で定義されています。
| フィールド | 長さ | この出力での値 | 内容 |
|---|---|---|---|
| PDU Length | 2バイト | 113 | PDU全体の長さ |
| Remaining Lifetime | 2バイト | 1200 | このLSPが有効な残り秒数。0になると削除される |
| LSP ID | ID Length + 2バイト | 0030.0300.3003.00-00 | System ID + 疑似ノードID(1バイト)+ LSP番号(1バイト) |
| Sequence Number | 4バイト | 0x0000000d | 作り直すたびに増える。大きいほうが新しい |
| Checksum | 2バイト | 0x6271 | Source IDから後ろを対象に計算する |
| P/ATT/LSPDBOL/IS Type | 1バイト | 0x0b | パーティション修復(P)、ATT(4ビット)、オーバーロード(OL)、IS種別 |
最後の1バイトが4つの意味を持つのがLSP固有です。tsharkはビットごとに展開してくれます。Attachment: 1はこのルータが他エリアへ到達できることを示し、レベル1のルータはこれを見てデフォルトルートを作ります(IS-ISのATTビット)。Type of Intermediate System: Level 2 (3)はlevel-1-2であることを示します。
Level 2 LSP(PDU Type 20)
STEP 3でR5のLoopback1(172.16.5.1/32)をIS-ISに入れると、R5が作り直したレベル2 LSPがR4へ流れます。
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: 103
Remaining lifetime: 1200
LSP-ID: 0050.0500.5005.00-00
Sequence number: 0x00000009
Checksum: 0xbf62 [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)
Area address(es) (t=1, l=4)
Type: 1
Length: 4
Area address (3): 49.0002
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: 5.5.5.5
Hostname (t=137, l=2)
Type: 137
Length: 2
Hostname: R5
Extended IS reachability (t=22, l=11)
Type: 22
Length: 11
IS Neighbor: 0040.0400.4004.00
IS neighbor ID: 0040.0400.4004.00
Metric: 10
SubCLV Length: 0 (no sub-TLVs present)
Extended IP Reachability (t=135, l=38)
Type: 135
Length: 38
Ext. IP Reachability: 5.5.5.5/32
Metric: 0
0... .... = Distribution: Up
.1.. .... = Sub-TLV: Yes
..10 0000 = Prefix Length: 32
IPv4 prefix: 5.5.5.5
SubCLV Length: 3
subTLV: Prefix Attribute Flags (c=4, l=1): Flags:--N
Code: Prefix Attribute Flags (4)
Length: 1
Flags: 0x20, Node
0... .... = External Prefix: Not set
.0.. .... = Re-advertisement: Not set
..1. .... = Node: Set
Ext. IP Reachability: 10.0.45.0/24
Metric: 10
0... .... = Distribution: Up
.1.. .... = Sub-TLV: Yes
..01 1000 = Prefix Length: 24
IPv4 prefix: 10.0.45.0
SubCLV Length: 3
subTLV: Prefix Attribute Flags (c=4, l=1): Flags:---
Code: Prefix Attribute Flags (4)
Length: 1
Flags: 0x00
0... .... = External Prefix: Not set
.0.. .... = Re-advertisement: Not set
..0. .... = Node: Not set
Ext. IP Reachability: 172.16.5.1/32
Metric: 0
0... .... = Distribution: Up
.1.. .... = Sub-TLV: Yes
..10 0000 = Prefix Length: 32
IPv4 prefix: 172.16.5.1PDU Typeが...1 0100(20)です。18と20の間に19は無く、レベル1が18、レベル2が20です。固定部のフォーマットはレベル1と同じで、Extended IP Reachability(TLV 135)に新しく入れた172.16.5.1/32が載っています。
Type blockのAttached bits: 0は、R5が自エリアの外へ出る経路を持たないことを示します。R5はエリア49.0002の端にいるためです。
CSNP(PDU Type 24 / 25)
CSNPは自分のLSDBにあるLSPの一覧を相手に見せるパケットです。OSPFのDBDに相当します。
Level 1 CSNP(PDU Type 24)
LANではDISが定期的にCSNPを送ります。
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
Intradomain Routing Protocol Discriminator: ISIS (0x83)
Length Indicator: 33
Version/Protocol ID Extension: 1
ID Length: 0
000. .... = Reserved: 0x0
...1 1000 = PDU Type: L1 CSNP (24)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISO 10589 ISIS Complete Sequence Numbers Protocol Data Unit
PDU length: 115
Source-ID: 0030.0300.3003
Source-ID-Circuit: 00
Start LSP-ID: 0000.0000.0000.00-00
End LSP-ID: ffff.ffff.ffff.ff-ff
LSP entries (t=9, l=80)
Type: 9
Length: 80
LSP Entry
LSP Sequence Number: 0x00000005
Remaining Lifetime: 1139
LSP checksum: 0x1e5e
LSP-ID: 0010.0100.1001.00-00
LSP Entry
LSP Sequence Number: 0x00000008
Remaining Lifetime: 1175
LSP checksum: 0xda69
LSP-ID: 0020.0200.2002.00-00
LSP Entry
LSP Sequence Number: 0x00000006
Remaining Lifetime: 1175
LSP checksum: 0x706a
LSP-ID: 0030.0300.3003.00-00
LSP Entry
LSP Sequence Number: 0x00000002
Remaining Lifetime: 1141
LSP checksum: 0xddb1
LSP-ID: 0030.0300.3003.01-00
LSP Entry
LSP Sequence Number: 0x00000006
Remaining Lifetime: 1175
LSP checksum: 0x43dd
LSP-ID: 0040.0400.4004.00-00Length Indicatorは33で、9種類の中で最も長い固定部です。
| フィールド | 長さ | この出力での値 | 内容 |
|---|---|---|---|
| PDU Length | 2バイト | 115 | PDU全体の長さ |
| Source ID | ID Length + 1バイト | 0030.0300.3003 + 00 | 送信元のSystem IDと回線ID |
| Start LSP ID | ID Length + 2バイト | 0000.0000.0000.00-00 | 一覧の範囲の下端 |
| End LSP ID | ID Length + 2バイト | ffff.ffff.ffff.ff-ff | 一覧の範囲の上端 |
Start/Endは全範囲(すべて0からすべてf)なので、このCSNPはLSDB全体の一覧です。LSDBが大きくて1つのPDUに収まらない場合は範囲を分けて複数のCSNPで送ります。
中身は TLV 9(LSP Entries)で、LSPごとにLSP Sequence Number / Remaining Lifetime / LSP checksum / LSP-ID の組が並びます。LSPの本体は入っていません。受け取った側はこれを自分のLSDBと比べ、足りないものや古いものをPSNPで要求します。
Level 2 CSNP(PDU Type 25)
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
Intradomain Routing Protocol Discriminator: ISIS (0x83)
Length Indicator: 33
Version/Protocol ID Extension: 1
ID Length: 0
000. .... = Reserved: 0x0
...1 1001 = PDU Type: L2 CSNP (25)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISO 10589 ISIS Complete Sequence Numbers Protocol Data Unit
PDU length: 115
Source-ID: 0030.0300.3003
Source-ID-Circuit: 00
Start LSP-ID: 0000.0000.0000.00-00
End LSP-ID: ffff.ffff.ffff.ff-ff
LSP entries (t=9, l=80)
Type: 9
Length: 80
LSP Entry
LSP Sequence Number: 0x00000007
Remaining Lifetime: 1165
LSP checksum: 0xc0d3
LSP-ID: 0020.0200.2002.00-00
LSP Entry
LSP Sequence Number: 0x00000008
Remaining Lifetime: 1166
LSP checksum: 0x9e8e
LSP-ID: 0030.0300.3003.00-00
LSP Entry
LSP Sequence Number: 0x00000002
Remaining Lifetime: 1160
LSP checksum: 0xfebd
LSP-ID: 0030.0300.3003.01-00
LSP Entry
LSP Sequence Number: 0x00000009
Remaining Lifetime: 1193
LSP checksum: 0xe3eb
LSP-ID: 0040.0400.4004.00-00
LSP Entry
LSP Sequence Number: 0x00000004
Remaining Lifetime: 1163
LSP checksum: 0x720d
LSP-ID: 0050.0500.5005.00-00PDU Typeが...1 1001(25)に変わるだけで、フォーマットは同じです。レベル2のLSDBの一覧なので、中身のLSP-IDがレベル2のものになります。
ポイントツーポイントでは定期的なCSNPは流れません。隣接が成立した直後に一度だけ送り、以降はLSPとPSNPで同期を保ちます(IS-ISのフラッディングとLSDB同期)。
PSNP(PDU Type 26 / 27)
PSNPは要求と確認応答の両方を兼ねます。OSPFではLSR(Type 3)とLSAck(Type 5)に分かれている役割を、IS-ISは1種類で担います。
要求としてのPSNP(STEP 2)
STEP 2でR1だけをprocess restart isisすると、R1はLSDBを失います。DISのCSNPで一覧を受け取り、持っていないLSPをPSNPで要求します。
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
Intradomain Routing Protocol Discriminator: ISIS (0x83)
Length Indicator: 17
Version/Protocol ID Extension: 1
ID Length: 0
000. .... = Reserved: 0x0
...1 1010 = PDU Type: L1 PSNP (26)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISO 10589 ISIS Partial Sequence Numbers Protocol Data Unit
PDU length: 67
Source-ID: 0010.0100.1001
Source-ID-Circuit: 00
LSP entries (t=9, l=48)
Type: 9
Length: 48
LSP Entry
LSP Sequence Number: 0x00000000
Remaining Lifetime: 886
LSP checksum: 0x0000
LSP-ID: 0020.0200.2002.00-00
LSP Entry
LSP Sequence Number: 0x00000000
Remaining Lifetime: 886
LSP checksum: 0x0000
LSP-ID: 0030.0300.3003.00-00
LSP Entry
LSP Sequence Number: 0x00000000
Remaining Lifetime: 886
LSP checksum: 0x0000
LSP-ID: 0040.0400.4004.00-00Length Indicatorは17で、9種類の中で最も短い固定部です(共通8バイト + PDU Length 2 + Source ID 7)。Start/End LSP IDが無いのがCSNPとの違いです。中身のTLV 9には、要求したいLSPのエントリだけが入ります。
確認応答としてのPSNP(STEP 3)
ポイントツーポイントでは、LSPを受け取った側がPSNPで受信を確認します。STEP 3でR5が新しいLSPを出すと、R3–R4間でもLSPの中継とPSNPの確認応答が流れます。
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
Intradomain Routing Protocol Discriminator: ISIS (0x83)
Length Indicator: 17
Version/Protocol ID Extension: 1
ID Length: 0
000. .... = Reserved: 0x0
...1 1010 = PDU Type: L1 PSNP (26)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISO 10589 ISIS Partial Sequence Numbers Protocol Data Unit
PDU length: 35
Source-ID: 0030.0300.3003
Source-ID-Circuit: 00
LSP entries (t=9, l=16)
Type: 9
Length: 16
LSP Entry
LSP Sequence Number: 0x0000000b
Remaining Lifetime: 1199
LSP checksum: 0x39e2
LSP-ID: 0040.0400.4004.00-00同じPDU Type 26ですが、こちらは受け取ったLSPのエントリを返して「受け取った」と伝えるものです。要求と確認応答のどちらであるかはPDUの種別では区別できず、文脈で決まります。
Level 2 PSNP(PDU Type 27)
ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol
Intradomain Routing Protocol Discriminator: ISIS (0x83)
Length Indicator: 17
Version/Protocol ID Extension: 1
ID Length: 0
000. .... = Reserved: 0x0
...1 1011 = PDU Type: L2 PSNP (27)
Version: 1
Reserved: 0
Maximum Area Addresses: 0
ISO 10589 ISIS Partial Sequence Numbers Protocol Data Unit
PDU length: 35
Source-ID: 0040.0400.4004
Source-ID-Circuit: 00
LSP entries (t=9, l=16)
Type: 9
Length: 16
LSP Entry
LSP Sequence Number: 0x00000009
Remaining Lifetime: 1199
LSP checksum: 0xbf62
LSP-ID: 0050.0500.5005.00-00レベル2のPSNPです。フォーマットはレベル1と同じで、PDU Typeが...1 1011(27)になります。
CSNPとPSNPのヘッダーの違い
| フィールド | CSNP(24 / 25) | PSNP(26 / 27) |
|---|---|---|
Length Indicator | 33 | 17 |
| Source ID | あり | あり |
| Start LSP ID / End LSP ID | あり | 無い |
| TLV 9の中身 | 範囲内の全LSPのエントリ | 要求または確認するLSPのエントリだけ |
CSNPは「範囲を指定して一覧を見せる」ためにStart/Endを持ち、PSNPは「個別のLSPを指す」ので範囲が要りません。
IIHのパディング
IIHにはパディング(TLV 8)が付きます。両端のMTUが食い違っている場合に隣接を成立させないための仕組みです。
ISO/IEC 10589:2002の8.2.4(ポイントツーポイント)と8.4.2(ブロードキャスト)は、maxsize − 1バイト以上までパディングすると定めています。maxsizeは次の最大値です。
| 値 | 内容 |
|---|---|
dataLinkBlocksize | その回線で送れるブロックの大きさ(=実質的にMTU) |
originatingL1LSPBufferSize | 自分が出すレベル1 LSPの最大サイズ。既定値はReceiveLSPBufferSize=1492 |
originatingL2LSPBufferSize | 同じくレベル2 LSPの最大サイズ(ポイントツーポイントのみ) |
「maxsize − 1以上」なのは、PDU長がmaxsize − 1ならパディングの余地が無いためです(TLVは最低2バイト)。
両端で同時に無効にすれば隣接は落ちません。落ちるのは片側だけ無効にしてMTUが食い違う場合で、IS-ISの隣接関係の確立と状態遷移で解説しています。
パディングありのIIHは、固定部のPDU lengthが1497です。
ISIS HELLO
.... ..01 = Circuit type: Level 1 only (0x1)
0000 00.. = Reserved: 0x00
SystemID {Sender of PDU}: 0010.0100.1001
Holding timer: 30
PDU length: 1497
.100 0000 = Priority: 64
0... .... = Reserved: 0
SystemID {Designated IS}: 0030.0300.3003.01その後ろにTLV 8が6つ続きます。
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=149)
Type: 8
Length: 149l=255が5つとl=149が1つで、ヘッダー(Type 1バイト + Length 1バイト)を含めて(255+2)×5 + (149+2) = 1436バイトです。固定部とほかのTLVを足すとPDU lengthの1497になります。1つのTLVは最大255バイトなので、埋めるために同じTypeを繰り返しています。
STEP 4でLANの3台にhello-padding disableを投入します。
RP/0/RP0/CPU0:R1#show configuration commit changes last 1
Tue Oct 6 01:12:29.540 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router isis 1
interface GigabitEthernet0/0/0/0
hello-padding disable
!
!
endパディングが無くなり、IIHは78バイトのフレームになります。
ISIS HELLO
.... ..01 = Circuit type: Level 1 only (0x1)
0000 00.. = Reserved: 0x00
SystemID {Sender of PDU}: 0010.0100.1001
Holding timer: 30
PDU length: 61
.100 0000 = Priority: 64
0... .... = Reserved: 0
SystemID {Designated IS}: 0030.0300.3003.01
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.0.0.1
IS Neighbor(s) (t=6, l=12)
Type: 6
Length: 12
IS Neighbor: 52:54:00:6d:5f:df (52:54:00:6d:5f:df)
IS Neighbor: 52:54:00:fd:70:64 (52:54:00:fd:70:64)PDU lengthが61で、Padding(TLV 8)が1つもありません。tsharkでフレーム長を数えると、投入の前後がはっきり分かれます。
$ for s in 4 5; do
> echo "STEP $s"
> tshark -r isis-packet-step$s-lan.pcap -Y "isis.type==15" \
> -T fields -e frame.len 2>/dev/null | sort -n | uniq -c
> done
STEP 4
158 78
11 1514
STEP 5
9 78
162 1514STEP 4で78バイトが158個、STEP 5で元に戻して1514バイトが162個です。各STEPのキャプチャーは操作の前から始めているので、切り替わりの前後が同じファイルに入っています。
IOS XRのhello-paddingには4つの選択肢があります。
RP/0/RP0/CPU0:R1(config-isis-if)#hello-padding ?
adaptive Enable hello-padding till neighbor confirms adjacency up
always Always enable hello-padding
disable Disable hello-padding
sometimes Enable hello-padding during adjacency formation only検証Configおよびshow結果
各STEPで5台すべてから、次のファイルをルータごとに分けて取得しています。検証Configはこの..._run.txtです(最終状態は最後のSTEPのもの)。
| ファイル | 内容 |
|---|---|
..._show.txt | show version / show interface description / show routeと、show isis系一式(neighbors / database / database detail / database verbose / interface / interface brief / adjacency detail / topology / statistics / routeなど)、show running-config router isis |
..._ping.txt | そのSTEPのpingとtraceroute(LAN内、エリア内のp2pごし、エリアをまたぐ3通り) |
..._clear.txt | showの前にクリアしたインタフェース統計(クリアした時刻と対象) |
..._commit.cfg | そのSTEPで実際にcommitされた設定だけ。設定を変えたルータの分のみ |
..._restart.txt | process restart isisの記録(前後のshow clock付き)。STEP 1と2のみ |
..._log.txt | そのSTEPの範囲だけに絞ったshow logging |
..._run.txt | そのSTEP時点のshow running-config(=そのSTEPの検証Config) |
..._trace.txt | show isis trace standard | include ADJ |
最終状態(STEP 6)のrouter isis設定は、5台とも初期状態(STEP 0)と完全に同一です。
STEP 0:初期状態
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | — | — | log | run | trace |
| R2 | show | ping | clear | — | — | log | run | trace |
| R3 | show | ping | clear | — | — | log | run | trace |
| R4 | show | ping | clear | — | — | log | run | trace |
| R5 | show | ping | clear | — | — | log | run | trace |
STEP 1:全5台で process restart isis
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | — | restart | log | run | trace |
| R2 | show | ping | clear | — | restart | log | run | trace |
| R3 | show | ping | clear | — | restart | log | run | trace |
| R4 | show | ping | clear | — | restart | log | run | trace |
| R5 | show | ping | clear | — | restart | log | run | trace |
STEP 2:R1だけprocess restart isis
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | — | restart | log | run | trace |
| R2 | show | ping | clear | — | — | log | run | trace |
| R3 | show | ping | clear | — | — | log | run | trace |
| R4 | show | ping | clear | — | — | log | run | trace |
| R5 | show | ping | clear | — | — | log | run | trace |
STEP 3:R5のLoopback1をIS-ISに入れる
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | — | — | log | run | trace |
| R2 | show | ping | clear | — | — | log | run | trace |
| R3 | show | ping | clear | — | — | log | run | trace |
| R4 | show | ping | clear | — | — | log | run | trace |
| R5 | show | ping | clear | commit | — | log | run | trace |
STEP 4:LANの3台にhello-padding disable
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | commit | — | log | run | trace |
| R2 | show | ping | clear | commit | — | log | run | trace |
| R3 | show | ping | clear | commit | — | log | run | trace |
| R4 | show | ping | clear | — | — | log | run | trace |
| R5 | show | ping | clear | — | — | log | run | trace |
STEP 5:hello-paddingを戻す
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | commit | — | log | run | trace |
| R2 | show | ping | clear | commit | — | log | run | trace |
| R3 | show | ping | clear | commit | — | log | run | trace |
| R4 | show | ping | clear | — | — | log | run | trace |
| R5 | show | ping | clear | — | — | log | run | trace |
STEP 6:R5のLoopback1を外す(最終状態)
| ルータ | show出力 | ping / traceroute | clear | 投入した設定 | プロセス再起動 | syslog | running-config | trace |
|---|---|---|---|---|---|---|---|---|
| R1 | show | ping | clear | — | — | log | run | trace |
| R2 | show | ping | clear | — | — | log | run | trace |
| R3 | show | ping | clear | — | — | log | run | trace |
| R4 | show | ping | clear | — | — | log | run | trace |
| R5 | show | ping | clear | commit | — | log | run | trace |
パケットキャプチャーはSTEPごとに3区間で取得しています。
| STEP | LAN(R1-R2-R3) | R3-R4間(同じエリアのp2p) | R4-R5間(エリアをまたぐp2p) |
|---|---|---|---|
| 0 | pcap | pcap | pcap |
| 1 | pcap | pcap | pcap |
| 2 | pcap | pcap | pcap |
| 3 | pcap | pcap | pcap |
| 4 | pcap | pcap | pcap |
| 5 | pcap | pcap | pcap |
| 6 | pcap | pcap | pcap |
参考
| 資料 | 該当箇所 |
|---|---|
| ISO/IEC 10589:2002(第2版) | 9.1(符号化の一般規則)、9.4(PDUの種類)、9.5〜9.13(9種類それぞれのフォーマット)、8.2.4 / 8.4.2(IIHのパディング)、8.4.5(DISの選出)、表2(IntradomainRouteingPD)、表9(マルチキャストアドレス) |
| RFC 5309 | 4.1(イーサネット上のポイントツーポイントで使う宛先アドレス) |
| RFC 1195 / RFC 5301 / RFC 5303 / RFC 5306 | IETFが追加したTLV(129 / 132 / 137 / 211 / 240) |
| ISO/TR 9577 | ネットワーク層プロトコル識別子(0x83の割り当て元) |
関連記事
- IS-ISとは
- IS-ISのNSAPアドレスとNET(System ID)
- IS-ISの複数エリアアドレス(マルチホーミング)とエリアの統合・分割
- IS-ISのレベル1とレベル2(階層構造)
- IS-ISパケットの種類とヘッダーフォーマット
- IS-ISの隣接関係の確立と状態遷移
- IS-ISのDISと疑似ノード(Pseudonode)
- IS-ISのネットワークタイプ(broadcast / point-to-point)
- IS-ISのメトリック(narrow / wide)
- IS-ISの認証(hello-password / lsp-password)
- IS-ISのLSPとリンクステートデータベース
- IS-ISの主要TLV
- IS-ISのフラッディングとLSDB同期
- IS-ISのSPF計算と経路選択
- IS-ISのECMP(等コストマルチパス)
- IS-ISのATTビットとレベル1のデフォルトルート
- IS-ISのルートリークとup/downビット
- IS-ISの経路集約
- IS-ISのオーバーロードビット
- IS-ISのIPv6対応とマルチトポロジ(TLV 236 / MT ID 2)
- IS-ISのHelloとHolding Time
- IS-ISの収束タイマー(SPF / LSP生成)
- IS-ISのフラッディングのタイマー(LSP送信間隔・再送・CSNP / PSNP)
- IS-ISのリンク障害と経路切り替え
- IS-ISへの再配布(connected / static)
- IS-ISへのBGP経路の再配布