Intermediate System to Intermediate System IS-IS

1. Definitions

Intermediate System to Intermediate System IS-IS is an internal gateway protocol IGP, used inside an AS. IS-IS is a link state protocol, using shortest path first (SPF) algorithm for route calculation.

2. ISIS Basic Concepts

2.1 IS-IS topology

To support large scale routing networks, IS-IS uses a non-backbone area and backbone regional levels of hierarchical deployment within an autonomous system. Generally, the level-1 routers deployed in a non-backbone areas, level-2 and level-1-2 routers deployed in the backbone routers. Each non-backbone area are connected by a level-1-2 router to the backbone.
As shown below is a network running IS-IS protocol, multi-area networks it is very similar to OSPF topology. The entire area contains all backbone routers in area1, further comprising a level-1-2 router other regions.
avitor

Below is another topology of IS-IS. In this topology, level-2 level router is not in the same area, but rather belong to different regions. At this time, all the physically continuous level-1-2 router, and level-2 constitutes the backbone of the IS-IS area.
avitor

2.2 IS-IS to OSPF differences:

1. In IS-IS, each router only belong to one area; In OSPF, a router may belong to different regions of different interfaces.
2. In IS-IS, a single region with no concept of the backbone of the non-backbone area; in OSPF, is defined as the backbone Area0 region.
3. In IS-IS, level-1 level-2 levels and use the SPF routing algorithm to generate the shortest path tree the SPT; OSPF, SPF algorithm is used only in the same area, inter-area routing requires be forwarded by the backbone area.

Classification 2.3 IS-IS router

1.level-1 router
level-1 router is responsible for routing within the area, only the neighbor relationship with the level-1 and level-1-2 routers belong to the same region, level-1 routers in different areas can not establish neighbor relationships.
level-1 router only level-1 maintains the LSDB The LSDB contains routing information in the region, outside the region to forward packets to the nearest level-1-2 router.
2.level-2 router
level-2 router is responsible for routing between the areas, it can form a neighbor relationship with the same or a different region of level-2 or level-1-2 router router other regions. level-2 router maintains a level-2 LSDB The LSDB contains routing information between regions.
All level-2 level (that is, the formation of level-2 neighbor relationship) of routers backbone routing domain, responsible for communication between different regions. Level-2 routing domain level router must be physically connected, to ensure the continuity of the backbone network. Only level-2 level router data packets or routing information can be exchanged directly with the router outside the region.
3.level-1-2 router
belongs router level-1 and level-2 is called a level-1-2 router, it can form a level-1 and level-1 and level-1-2 routers in the same area neighbor relationship, neighbor relationship may be the level-2 and level-2 and level-1-2 routers in other areas. level-1 router must be connected to other areas through to level-1-2 router.
level-1-2 router maintains two LSDB, level-1 LSDB is for routing within the area, LSDB level-2 for inter-area routes.

2.4 IS-IS network type

IS-IS network supports only two types, according to the physical link divided into:
1. broadcast link : as Ethernet, token-ring and the like.
2. The point to point link : such as PPP, HDLC and the like.
For NBMA networks, you need to configure Layer 3 sub-interfaces, and pay attention to three sub-interface type should be P2P .
IS-IS can not run on a multipoint P2MP.

2.5 DIS and the dummy node

In the broadcast network, IS-IS needs to elect a DIS router as in all routers. DIS creates and updates dummy nodes, and is responsible for generating the pseudo node the LSP link state unit, which is used to describe the network equipment on the network.
Pseudo node is a virtual node for analog broadcasting network, not a real router. In the IS-IS, the DIS and the system ID of one byte Circuit ID (a non-zero value)
avitor

Pseudo-node network topology is simplified, a smaller LSP packets generated by the router. In addition, when the network changes, the number of LSP will need to produce less, SPF reducing resource consumption.
level-1 DIS and level-2 are elected, the user can set different priorities for different level DIS. DIS biggest priority is elected as the DIS. If the router with the highest priority value of more than one, the highest MAC address of the router will be selected. IDS different sectors can be a router, the router may be different.

2.6 IS-IS DR distinction DIS protocol and the OSPF protocol:

