WOLF-LAB沃尔夫网络实验室中国网络精英的发源地!
24小时咨询热线:173-1636-2402

技术文档

Technical documentation

您当前位置: 首页 > 技术文档 > 详情

​WOLFLAB HCIE Datacom理论学习文档分享-ISIS的报文详解

发布日期:2022-06-22 浏览次数:1202 来源:崔志鹏

WOLFLAB HCIE Datacom理论学习文档分享-ISIS的报文详解

HCIE学习联系客服VX:17316362402,领取试听课资料

报文解析:

1、ISIS是基于数据链路层之上的网络层协议,二层封装802.3以太;

图片 1.png


广播型链路:

L1的ISIS报文发向的DMAC: 01:80:c2:00:00:14

L2的ISIS报文发向的DMAC: 01:80:c2:00:00:15

以太链路如果将网络类型改成P2P:正经的P2P二层不封装MAC

所有的isis报文发向的DMAC:09:00:2b:00:00:05

 

2、ISIS的头部信息:

ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol

    Intradomain Routing Protocol Discriminator: ISIS (0x83)        //域内路由协议区分符0X83,用来代表这个协议就是ISIS协议0X83

    Length Indicator: 27                                     //头部长度,表示不算TLV,isis的头部长度有多长

    Version/Protocol ID Extension: 1                           //isis的版本号

    ID Length: 6                                           //system id的长度

    000. .... = Reserved: 0x0                                  //保留字段

    ...1 0000 = PDU Type: L2 HELLO (16)                        //PDU的类型为L2的hello包

    Version: 1                                             //isis的版本号

    Reserved: 0                                            //保留

    Maximum Area Addresses: 3                               //最大支持的NET地址的数量

 

3、广播型链路ISIShello包的信息:

ISIS HELLO

    .... ..10 = Circuit type: Level 2 only (0x2)                       //路由器的级别

    0000 00.. = Reserved: 0x00                                 //保留

    SystemID {Sender of PDU}: 0000.0000.0001                    //自己的system id

    Holding timer: 30                                         //hold timer时间默认是hello时间的3倍,hello时间为10s

    PDU length: 1497                                         //报文的长度

    .100 0000 = Priority: 64                                    //用于DIS的选举

    0... .... = Reserved: 0                                      //保留

    SystemID {Designated IS}: 0000.0000.0001.01                  //伪节点的system id.伪节点标识符



注意:路由器的级别

如果是level-1的路由器取值0X1,level-2的路由器取值为0X2,跟链路级别无关;

如果是level1-2的路由器跟接口的链路级别取交集,交出来的结果如果是level-1取值0X1,交出来的结果如果是level-2取值0X2;

如果是level1-2的路由器接口的链路级别也是level1-2,则取值为0X3;

 

-----------------------------------------------------------------

上面都是固定的必须存在,下面就是TLV,ISIS协议是基于TLV机制来携带各项属性的

T:类型

L:长度

V:取值

TLV机制允许路由协议只携带需要的属性,不需要的属性可以不携带,扩展性强,如果协议需要支持新的特性,则只需要开发新的TLV属性即可支持。

    Area address(es) (t=1, l=2)                                //描述自己所在的区域

        Type: 1

        Length: 2

        Area address (1): 49

    IS Neighbor(s) (t=6, l=6)                                  //邻居接口的mac地址

        Type: 6

        Length: 6

        IS Neighbor: HuaweiTe_78:03:fa (00:e0:fc:78:03:fa)

    IP Interface address(es) (t=132, l=4)                       //互联接口的地址,hello包中只包含发送hello的接口地址,来判断互联地址是否在同一网段LSP中包含自己所有运行了ISIS的接口地址;

        Type: 132

        Length: 4

        IPv4 interface address: 1.1.12.1

    Protocols Supported (t=129, l=1)                          //支持IP地址簇,集成的ISIS为IP协议做路由计算

        Type: 129

        Length: 1

        NLPID: IP (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

    Multi Topology (t=229, l=2)                               //多TOP的支持,现在支持IPV4的单播拓扑

        Type: 229

        Length: 2

        IPv4 Unicast Topology (0x000)

    Padding (t=8, l=255)                                    //填充字段,全部用0填充的,填充到这个接口的MTU大小

        Type: 8

        Length: 255

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=153)

 

