码迷,mamicode.com
首页 > 其他好文 > 详细

is-is进阶实验

时间:2020-05-03 12:26:06      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:height   ade   引入   做了   replicat   ica   work   pid   use   

技术图片

 

规划说明:R5的e0/0为56.1.1.5/24,lo0为5.5.5.5/32

                     R6的e0/0为56.1.1.6/24,lo0为6.6.6.6/32,依次类推。 

R5的isis类型为level-2

R6,R7的isis类型为level-2

R8的isis类型为level-1

所有互联接口和环回口都宣告进isis中,查看邻居信息,注意观察形成邻居的Type。

R5:
System Id Type Interface IP Address State Holdtime Circuit Id R6 L2 Et0/0 56.1.1.6 UP 8 R6.01 R7 L2 Et0/1 57.1.1.7 UP 8 R7.01
R6:
System Id      Type Interface   IP Address      State Holdtime Circuit Id
R5             L2   Et0/0       56.1.1.5        UP    27       R6.01              
R8             L1   Et0/1       68.1.1.8        UP    7        R8.01 

R7:
System Id      Type Interface   IP Address      State Holdtime Circuit Id
R5             L2   Et0/0       57.1.1.5        UP    27       R7.01              
R8             L1   Et0/1       78.1.1.8        UP    8        R8.02    
R8:
System Id      Type Interface   IP Address      State Holdtime Circuit Id
R6             L1   Et0/0       68.1.1.6        UP    20       R8.01              
R7             L1   Et0/1       78.1.1.7        UP    25       R8.02  

 

查看R5到R8的环回口lo0(8.8.8.8)的路由

R5#sh ip route isis 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      6.0.0.0/32 is subnetted, 1 subnets
i L2     6.6.6.6 [115/20] via 56.1.1.6, 21:35:43, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
i L2     7.7.7.7 [115/20] via 57.1.1.7, 21:30:54, Ethernet0/1
      8.0.0.0/32 is subnetted, 1 subnets
i L2     8.8.8.8 [115/30] via 57.1.1.7, 21:30:54, Ethernet0/1
                 [115/30] via 56.1.1.6, 21:30:54, Ethernet0/0
      68.0.0.0/24 is subnetted, 1 subnets
i L2     68.1.1.0 [115/20] via 56.1.1.6, 21:35:43, Ethernet0/0
      78.0.0.0/24 is subnetted, 1 subnets
i L2     78.1.1.0 [115/20] via 57.1.1.7, 21:30:54, Ethernet0/1

metric值计算=数据包的出方向或者路由的入方向度量值累加=R5 的e0/0的metric(默认为10)+R56的e0/1的metric(默认为10)+R8 的lo0的metric(默认为10)=30

上图到 8.8.8.8出现1个等价metric为30的等价负载均衡,我们可以修改metric改变选路。

具体方法:

接口模式下 isis metric metric

修改R6的e0/1下metric再看下选路情况(R8的e0/0也修改了,为了保持链路两端开销一致)

R5#sh ip route isis 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      6.0.0.0/32 is subnetted, 1 subnets
i L2     6.6.6.6 [115/20] via 56.1.1.6, 21:54:52, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
i L2     7.7.7.7 [115/20] via 57.1.1.7, 21:50:03, Ethernet0/1
      8.0.0.0/32 is subnetted, 1 subnets
i L2     8.8.8.8 [115/21] via 56.1.1.6, 00:12:19, Ethernet0/0
      68.0.0.0/24 is subnetted, 1 subnets
i L2     68.1.1.0 [115/11] via 56.1.1.6, 00:12:24, Ethernet0/0
      78.0.0.0/24 is subnetted, 1 subnets
i L2     78.1.1.0 [115/20] via 57.1.1.7, 21:50:03, Ethernet0/1

R5到8.8.8.8的路由变为一条,metric为21.

 

 

将metrci的值再修改为默认的10,我们再查看R8 的database和路由

R8#sh isis database 

IS-IS Level-1 Link State Database:
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime      ATT/P/OL
R6.00-00              0x00000001   0x7121        665               0/0/0
R6.00-00              0x00000006   0xB757        972               1/0/0
R7.00-00              0x00000006   0xC533        972               1/0/0
R8.00-00            * 0x00000007   0x51FB        979               0/0/0
R8.01-00            * 0x00000002   0x1C25        974               0/0/0
R8.02-00            * 0x00000002   0x2E11        974               0/0/0