1.在IS-IS广播网络中,优先级为0的路由器也参与DIS的选举,而在OSPF中优先级为0的路由器不参加DR选举。
2.在IS-IS广播网络中,当有新的路由器加入,并符合成为DIS的条件时,这个路由器会被选中为新的DIS,原有的伪节点被删除。此更改会引起一组新的LSP泛洪。而在OSPF中,当一台新的路由器加入后,即使它的DR优先级最大,也不会立即成为该网段中的DR。
3.在IS-IS广播网络中,同一网段上的同一级别的路由器之间都会形成邻接关系,包括所有的非DIS路由器之间也会形成邻接关系。而在OSPF中,路由器只与DR和BDR建立邻接关系。

3. IS-IS的地址结构

网络服务访问点NSAP是OSI协议中用于定位资源的地址。NSAP的地址结构如下图,它由IDP和DSP组成。IDP和DSP的长度是可变的,NSAP总长最多是20个字节,最少是8个字节。
IDP相当于IP地址中的主网络号。它是由ISO规定,并由AFI和IDI两部分组成。AFI表示地址分配机构和地址格式,IDI用来标识域。
DSP相当于IP地址中的子网号和主机地址。它由high order DSP,system ID 和SEL三部分组成。high order DSP用来分割区域,system ID用来区分主机,SEL用来指示服务类型。
avitor

3.1 area address

IDP和DSP中的high order DSP一起,既能标识路由域,也能标识路由域中的区域,因此,它们一起被称之为区域地址,相当于OSPF中的区域编号。同一level-1区域内的素有路由器必须具有相同的区域地址,level-2区域内的路由器可以具有不同的区域地址。
一般情况下,一个路由器只需要配置一个区域地址,且同一区域中所有节点的区域地址都要相同。为了支持区域的平滑合并,分割及转换,在设备的实现中,一个IS-IS进程下最多可配置3个区域地址。

3.2 system ID

system ID
用来在区域内唯一标识主机或路由器。在设备的实现中,它的长度固定为48bit(6字节)。
在实际应用中,一般使用router id与system is进行对应。假设一台路由器使用接口loopback0的IP地址为192.168.1.1作为route id,则它在IS-IS中使用的system ID可通过如下方法转换得到:
1.将IP地址192.168.1.1的每个十进制数都扩展为3位,不足3位的在前面补0,得到192.168.001.001
2.将扩展后的地址分为3部分,每部分由4位数字组成,得到1921.6800.1001。重新组合的就是system ID。
使用systemID的指定可以有不同的办法,但要保证能够唯一标识主机或路由器。

SEL
SEL的作用类似IP中的“协议标识符”,不同的传输协议对应不同的SEL。在IP上SEL均为00.

网络实体名称NET(network entity title)
指的是设备本身的网络层信息,可以看作是一类特殊的NSAP(SEL=00)。NET的长度与NSAP的相同,最多为20个字节,最少为8个字节。在路由器上配置IS-IS时,只需要考虑NET即可,NSAP可不必去关注。
例如有NET为:ab.cdef.1234.5678.9abc.00,其中area address为ab.cdef,system ID为1234.5678.9abc,SEL为00。

4. IS-IS的报文类型

IS-IS报文有以下几种类型:HELLO PDU(protocol data unit),LSP和SNP
1.hello PDU
hello报文用于建立和维持邻居关系,也称为IIH(IS-to-IS Hello PDUs)。其中广播网络中的level-1 IS-IS使用level-1 LAN IIH;广播网络中的level-2 IS-IS使用level-2 LAN IIH;非广播网络中则使用P2P IIH.
2.LSP
链路状态报文LSP用于交换链路状态信息。LSP分为两种:level-1 LSP和level-2 LSP。level-1 LSP由level-1 IS-IS传送,level-2 LSP由level-2 IS-IS传送,level-1-2 LSP则可传送以上两种LSP。
3.SNP
序列号报文SNP通过描述全部或部分数据库中的LSP来同步各LSDB,从而维护LSDB的完整与同步。

5. IS-IS基本原理

IS-IS是一种链路状态路由协议,每一台路由器会生成一个LSP,它包含了路由器所有使能IS-IS协议接口的链路状态信息。通过跟相邻设备建立IS-IS邻接关系,互相更新本地设备的LSDB,可以使得LSDB与整个IS-IS网络的其他设备的LSDB实现同步。然后根据LSDB运用SPF算法计算出IS-IS路由。如果此IS-IS路由是到目的地址的最优路由,则此路由会下发到IP路由表中,并指导报文的转发。