padding字段有什么用?

isis作为链路状态协议,一个重要的原则是要保证整个网络中所有设备的lsdb数据库保持完全一致,isis报文发送和接收过程是没有分片的概念的,也就是说接口的mtu决定了可以收到的lsp的最大长度。

 

举个例子,a与b建立isis邻居。但a的接口mtu为1000, b的接口mtu为2000, b的lsdb中有一条长度为1500的lsp。在这种情况下,这条lsp发到a是要丢弃的,因为超过了a的接口mtu。结果是a与b的lsdb就不一致了。

 

解决方案就是把hello报文填充到接口的mtu长度。b的hello报文全部长度现在是2000,发到a就丢弃了。建不起来isis邻居,自然不会有不—致的现象。

 

建不起来邻居可以识别出来继而修改不一致的mtu,而数据库不一致导致的后果完全无法预见,是无法接受的。

注意:经自己实验修改接口的MTU要是小于1500,根本就不发送hello报文;

 

4、P2P的hello

Point-to-Point Protocol

    Address: 0xff

    Control: 0x03

    Protocol: OSI Network Layer (0x0023)

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: 6

    000. .... = Reserved: 0x0

    ...1 0001 = PDU Type: P2P HELLO (17)                           //点到点hello

    Version: 1

    Reserved: 0

    Maximum Area Addresses: 3

ISIS HELLO

    .... ..10 = Circuit type: Level 2 only (0x2)

    0000 00.. = Reserved: 0x00

    SystemID {Sender of PDU}: 0000.0000.0001

    Holding timer: 30

    PDU length: 1497

    Local circuit ID: 1                                           //链路id,经自己实验:isis会为每一个运行了isis的接口分配一个cir id,网络类型相同的接口分配的cir id一定是不同的,如果一个接口的网络类型是p2p,一个接口是brocast,那么此时分配的cir id可能相同,不过无所谓,因为cir id主要是用在P2P网络建立邻居代替mac地址的标识邻居的, 无论是以太链路还是以太改p2p还是正经的p2p只要运行isis就一定会该接口分配一个cir id,loop接口默认网络类型P2P,也有cir id;

    Area address(es) (t=1, l=2)

    IP Interface address(es) (t=132, l=4)

    Protocols Supported (t=129, l=1)

    Restart Signaling (t=211, l=3)

    Point-to-point Adjacency State (t=240, l=5)                      //P2P的邻接状态TLV

        Type: 240

        Length: 5

        Adjacency State: Down (2)                               //自己的状态

        Extended Local circuit ID: 0x00000001                     //自己接口的cir id

    Multi Topology (t=229, l=2)

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=255)

    Padding (t=8, l=161)

 

注意:

@如果我收到对端的hello报文,就会将对端的信息放在240TLV里面:

Point-to-point Adjacency State (t=240, l=15)

    Type: 240

    Length: 15

    Adjacency State: Initializing (1)

    Extended Local circuit ID: 0x00000001

    Neighbor SystemID: 0000.0000.0001                         //对端的system id

    Neighbor Extended Local circuit ID: 0x00000001                //对端接口的cir id

@无论是bro改成P2P还是正经的P2P链路只有第一次发送hello报文的时候会有填充字段,后续的hello报文是没有填充字段的,因为P2P的链路通告带宽低,节约带宽;

@两次握手的P2P hello不携带240 tlv;

 

5、CSNP:

R1发送的CSNP:

Frame 40: 71 bytes on wire (568 bits), 71 bytes captured (568 bits) on interface -, id 0

Point-to-Point Protocol

ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol

