最近下载了一个simware的H3C模拟器,鼓捣了半天终于能用了,做了一个多区域ISIS的实验还不错,跟真的一样。记录下来实验笔记,分享一下。

如图所示RT-A、RT-B、RT-C、RT-D配置ISIS,其中A B为区域49.0001;C D为区域49.0002。
ISIS的区域划分和OSPF不同,ISIS里整个路由器属于一个AREA。
配置完以后10.0.0.1和10.0.4.1互通,并分析协议建立过程。
配置命令:
[RT-A]
isis 1
network-entity 49.0001.0000.0000.0001.00
#
interface Ethernet0/1/0
port link-mode route
ip address 192.168.0.1 255.255.255.252
isis enable 1
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.255
isis enable 1
[RT-B]
isis 1
network-entity 49.0001.0000.0000.0002.00
#
interface Ethernet0/1/0
port link-mode route
ip address 192.168.0.2 255.255.255.252
isis enable 1
#
interface Ethernet0/1/1
port link-mode route
ip address 10.0.2.1 255.255.255.252
isis enable 1
[RT-C]
isis 1
network-entity 49.0002.0000.0000.0003.00
#
interface Ethernet0/1/0
port link-mode route
ip address 10.0.2.2 255.255.255.252
isis enable 1
#
interface Ethernet0/1/1
port link-mode route
ip address 10.0.3.1 255.255.255.252
isis enable 1
[RT-D]
isis 1
network-entity 49.0002.0000.0000.0004.00
#
interface Ethernet0/1/0
port link-mode route
ip address 10.0.3.2 255.255.255.252
isis enable 1
#
interface LoopBack0
ip address 10.0.4.1 255.255.255.255
isis enable 1
network-entity
的格式:Area = 49.0001, System ID = aaaa.bbbb.cccc, NSEL = 00
area:为可变长度部分,范围为1-13个字节。
System ID:是IS或ES在区域内的唯一标识,总共为6个字节,可以使用MAC地址或由IP地址转化得到。
NSEL:service identifier,共一个字节。(00表示在ip环境)
AFI=49为私有地址空间,类似于私有的IP地址
检查一下isis
的邻居状态,可以看出不改变层次的情况下,RT-A
和RT-B
之间维护L1
、L2
两个层的链路状态数据库;而RT-B
和RT-C
因为是不同区域的,所以只有L2
。
[RT-A]dis isis peer
Peer information for ISIS(1)
----------------------------
System Id: 0000.0000.0002
Interface: Eth0/1/0
Circuit Id: 0000.0000.0001.01
State: Up
HoldTime: 23s Type: L1(L1L2) PRI: 64
System Id: 0000.0000.0002
Interface: Eth0/1/0
Circuit Id: 0000.0000.0001.01
State: Up
HoldTime: 27s Type: L2(L1L2) PRI: 64
<RT-B>dis isis pee
Peer information for ISIS(1)
----------------------------
System Id: 0000.0000.0001
Interface: Eth0/1/0
Circuit Id: 0000.0000.0001.01
State: Up
HoldTime: 7s Type: L1(L1L2) PRI: 64
System Id: 0000.0000.0001
Interface: Eth0/1/0
Circuit Id: 0000.0000.0001.01
State: Up
HoldTime: 6s Type: L2(L1L2) PRI: 64
System Id: 0000.0000.0003
Interface: Eth0/1/1
Circuit Id: 0000.0000.0003.01
State: Up
HoldTime: 9s Type: L2(L1L2) PRI: 64
检查一下路由表,RT-A通过RT-B学到了远端路由,RT-D也是。
[RT-A]dis ip routing-table
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask
Proto Pre Cost NextHop Interface
10.0.1.1/32
Direct 0 0 127.0.0.1 InLoop0
10.0.2.0/30
ISIS 15 20 192.168.0.2 Eth0/1/0
10.0.3.0/30
ISIS 15 30 192.168.0.2 Eth0/1/0
10.0.4.1/32
ISIS 15 30 192.168.0.2 Eth0/1/0
127.0.0.0/8
Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32
Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/30
Direct 0 0 192.168.0.1 Eth0/1/0
192.168.0.1/32
Direct 0 0 127.0.0.1 InLoop0
再查看一下isis
的路由表看看一下这些isis
的路由是来自L1
还是L2
[RT-A]dis isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) IPv4 Level-1 Forwarding Table
-------------------------------------
IPV4 Destination
IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
0.0.0.0/0
10 NULL
192.168.0.0/30
10 NULL Eth0/1/0 Direct D/L/-
10.0.2.0/30
20 NULL Eth0/1/0 192.168.0.2 R/L/-
10.0.1.1/32
0 NULL Loop0 Direct D/L/-
Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set
ISIS(1) IPv4 Level-2 Forwarding Table
-------------------------------------
IPV4 Destination
IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------------
192.168.0.0/30
10 NULL Eth0/1/0 Direct D/L/-
10.0.2.0/30
20 NULL
10.0.1.1/32
0 NULL Loop0 Direct D/L/-
10.0.3.0/30
30 NULL Eth0/1/0 192.168.0.2 R/-/-
10.0.4.1/32
30 NULL Eth0/1/0 192.168.0.2 R/-/-
Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set
其中
Flags参数为R表示该路由添加到路由表中。由此可以看出10.0.2.0/30是L1中学到的;10.0.3.0/30、10.0.4.1/32是L2中学到的。
后续把RT-A和RT-D放到L1层次里,路由也会有相应的变化,保存一下,下次再做吧!
OK
!到此结束。