|
一、理论支持 除了OSPF,还有另外一个看上去很神秘的链路适量协议-ISIS IS-IS的意思是标识中间系统到中间系统,是为ISO无连接网络协议(ISO’s connectionless network protocol , CLNP)设计的路由选择协议 ISIS协议的时间和OSPF的时间基本同一时期,稍早或者稍迟一点,本意是支持从TCP/IP协议栈向OSI的转换,但是前者却成为了实际的工业标准,而现在更多的作为服务应用商网络的IGP的层面 集成的ISIS可以支持纯CLNP网络或者纯IP网络,或者同时运行CLNP和IP的双重网络。 一个中间系统可以是一台第1层的路由器(L1)、一台第2层的路由器(L2)或者两种类型皆是的路由器(Ll/L2)。 L1/2路由器类似于OSPF协议中的ABR路由器(更确切的标识邻居状态) L1/L2路由器必须同时维护一个L1的链路状态数据库和一个L2的链路状态数据库 Cisco路由器默认为一个L1/L2路由器 ISIS的AD值为115 二、拓扑描述IP地址说明,每个设备有一个环回口为XX.1.1.1,例如R1的环回口为11.1.1.1,比如R2上连接R3的地址为23.1.1.2/24,以此类推
三、实验步骤1、配置基本的ISIS,以及完成邻居 各路由器信息如下所示,系统ID采用设备编号 路由器 | | | | | 47.0001.0000.0000.0001.00 | | | 47.0001.0000.0000.0002.00 | | | 47.0002.0000.0000.0003.00 | | | 47.0002.0000.0000.0004.00 | | | 47.0001.0000.0000.0005.00 | | | 47.0001.0000.0000.0006.00 |
R1(config)#router isis R1(config-router)# net 47.0001.0000.0000.0001.00---黑色字体为区域ID部分(还可扩展到更多位),红色字体为系统ID(类似路由器ID,Router-ID),本例中为每个设备的号码 R1(config-router)# log-adjacency-changes---默认邻居信息不会显示,本命令方便查看日志 R1(config)#interface loopback 0 R1(config-if)#ip router isis ---接口下使能ISIS,在IPv4环境下只有isis(有些IOS的OSPF配置)可以在接口下激活ISIS R1(config-if)#int s1/1 R1(config-if)#ip router isis R1(config-if)#int e0/0 R1(config-if)#ip router isis ! R3(config)#router isis R3(config-router)# net 47.0002.0000.0000.0003.00---注意区域ID和R1不同,系统ID为设备编号 R3(config-router)# log-adjacency-changes R3(config)#interface loopback 0 R3(config-if)#ip router isis R3(config-if)#int e0/1 R3(config-if)#ip router isis R3(config-if)#int e0/0 R3(config-if)#ip router isis 请读者在其他设备上按照表格完成配置 查看ISIS的区域ID R4#sh clns protocol IS-IS Router: ---可以在router isis 之后加TAG,此处为空 System Id: 0000.0000.0004.00 IS-Type: level-1-2---很清晰,系统ID的情况以及路由器类型,默认为L1/L2 Manual area address(es): 47.0002 Routing for area address(es): 47.0002---区域ID的情况 Interfaces supported by IS-IS: Ethernet0/1 - IP Loopback0 - IP Redistribute: static (on by default) Distance for L2 CLNS routes: 110 RRR level: none Generate narrow metrics: level-1-2 Accept narrow metrics: level-1-2 Generate wide metrics: none Accept wide metrics: none 2、查看ISIS通告的路由以及其他一些信息 R5上查看邻居情况,默认情况下所有路由器都是L1/L2设备,所有R5同R1和R6都建立了L1和L2的邻居,当然由于和R1之间的链路是串行链路所有只会在一行中显示: R5#sh isis neighbors System Id Type Interface IP Address State Holdtime Circuit Id R6 L1 Et0/0 56.1.1.6 UP 8 R6.02 R6 L2 Et0/0 56.1.1.6 UP 9 R6.02 R1 L1L2 Se1/1 15.1.1.1 UP 25 00 还有一条等价的类似命令: R5#sh clns is-neighbors System Id Interface State Type Priority Circuit Id Format R6 Et0/0 Up L1L2 64/64 R6.02 Phase V R1 Se1/1 Up L1L2 0 /0 00 Phase V 同时我们还注意到,查看邻居的时候,在系统ID一列为每台设备的hostname,而不是我们配置的系统ID,这称之为动态主机名交换,当然我们可以查看与每台设备关联的系统ID: R5#sh isis hostname Level System ID Dynamic Hostname (notag) 1 0000.0000.0001 R1 1 0000.0000.0002 R2 2 0000.0000.0003 R3 2 0000.0000.0004 R4 * 0000.0000.0005 R5 2 0000.0000.0006 R6 ! 查看路由情况,路由已经全部学习到,但是由于该设备为L1/L2路由器,所以有L1和L2的路由: R5#sh ip route isis 34.0.0.0/24 is subnetted, 1 subnets i L2 34.1.1.0 [115/30] via 15.1.1.1, Serial1/1 33.0.0.0/24 is subnetted, 1 subnets i L2 33.1.1.0 [115/30] via 15.1.1.1, Serial1/1 66.0.0.0/24 is subnetted, 1 subnets i L1 66.1.1.0 [115/20] via 56.1.1.6, Ethernet0/0 22.0.0.0/24 is subnetted, 1 subnets i L1 22.1.1.0 [115/30] via 56.1.1.6, Ethernet0/0 [115/30] via 15.1.1.1, Serial1/1 10.0.0.0/24 is subnetted, 1 subnets i L1 10.1.1.0 [115/20] via 15.1.1.1, Serial1/1 26.0.0.0/24 is subnetted, 1 subnets i L1 26.1.1.0 [115/20] via 56.1.1.6, Ethernet0/0 11.0.0.0/24 is subnetted, 1 subnets i L1 11.1.1.0 [115/20] via 15.1.1.1, Serial1/1 44.0.0.0/24 is subnetted, 1 subnets i L2 44.1.1.0 [115/40] via 15.1.1.1, Serial1/1 ! 来观察数据库和伪节点的基本情况: R4#sh isis database IS-IS Level-1 Link State Database: LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL R3.00-00 0x00000008 0x72DE 909 1/0/0---在L1的数据库中,R3的ATT bit置位,表明它是唯一的L1层面上去往L2路由的设备 R3.03-00 0x00000006 0xB78D 680 0/0/0---R3为该广播网段的伪节点,因为加粗部分非零(倒数第二个八位组) R4.00-00 * 0x00000008 0x1DBF 747 1/0/0 IS-IS Level-2 Link State Database: LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL R1.00-00 0x0000000E 0x835B 1062 0/0/0 R2.00-00 0x0000000E 0x933D 1141 0/0/0 R3.00-00 0x00000009 0xF5F6 1124 0/0/0 R3.02-00 0x00000006 0x182B 938 0/0/0 R3.03-00 0x00000006 0x4786 1109 0/0/0 R4.00-00 * 0x00000009 0xBEB2 992 0/0/0 R5.00-00 0x0000000B 0xAC02 1138 0/0/0 R6.00-00 0x00000008 0xCDD5 549 0/0/0 R6.02-00 0x00000006 0x794E 888 0/0/0 3、修改ISIS的网络类型,以及isis优先级 ISIS只有两种网络类型:广播和点到点 R4(config)#int e0/1 R4(config-if)#isis network point-to-point---修改网络类型为点到点,R3未做修改 R4#clear isis *---清空ISIS R4#debug isis adj-packets *Mar 1 01:25:23.811: ISIS-Adj: Sending L2 LAN IIH on Loopback0, length 1514 *Mar 1 01:25:24.367: ISIS-Adj: Rec L2 IIH from cc03.a184.0001 (Ethernet0/1), cir type L1L2, cir id 0000.0000.0003.03, length 1497 *Mar 1 01:25:24.371: ISIS-Adj: Multi-point IIH received on point-to-point interface: ignored IIH---在一个点到点网络上收到一个多点的ISIS hello包,忽略了该报文 *Mar 1 01:25:25.159: ISIS-Adj: Rec L1 IIH from cc03.a184.0001 (Ethernet0/1), cir type L1L2, cir id 0000.0000.0003.03, length 1497 *Mar 1 01:25:25.163: ISIS-Adj: Multi-point IIH received on point-to-point interface: ignored IIH ! 修改R3的网络类型: R3(config)#int e0/1 R3(config-if)#isis network point-to-point *Mar 1 01:28:12.623: %CLNS-5-ADJCHANGE: ISIS: Adjacency to R4 (Ethernet0/1) Up, new adjacency---邻居马上建立起来 我们再来查看R4的邻居关系: R4#sh isis neighbors System Id Type Interface IP Address State Holdtime Circuit Id R3 L1L2 Et0/1 34.1.1.3 UP 23 00---此处的circuit ID已经显示为00,不再需要Dis IS-IS的Dis是可以抢占的,优先级最大的成为Dis。我们让R1成为伪节点: R1(config-if)#int e0/0 R1(config-if)#isis priority 100 R2# sh isis database l2 IS-IS Level-2 Link State Database: LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL R1.00-00 0x0000000D 0x4042 984 0/0/0 R1.01-00 0x00000001 0x4FFB 841 0/0/0—第二个八位组为非0,所以R1成为了了DIS(我们熟悉的DR) Dis选举原则: 1、接口优先级较高的成为Dis,默认为64,优先级为0时意为这优先级最低,但仍然有成为Dis的可能性,这点不同于ospf 2、如果优先级相同,那么最高的SNPA地址成为Dis(以太网为MAC地址,帧中继环境为DLCI) 4、修改路由器的类型小型网络可以接受同一台设备上既有L1也有L2,但是如果在一个大型网络中这是不可接收的 我们来调整一下,更改IS-IS路由器R4、R5、R6的路由器类型,使其成为一台L1的设备: R6(config)#router isis R6(config-router)#is-type level-1---更改路由器为一台纯粹的L1设备 *Mar 1 07:25:10.958: %CLNS-5-ADJCLEAR: ISIS: All adjacencies cleared---此时邻居会down,但会重新建立 R6#debug isis adj-packets *Mar 1 07:25:46.746: ISIS-Adj: Sending L1 LAN IIH on Ethernet0/0, length 1497---发送了L1的lan上的hello包 *Mar 1 07:25:47.482: ISIS-Adj: Rec L1 IIH from cc05.adc4.0000 (Ethernet0/0), cir type L1, cir id 0000.0000.0006.02, length 1497 ! 请自行更改R4和R5,做完配置之后的检验: R4#sh isis neighbors System Id Type Interface IP Address State Holdtime Circuit Id R3 L1 Et0/1 34.1.1.3 UP 29 00---和R3仅仅有L1的邻居关系 数据库也仅仅会剩下L1的信息: R4#sh isis database IS-IS Level-1 Link State Database: LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL R3.00-00 0x00000023 0xAA8D 817 1/0/0 R4.00-00 * 0x0000002A 0x1AAD 819 0/0/0 查看路由的情况 R4#sh ip route isis 33.0.0.0/24 is subnetted, 1 subnets i L1 33.1.1.0 [115/20] via 34.1.1.3, Ethernet0/1 10.0.0.0/24 is subnetted, 1 subnets i L1 10.1.1.0 [115/20] via 34.1.1.3, Ethernet0/1 i*L1 0.0.0.0/0 [115/10] via 34.1.1.3, Ethernet0/1---L1类似于OSPF的STUB区域,也会生成一条ISIS的默认路由,到达其他区域,此时不再看到L2的路由 查看该设备为一台L1的路由器: R4#sh clns protocol IS-IS Router: System Id: 0000.0000.0004.00 IS-Type: level-1 Manual area address(es): ——————————————————省略——————————————————— 实验完成 接下来为ISIS的认证,请不要删除配置,下面的实验需要之前的配置
|