「ISIS」- 报文格式

概览格式

ISIS 报文是直接封装在数据链路层的帧结构中的;

PDU(Protocol Data Unit,协议数据单元)分为两个部分:

1)报文头(ISIS Header):可分为,通用头部(PDU Common Header);专用头部(PDU Specific Header);
—- 对于所有 PDU 来说,PDU Common Header 都是相同的,但 PDU Specific Header 根据 PDU 类型不同而有所差别;

2)变长字段部分(Variable Length Fields);

Header: Common + Special

Part 1: PDU Common Header

Intradomain Routing Protocol Discriminator:域内路由选择协议鉴别符,固定为 0x83;

Length Indicator:IS-IS 头部的长度(包括通用头部和专用头部),以 Byte 为单位;

Version/Protocol ID Extension:版本 / 协议标识扩展,固定为 0x01;

System ID Length:NSAP 地址或 NET 中 System ID 区域的长度。值为 0 时,表示 System ID 区域的长度为 6Byte;

R(Reserved):保留,固定为 0;

PDU type:ISIS 报文类型;

Version:固定为 0x01;

Max.Areas:支持的最大区域个数。设置为 1~254 的整数,表示该 IS-IS 进程实际所允许的最大区域地址数;设置为 0,表示该 IS-IS 进程最大只支持 3 个区域地址数。

PDU type

IS-IS 的 PDU 整体分为 4 种类型:
1)IIH(ISIS Hello)⇒ 类似 OSPF Hello 报文;
2)CSNP(Complete Sequence Number PDU,全序列号报文)⇒ OSPF DD;
3)PSNP(Partial Sequence Number PDU,部分序列号报文)⇒ OSPF LSR;
4)LSP(Link State PDU,链路状态报文)⇒ OSPF LSU

与路由类型结合后,分为多种不同类型:

PDU Type    Description

15  	    L1 LAN IIH
16  	    L2 LAN IIH
17  	    P2P IIH

18  	    L1 LSP
20  	    L2 LSP

24  	    L1 CSNP
25  	    L2 CSNP

26  	    L1 PSNP
27  	    L2 PSNP

Part 2: PDU Specific Header

WIP

Payload: Variable Length Fields

数据结构

ISIS 报文的 Payload 部分,由若干 TLV(Type、Length、Value)组成,被称为变长字段(Variable Length Fields);

TLV 的含义是:
1)类型(TYPE),长度(LENGTH),值(VALUE);
2)实际上是个数据结构,这个结构包含三个字段;
3)TLV 也称为 CLV(Code-Length-Value);

ISIS 易于扩展的原因也在于此:
1)采用 TLV 使得报文的整体结构固定,增加新特性只需要增加新 TLV 即可,不需要改变整个报文的整体结构;

常见 TLV 数据

TLV Type Name PDU Type
1 Area Addresses 区域地址 IIH、LSP
2 IS Neighbors(LSP)中间系统邻接 LSP
4 Partition Designated Level2 IS 区域分段指定 L2 中间系统 L2 LSP
6 IS Neighbors(MAC Address)中间系统邻接 LAN IIH
7 IS Neighbors(SNPA Address)中间系统邻接 LAN IIH
8 Padding 填充 IIH
9 LSP Entries LSP 条目 SNP
10 Authentication Information 验证信息 IIH、LSP、SNP
128 IP Internal Reachability Information IP 内部可达性信息 LSP
129 Protocols Supported 支持的协议 IIH、LSP
130 IP External Reachability Information IP 外部可达性信息 LSP
131 Inter-Domain Routing Protocol Information 域间路由选择协议信息 L2 LSP
132 IP Interface Address IP 接口地址 IIH、LS

报文示例

in SRv6 / Locator Advertising

