拓扑图
配置
nexthop weight影响路由加入路由表
weight默认为255,取值1~255,值越小越优先
sysname R1
#
isis 1is-level level-1cost-style widenetwork-entity 49.1234.0000.0000.0001.00log-peer-change topology
#
interface GigabitEthernet0/0/0ip address 10.1.12.1 255.255.255.0 isis enable 1
#
interface GigabitEthernet0/0/1ip address 10.1.13.1 255.255.255.0 isis enable 1
#
sysname R2
#
isis 1cost-style widenetwork-entity 49.1234.0000.0000.0002.00
#
interface GigabitEthernet0/0/0ip address 10.1.12.2 255.255.255.0 isis enable 1
#
interface GigabitEthernet0/0/1ip address 10.1.24.2 255.255.255.0 isis enable 1
#
sysname R3
#
isis 1cost-style widenetwork-entity 49.1234.0000.0000.0003.00
#
interface GigabitEthernet0/0/0ip address 10.1.13.3 255.255.255.0 isis enable 1
#
interface GigabitEthernet0/0/1ip address 10.1.34.3 255.255.255.0 isis enable 1
#
sysname R4
#
isis 1is-level level-2cost-style widenetwork-entity 49.1234.0000.0000.0004.00network-entity 49.0000.0000.0000.0004.00
#
interface GigabitEthernet0/0/0ip address 10.1.24.4 255.255.255.0 isis enable 1
#
interface GigabitEthernet0/0/1ip address 10.1.34.4 255.255.255.0 isis enable 1
#
interface LoopBack0ip address 4.4.4.4 255.255.255.0 isis enable 1
#
查看结果
查看R1的路由表
查看isis数据库
R1通过边界下发的ATT置1的LSP,生成2条默认路由,两条默认路由负载均衡
通过修改weight值,使其中下一跳为R2的路由加表
isis nexthop 10.1.12.2 weight 1
#
再次查看路由表,只有一条下一跳为10.1.12.2的路由存在