5.1 IS-IS邻居关系的建立

两台运行IS-IS的路由器在交互协议报文实现路由功能之前必须首先建立邻居关系。在不同类型的网络上,IS-IS的邻居建立方式并不相同。
1.广播链路邻居关系的建立
下图以level-2路由器为例,描述了广播链路中建立邻居关系的过程。level-1路由器之间建立邻居与此相同
avitor

a.routeA广播发送level-2 LAN IIH,此报文中无邻居标识。
b.routeB收到此报文后,将自己和routeA的邻居关系标识为inittal。然后,routeB再向routerA回复level-2 LAN IIH,此报文中标识RouterA与RouterB的邻居。
c.routerA收到此报文后,将自己与routerB的邻居关系标识为UP。然后routerA再向routerB发送一个标识routerB为routerA邻居的level-2 LAN IIH。
d.routerB收到此报文后,将自己与routerA的邻居状态标识为UP。这样,两个路由器成功建立邻居关系。
因为是广播网络,需要选举DIS,所以在邻居关系建立后,路由器会等待两个hello报文间隔,再进行DIS选举。hello报文中包含priority字段,priority值最大的将被选举为广播网中的DIS。若优先级相同,接口MAC地址较大的被选举为DIS。

2.P2P链路邻居关系的建立
在P2P链路上,邻居关系的建立不同于广播链路。分为两次握手机制和三次握手机制。
两次握手机制
只要路由器收到对端发来的hello报文,就单方面宣布邻居为up状态,建立邻居关系。
三次握手机制
此方式通过三次发送P2P的IS-IS hello PDU最终建立起邻居关系,类似广播邻居关系的建立。
两次握手机制存在明显的缺陷。当路由器间存在两条及以上的链路时,如果某条链路上到达对端的单项状态为DOWN,而另一条链路同方向的状态为UP,路由器之间还是能建立起邻接关系。SPF在计算时会使用状态为UP的链路上的参数,这就导致没有检测到故障的路由器在转发报文时仍然试图通过状态为down的链路。三次握手机制解决了上述不可靠点到点链路中存在的问题。在这种方式下,路由器只有在知道邻居路由器也接收到它的报文时,才宣布邻居路由器处于UP状态,从而建立邻居关系。

3.IS-IS按如下原则建立邻居关系:
只有同一层次的相邻路由器才有可能成为邻居。
对于level-1路由器来说,区域号必须一致。
链路两端IS-IS接口的网络类型必须一致。
链路两端IS-IS接口的地址必须处于同一网段。
由于IS-IS是直接运行在数据链路层上的协议,并且最早设计师给CLNP使用的,IS-IS邻居关系的形成与IP地址无关。但在实际的实现中,由于只在IP上运行IS-IS,所以是要检测对方的IP地址的。如果接口配置了从IP,那么只要双方有某个IP在同一网段,就能建立邻居,不一定要主IP相同。

5.2 IS-IS的LSP交互过程

LSP产生的原因
IS-IS路由域内的所有路由器都会产生LSP,以下事件会触发一个新的LSP
邻居up或down
IS-IS相关接口up或down
引入的IP路由发生变化
区域间的IP路由发生变化
接口被赋了新的metric值
周期性更新

5.2.1 收到邻居新的LSP的处理过程

1.将接受的新的LSP合入到之间的LSDB数据库中,并标记为flooding。
2.发送新的LSP到除了收到该LSP的接口之外的接口。
3.邻居再扩散到其他邻居。

5.2.2 LSP的泛洪

LSP报文的泛洪是指当一个路由器向相邻路由器通告自己的LSP后,相邻路由器再将同样的LSP报文传送到除发送该LSP的路由器外的其他邻居,并这样逐级将LSP传送到整个层次内所有路由器的一种方式。通过这种泛洪,整个层次内的每一个路由器就都可以拥有相同的LSP信息,并保持LSDB同步。

每一个LSP都拥有一个标识自己的4字节的序列号。在路由器启动时所发送的第一个LSP报文中的序列号为1,以后当需要生成新的LSP时,新LSP的序列号在前一个LSP序列号的基础上加1.更高的序列号意味着更新的LSP。