Frame 262: 270 bytes on wire (2160 bits), 270 bytes captured (2160 bits) on interface -, id 0
    Section number: 1
    Interface id: 0 (-)
        Interface name: -
        Interface description: Standard input
    Encapsulation type: Ethernet (1)
    Arrival Time: Jan  7, 1970 11:05:21.546000000 China Standard Time
    UTC Arrival Time: Jan  7, 1970 03:05:21.546000000 UTC
    Epoch Arrival Time: 529521.546000000
    [Time shift for this packet: 0.000000000 seconds]
    [Time delta from previous captured frame: 0.000000000 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
    [Time since reference or first frame: 129.140000000 seconds]
    Frame Number: 262
    Frame Length: 270 bytes (2160 bits)
    Capture Length: 270 bytes (2160 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:llc:osi:isis:isis.lsp]
    [Coloring Rule Name: Broadcast]
    [Coloring Rule String: eth[0] & 1]
IEEE 802.3 Ethernet 
    Destination: ISIS-all-level-2-IS's (01:80:c2:00:00:15)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
    Source: 38:39:cc:02:01:00 (38:39:cc:02:01:00)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Length: 256
    [Stream index: 3]
Logical-Link Control
    DSAP: ISO Network Layer (0xfe)
        1111 111. = SAP: ISO Network Layer
        .... ...0 = IG Bit: Individual
    SSAP: ISO Network Layer (0xfe)
        1111 111. = SAP: ISO Network Layer
        .... ...0 = CR Bit: Command
    Control field: U, func=UI (0x03)
        000. 00.. = Command: Unnumbered Information (0x00)
        .... ..11 = Frame type: Unnumbered frame (0x3)
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: 6
    000. .... = Reserved: 0x0
    ...1 0100 = PDU Type: L2 LSP (20)
    Version: 1
    Reserved: 0
    Maximum Area Addresses: 3
ISO 10589 ISIS Link State Protocol Data Unit
    PDU length: 253
    Remaining lifetime: 1199
    LSP-ID: 0000.0000.2222.00-00
    Sequence number: 0x0000001d
    Checksum: 0x3848 [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)
    Protocols supported (t=129, l=1)
        Type: 129
        Length: 1
        NLPID: IPv6 (0x8e)
            NLPID: 0x8e
    Multi Topology (t=229, l=2)
        Type: 229
        Length: 2
        IPv4 Unicast Topology (0x000)
    Area address(es) (t=1, l=4)
        Type: 1
        Length: 4
        Area address (3): 49.0001
    Extended IS reachability (t=22, l=22)
        Type: 22
        Length: 22
        IS Neighbor: 0000.0000.2222.01
            IS neighbor ID: 0000.0000.2222.01
            Metric: 10
            SubCLV Length: 0 (no sub-TLVs present)
        IS Neighbor: 0000.0000.3333.01
            IS neighbor ID: 0000.0000.3333.01
            Metric: 10
            SubCLV Length: 0 (no sub-TLVs present)
    Router Capability (t=242, l=21)
        Type: 242
        Length: 21
        Router ID: 0x00000000
        .... ...0 = S bit: False
        .... ..0. = D bit: False
        SRv6 Capability (t=25, l=2)
            Flags: 0x0000
                .0.. .... .... .... = OAM flag: Not set
                ..00 0000 0000 0000 = Reserved: 0x0000
        Node Maximum SID Depth (t=23, l=10)
            MSD Type: Maximum Segments Left (41)
            MSD Value: 10
            MSD Type: Maximum End Pop (42)
            MSD Value: 10
            MSD Type: Unknown (43)
            MSD Value: 10
            MSD Type: Maximum H.Encaps (44)
            MSD Value: 10
            MSD Type: Maximum End D (45)
            MSD Value: 10
    SRv6 Locator (t=27, l=22)
        Type: 27
        Length: 22
        0000 .... .... .... = Reserved: 0x0
        .... 0000 0000 0000 = Topology ID: Standard topology (0)
        SRv6 Locator: a002::/96 (Algorithm: 0)
            Metric: 0
            Flags: 0x00
                0... .... = Down flag: Not set
                .000 0000 = Reserved: 0x00
            Algorithm: Shortest Path First (SPF) (0)
            Locator Size: 96
            Locator: a002::
            SubCLV Length: 0
    IPv6 Interface address(es) (t=232, l=48)
        Type: 232
        Length: 48
        IPv6 interface address: 2000:12::2
        IPv6 interface address: 2000:23::2
        IPv6 interface address: 2000::2
    IPv6 reachability (t=236, l=90)
        Type: 236
        Length: 90
        IPv6 Reachability: 2000::2/128
            Metric: 0
            0... .... = Distribution: Up
            .0.. .... = Distribution: Internal
            ..0. .... = Sub-TLV: No
            Prefix Length: 128
            IPv6 prefix: 2000::2
            no sub-TLVs present
        IPv6 Reachability: 2000:12::/64
            Metric: 10
            0... .... = Distribution: Up
            .0.. .... = Distribution: Internal
            ..0. .... = Sub-TLV: No
            Prefix Length: 64
            IPv6 prefix: 2000:12::
            no sub-TLVs present
        IPv6 Reachability: 2000:23::/64
            Metric: 10
            0... .... = Distribution: Up
            .0.. .... = Distribution: Internal
            ..0. .... = Sub-TLV: No
            Prefix Length: 64
            IPv6 prefix: 2000:23::
            no sub-TLVs present
        IPv6 Reachability: 2000::1/128
            Metric: 10
            0... .... = Distribution: Up
            .0.. .... = Distribution: Internal
            ..0. .... = Sub-TLV: No
            Prefix Length: 128
            IPv6 prefix: 2000::1
            no sub-TLVs present
        IPv6 Reachability: a001::/96
            Metric: 10
            0... .... = Distribution: Up
            .0.. .... = Distribution: Internal
            ..0. .... = Sub-TLV: No
            Prefix Length: 96
            IPv6 prefix: a001::
            no sub-TLVs present