R8#sh ip route isis 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 78.1.1.7 to network 0.0.0.0

i*L1  0.0.0.0/0 [115/10] via 78.1.1.7, 00:00:55, Ethernet0/1
                [115/10] via 68.1.1.6, 00:00:55, Ethernet0/0
      6.0.0.0/32 is subnetted, 1 subnets
i L1     6.6.6.6 [115/20] via 68.1.1.6, 00:00:55, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
i L1     7.7.7.7 [115/20] via 78.1.1.7, 00:00:55, Ethernet0/1
      56.0.0.0/24 is subnetted, 1 subnets
i L1     56.1.1.0 [115/20] via 68.1.1.6, 00:00:55, Ethernet0/0
      57.0.0.0/24 is subnetted, 1 subnets
i L1     57.1.1.0 [115/20] via 78.1.1.7, 00:00:55, Ethernet0/1

当ATT位置1的 时候产生默认路由,指向边界。查看路由表,R8去往区域外部通过默认路由,也就是说因为是level-1类型,不保存其他区域数据库。

 

设置R5,R6之间的metric为63,R6,R8之间metric为1,

R5,R7和R7,R8之间默认为10,看下R8去往R5的lo0(5.5.5.5)的选路情况

R8#sh ip route isis
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 68.1.1.6 to network 0.0.0.0

i*L1  0.0.0.0/0 [115/1] via 68.1.1.6, 00:00:06, Ethernet0/0
      6.0.0.0/32 is subnetted, 1 subnets
i L1     6.6.6.6 [115/11] via 68.1.1.6, 00:00:06, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
i L1     7.7.7.7 [115/20] via 78.1.1.7, 01:10:22, Ethernet0/1
      56.0.0.0/24 is subnetted, 1 subnets
i L1     56.1.1.0 [115/64] via 68.1.1.6, 00:00:06, Ethernet0/0
      57.0.0.0/24 is subnetted, 1 subnets
i L1     57.1.1.0 [115/20] via 78.1.1.7, 01:10:22, Ethernet0/1

由路由表可以看到,R8选择走R6,这形成了次优路径。

我们利用路由渗透技术,让R8学习到去往R5的5.5.5.5的明细路由

在R7上将Level-2数据库中的学习到的路由重分布到Level-1中,这样就可以传递给R8,从而R8去往R5 lo0可以优选R7这条路径

 

R7上渗透配置:

router isis
 net 49.0002.0000.0000.0007.00
 redistribute isis ip level-2 into level-1 route-map Lo0
!
ip forward-protocol nd
!
!         
no ip http server
no ip http secure-server
!
!
route-map Lo0 permit 10
 match ip address 10
!
!
access-list 10 permit 5.5.5.5

我们做了一个route-map,只将5.5.5.5这条32位主机路由洋葱Level-2引入Level-1中,查看R8上的isis路由表

R8#sh ip route isis
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 68.1.1.6 to network 0.0.0.0

i*L1  0.0.0.0/0 [115/1] via 68.1.1.6, 00:28:14, Ethernet0/0
      5.0.0.0/32 is subnetted, 1 subnets
i ia     5.5.5.5 [115/158] via 78.1.1.7, 00:00:47, Ethernet0/1
      6.0.0.0/32 is subnetted, 1 subnets
i L1     6.6.6.6 [115/11] via 68.1.1.6, 00:28:14, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
i L1     7.7.7.7 [115/20] via 78.1.1.7, 01:38:30, Ethernet0/1
      56.0.0.0/24 is subnetted, 1 subnets
i L1     56.1.1.0 [115/64] via 68.1.1.6, 00:28:14, Ethernet0/0
      57.0.0.0/24 is subnetted, 1 subnets
i L1     57.1.1.0 [115/20] via 78.1.1.7, 01:38:30, Ethernet0/1

R8拥有R5环回口的明细路由(R7传递通过Level-1传递过来的),就会选择R7去往5.5.5.5

 

is-is进阶实验

标签:height   ade   引入   做了   replicat   ica   work   pid   use   

原文地址:https://www.cnblogs.com/miaocongcong/p/12821179.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!