5.2.3 广播链路中新加入路由器与DIS同步LSDB数据库的过程

avitor
1.如图所示,新加入的路由器RouterC首先发送hello报文,与该广播域中的路由器建立邻居关系。
2.建立邻居关系之后,routerC等待LSP刷新定时器超时,然后将自己的LSP发往组播地址(level-1:01-80-C2-00-00-14; level-2:01-80-C2-00-00-15)。这样网络上所有的邻居都收到该LSP
3.该网段中的DIS会把收到routerC的LSP加入到LSDB中,并等待CSNP报文定时器超时并发送CSNP报文,进行该网络内的LSDB同步。
4.routerC收到DIS发送来的CSNP报文,对比自己的LSDB数据库,然后向DIS发送PSNP报文请求自己没有的LSP
5.DIS收到该PSNP报文请求后向routerC发送对应的LSP进行LSDB的同步。

在上述过程中DIS的LSDB更新过程如下:
1.DIS接收到LSP,在数据库中搜索对应的记录。若没有该LSP,则将其加入数据库,并广播新数据库内容。
2.若收到的LSP序列号大于本地LSP的序列号,就替换为新报文,并广播新数据库内容,若收到的LSP序列号小于本地LSP的序列号,就向入端接口发送本地LSP报文。
3.若两个序列号相等,则比较remaining lifetime。若收到的LSP的remaining lifetime小于本地LSP的remaining lifetime,就替换为新报文,并广播新数据库内容;若收到的LSP的remaining lifetime大于本地LSP的remaining lifetime,就向入端接口发送本地LSP报文。
4.若两个序列号和remaining lifetime都相等,则比较checksum。若收到的LSP的checksum大于本地LSP的checksum,就替换为信报文,并广播新数据库内容;若收到的LSP的checksum小于本地LSP的checksum,就向入端接口发送本地LSP报文。
5.若两个序列号,remaining lifetime和checksum都相等,则不转发该报文。

5.2.4 P2P链路上LSDB数据库的同步过程

avitor
1.routerA先与routerB建立邻居关系
2.建立邻居关系之后,routerA和routerB会先发送CSNP给对端设备。如果对端的LSDB与CSNP没有同步,则发送PSNP请求索取响应的LSP。
3.如图所示,假定routerB想routerA索取相应的LSP。routerA发送routerB请求的LSP的同时启动LSP重传定时器,并等待routerB发送的PSNP作为收到LSP的确认。
4.如果在接口LSP重传定时器超时后,routerA还没有收到routerB发送的PSNP报文作为应答,则重新发送该LSP直至收到PSNP报文。

In the P2P link LSDB update process equipment as follows:
1. If the received LSP than the local serial number is smaller, the local LSP is sent directly to each other, and then wait for the other to its own packet as a PSNP acknowledgment; if received LSP to greater than the local serial number, then this new LSP into their LSDB, and then to confirm receipt of this LSP through a PSNP packets, and then finally sent to the new LSP addition to sending the LSP neighbors than the neighbors.
2. If the received LSP local sequence number and the same, the remaining lifetime, if the received LSP is smaller than the remaining lifetime Lifetime of local LSP, the LSP is stored in the LSDB will receive and send packets to recognize revenue PSNP this LSP, then send the LSP to its neighbors except the neighbor to send the LSP; if the received LSP is greater than the remaining lifetime of the remaining lifetime local LSP, the LSP is sent directly to each other locally, and then wait for the other to himself a PSNP packets as confirmation.
3. LSOP local LSP if the received sequence number and the same remaining lifetime is not 0, the checksum comparison, if the received LSP is greater than the local LSP checksum is checksum, then stores the received LSP and transmitted LSDB PSNP message to confirm the receipt of this LSP, the LSP sends the fuel to its neighbors except the neighbor to send the LSP; if the received LSP is smaller than the local checksum is checksum LSP, the LSP is sent directly to each other locally, and then waiting for the other to give yourself a PSNP packets as confirmation.
4. If the received LSP and LSP local sequence number, remaining lifetime, and the same checksum, the packet is not forwarded

Guess you like

Origin www.cnblogs.com/Doc-Yu/p/12095761.html