ISO 10589 ISIS Complete Sequence Numbers Protocol Data Unit

    PDU length: 67

    Source-ID: 0000.0000.0001

    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=32)

        Type: 9

        Length: 32

        LSP Entry

            LSP Sequence Number: 0x0000000c

            Remaining Lifetime: 1191

            LSP checksum: 0x4a16

        LSP-ID: 0000.0000.0001.00-00

 

注意:CSNP就是六元组

 

6、PSNP:

Frame 35: 39 bytes on wire (312 bits), 39 bytes captured (312 bits) on interface -, id 0

Point-to-Point Protocol

ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol

ISO 10589 ISIS Partial Sequence Numbers Protocol Data Unit

    PDU length: 35

    Source-ID: 0000.0000.0002

    Source-ID-Circuit: 00

    LSP entries (t=9, l=16)

        Type: 9

        Length: 16

        LSP Entry

            LSP Sequence Number: 0x0000000c

            Remaining Lifetime: 1194

            LSP checksum: 0x4a16

        LSP-ID: 0000.0000.0001.00-00

 

注意:PSNP就是六元组,seq=0表示请求,seq不等于0表示确认

 

7、LSP:narrow

Frame 32: 88 bytes on wire (704 bits), 88 bytes captured (704 bits) on interface -, id 0

Point-to-Point Protocol

ISO 10589 ISIS InTRA Domain Routeing Information Exchange Protocol

ISO 10589 ISIS Link State Protocol Data Unit

    PDU length: 84

    Remaining lifetime: 1195

    LSP-ID: 0000.0000.0001.00-00

    Sequence number: 0x0000000c

    Checksum: 0x4a16 [correct]

    [Checksum Status: Good]

    Type block(0x03): Partition Repair:0, Attached bits:0, Overload bit:0, IS type:3           //这条LSP的相关BIT位

        0... .... = Partition Repair: Not supported

        .000 0... = Attachment: 0

            .... 0... = Error metric: Not set

            .... .0.. = Expense metric: Not set

            .... ..1. = Delay metric: Set

            .... ...1 = Default metric: Set

        .... .0.. = Overload bit: Not set

        .... ..11 = Type of Intermediate System: Level 2 (3)

    Protocols supported (t=129, l=1)                                                                      

    Area address(es) (t=1, l=2)

    IS Reachability (t=2, l=12)                                                      //描述拓扑信息,R1表明自己P2P的连着02的路由器,因为最后为00,

如果是广播型链路R1会说自己连着伪节点,最后肯定不为00

        Type: 2

        Length: 12

        Reserved: 0x00

        IS Neighbor: 0000.0000.0002.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: 0000.0000.0002.00

    IP Interface address(es) (t=132, l=8)                                             //会把自己所有运行isis的接口地址携带出去

        Type: 132

        Length: 8

        IPv4 interface address: 1.1.1.1

        IPv4 interface address: 1.1.12.1

    IP Internal reachability (t=128, l=24)                                            //携带自己的路由信息

        Type: 128

        Length: 24

        IPv4 prefix: 1.1.1.1/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: 1.1.12.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


注意:

@如果使用的cost-type是默认的narrow度量值,针对内部路由使用128TL携带,针对外部路由使用130TLV携带;

@在报文中内部路由会显示INTERNAL,外部路由会显示EXTERNAL,其他的bit都一样;(这里的INTERNAL和EXTERNAL是显示引入外部路由metric的类型的,不是用来区分内部和外部路由的)

@内部路由始终都是INTERNAL,引入的外部路由才有INTERNAL和EXTERNAL的区分;

 

 

IP External reachability (t=130, l=12)

    Type: 130

    Length: 12

    IPv4 prefix: 192.168.1.0/24

        ..00 0000 = Default Metric: 0

        .1.. .... = Default Metric IE: External

        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

HCIE学习课程循环开班中,联系网站客服咨询上课情况

返回目录
在线咨询