Metric
You can make a route the preferred route by changing its metric. In this example, the cost has been configured to make R3 the next hop for R1. 
The default metric for each interface is 10. Interface eth3 on R2 has a metric of 20, and Interface eth2 on R3 has a metric of 30. The total cost to reach 10.10.14.0/24 (R4) through R2 and R3 is computed as follows:
R2: 10+20 = 30
R3: 10+30 = 40
In this topology, R1 chooses R2 as its next hop for destination 10.10.14.0/24.
Note: Below configuration is applicable for narrow (non-wide) metric-style. Wide metric can be configured by using the  CLI's "metric-style wide" under isis instance and "isis wide-metric < 1-16777214>" under interface mode.
Topology
Figure 6-44: Configure IS-IS Metric
Configuration
R1
 
| #configure terminal | Enter configure mode. | 
| (config)#interface eth1 | Enter interface mode. | 
| (config-if)#ip address 20.20.20.1/24 | Configure IP address on interface. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#exit | Exit interface mode. | 
| (config)#interface eth2 | Enter interface mode. | 
| (config-if)#ip address 30.30.30.1/24  | Configure IP address on interface. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router isis ABC | Create an IS-IS routing instance for area 49 (ABC). | 
| (config-router)#is-type level-2-only  | Configure instance as level-2-only routing. | 
| (config-router)#dynamic-hostname 	 | Configure the hostname to be advertised for an ISIS instance. | 
| (config-router)#net 49.0000.0000.0001.00 | Set a Network Entity Title for this instance, specifying the area address and the system ID. | 
R2
 
| (config)#interface eth2 | Enter interface mode. | 
| (config-if)#ip address 30.30.30.2/24 | Configure IP address on interface. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#exit | Exit interface mode. | 
| (config)#interface eth3 | Enter interface mode. | 
| (config-if)#ip address 40.40.40.1/24 | Configure IP address on interface. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#isis metric 20 | Set the value of IS-IS metric (on eth3) to 20. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router isis ABC | Create an IS-IS routing instance for area 49 (ABC). | 
| (config-router)#is-type level-2-only  | Configure instance as level-2-only routing. | 
| (config-router)#dynamic-hostname  | Configure the hostname to be advertised for an ISIS instance. | 
| (config-router)#net 49.0000.0000.0002.00 | Set a Network Entity Title for this instance, specifying the area address and the system ID. | 
R3
 
| (config)#interface eth1 | Enter interface mode. | 
| (config-if)#ip address 20.20.20.2/24 | Configure IP address on interface. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#exit | Exit interface mode. | 
| (config)#interface eth2 | Enter interface mode. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#ip address 50.50.50.1/24 | Configure IP address on interface. | 
| (config-if)#isis metric 30 | Set the value of IS-IS metric (on eth2) to 30. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router isis ABC | Create an IS-IS routing instance for area 49 (ABC). | 
| (config-router)#is-type level-2-only  | Configure instance as level-2-only routing. | 
| (config-router)#dynamic-hostname  | Configure the hostname to be advertised for an ISIS instance. | 
| (config-router)#net 49.0000.0000.0003.00 | Set a Network Entity Title for this instance, specifying the area address and the system ID. | 
R4
 
| (config)#interface eth1 | Enter interface mode. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#ip address 50.50.50.2/24 | Configure IP address on interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#interface eth3 | Enter interface mode. | 
| (config-if)#ip router isis ABC | Enable IS-IS routing on an interface for area 49 (ABC). | 
| (config-if)#ip address 40.40.40.2/24 | Configure IP address on interface. | 
| (config-if)#exit | Exit interface mode. | 
| (config)#router isis ABC | Create an IS-IS routing instance for area 49 (ABC). | 
| (config-router)#is-type level-2-only  | Configure instance as level-2-only routing. | 
| (config-router)#dynamic-hostname | Configure the hostname to be advertised for an ISIS instance. | 
| (config-router)#net 49.0000.0000.0004.00 | Set a Network Entity Title for this instance, specifying the area address and the system ID. | 
Validation
R1#show clns neighbors
 
Total number of L1 adjacencies: 0
Total number of L2 adjacencies: 2
Total number of adjacencies: 2
Tag ABC:  VRF : default
System Id      Interface   SNPA                State  Holdtime  Type Protocol
R3             eth1        5254.00dc.2f11      Up     5         L2   IS-IS
R2             eth2        5254.007e.5ade      Up     20        L2   IS-IS
 
R2#show clns neighbors
 
Total number of L1 adjacencies: 0
Total number of L2 adjacencies: 2
Total number of adjacencies: 2
Tag ABC:  VRF : default
System Id      Interface   SNPA                State  Holdtime  Type Protocol
R1             eth2        5254.00a1.6afe      Up     7         L2   IS-IS
R4             eth3        5254.00b1.d6fb      Up     8         L2   IS-IS
 
R3#show clns neighbors
 
Total number of L1 adjacencies: 0
Total number of L2 adjacencies: 2
Total number of adjacencies: 2
Tag ABC:  VRF : default
System Id      Interface   SNPA                State  Holdtime  Type Protocol
R1             eth1        5254.00dc.0b76      Up     20        L2   IS-IS
R4             eth2        5254.00f5.35a4      Up     8         L2   IS-IS
 
R4#show clns neighbors
 
Total number of L1 adjacencies: 0
Total number of L2 adjacencies: 2
Total number of adjacencies: 2
Tag ABC:  VRF : default
System Id      Interface   SNPA                State  Holdtime  Type Protocol
R3             eth1        5254.00a8.940d      Up     25        L2   IS-IS
R2             eth3        5254.0049.c509      Up     25        L2   IS-IS
 
R1#show isis topology
 
Tag ABC:  VRF : default
IS-IS paths to level-2 routers
System Id            Metric     Next-Hop             Interface   SNPA
R1                   --
R2                   10         R2       eth2        5254.007e.5ade
R3                   10         R3       eth1        5254.00dc.2f11
R4                   30         R2       eth2        5254.007e.5ade
 
R2#show isis topology
 
Tag ABC:  VRF : default
IS-IS paths to level-2 routers
System Id            Metric     Next-Hop             Interface   SNPA
R1                   10         R1       eth2        5254.00a1.6afe
R2                   --
R3                   20         R1       eth2        5254.00a1.6afe
R4                   20         R4       eth3        5254.00b1.d6fb
 
R3#show isis topology
 
Tag ABC:  VRF : default
IS-IS paths to level-2 routers
System Id            Metric     Next-Hop             Interface   SNPA
R1                   10         R1       eth1        5254.00dc.0b76
R2                   20         R1       eth1        5254.00dc.0b76
R3                   --
R4                   30         R4       eth2        5254.00f5.35a4
 
R4#show isis topology
 
Tag ABC:  VRF : default
IS-IS paths to level-2 routers
System Id            Metric     Next-Hop             Interface   SNPA
R1                   20         R2       eth3        5254.0049.c509
                                R3       eth1        5254.00a8.940d
R2                   10         R2       eth3        5254.0049.c509
R3                   10         R3       eth1        5254.00a8.940d
R4                   --
 
R1#show ip isis route
 
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, D - discard, e - external metric
       ** - invalid
 
Tag ABC:  VRF : default
     Destination         Metric      Next-Hop            Interface      Tag
C    20.20.20.0/24       10          --                  eth1            0
C    30.30.30.0/24       10          --                  eth2            0
L2   40.40.40.0/24       30          30.30.30.2          eth2            0
L2   50.50.50.0/24       40          30.30.30.2          eth2            0
                                     20.20.20.2          eth1            0
 
R2#show ip isis route
 
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, D - discard, e - external metric
       ** - invalid
 
Tag ABC:  VRF : default
     Destination         Metric      Next-Hop            Interface      Tag
L2   20.20.20.0/24       20          30.30.30.1          eth2            0
C    30.30.30.0/24       10          --                  eth2            0
C    40.40.40.0/24       20          --                  eth3            0
L2   50.50.50.0/24       30          40.40.40.2          eth3            0
 
 
R3#show ip isis route
 
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, D - discard, e - external metric
       ** - invalid
 
Tag ABC:  VRF : default
     Destination         Metric      Next-Hop            Interface      Tag
C    20.20.20.0/24       10          --                  eth1            0
L2   30.30.30.0/24       20          20.20.20.1          eth1            0
L2   40.40.40.0/24       40          20.20.20.1          eth1            0
                                     50.50.50.2          eth2            0
C    50.50.50.0/24       30          --                  eth2            0
 
R4#show ip isis route
 
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, D - discard, e - external metric
       ** - invalid
 
Tag ABC:  VRF : default
     Destination         Metric      Next-Hop            Interface      Tag
L2   20.20.20.0/24       20          50.50.50.1          eth1            0
L2   30.30.30.0/24       20          40.40.40.1          eth3            0
C    40.40.40.0/24       10          --                  eth3            0
C    50.50.50.0/24       10          --                  eth1            0
 
R1#show isis interface
eth1 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x01
    Extended Local circuit ID: 0x00000003
    Local SNPA: 5254.00dc.0b76
    IP interface address:
      20.20.20.1/24
    IPv6 interface address:
      fe80::5054:ff:fedc:b76/64
    Level-2 Metric: 10/10, Priority: 64, Circuit ID: 0000.0000.0003.01
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 5 seconds
eth2 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x02
    Extended Local circuit ID: 0x00000004
    Local SNPA: 5254.00a1.6afe
    IP interface address:
      30.30.30.1/24
    IPv6 interface address:
      fe80::5054:ff:fea1:6afe/64
    Level-2 Metric: 10/10, Priority: 64, Circuit ID: 0000.0000.0001.02
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 183 milliseconds
 
R2#show isis interface
eth2 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x01
    Extended Local circuit ID: 0x00000004
    Local SNPA: 5254.007e.5ade
    IP interface address:
      30.30.30.2/24
    IPv6 interface address:
      fe80::5054:ff:fe7e:5ade/64
    Level-2 Metric: 10/10, Priority: 64, Circuit ID: 0000.0000.0001.02
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 706 milliseconds
eth3 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x02
    Extended Local circuit ID: 0x00000005
    Local SNPA: 5254.0049.c509
    IP interface address:
      40.40.40.1/24
    IPv6 interface address:
      fe80::5054:ff:fe49:c509/64
    Level-2 Metric: 20/10, Priority: 64, Circuit ID: 0000.0000.0004.02
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 2 seconds
 
R3#show isis interface
eth1 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x01
    Extended Local circuit ID: 0x00000003
    Local SNPA: 5254.00dc.2f11
    IP interface address:
      20.20.20.2/24
    IPv6 interface address:
      fe80::5054:ff:fedc:2f11/64
    Level-2 Metric: 10/10, Priority: 64, Circuit ID: 0000.0000.0003.01
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 2 seconds
eth2 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x02
    Extended Local circuit ID: 0x00000004
    Local SNPA: 5254.00a8.940d
    IP interface address:
      50.50.50.1/24
    IPv6 interface address:
      fe80::5054:ff:fea8:940d/64
    Level-2 Metric: 30/10, Priority: 64, Circuit ID: 0000.0000.0004.01
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 3 seconds
 
R4#show isis interface
eth1 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x01
    Extended Local circuit ID: 0x00000003
    Local SNPA: 5254.00f5.35a4
    IP interface address:
      50.50.50.2/24
    IPv6 interface address:
      fe80::5054:ff:fef5:35a4/64
    Level-2 Metric: 10/10, Priority: 64, Circuit ID: 0000.0000.0004.01
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 0 milliseconds
eth3 is up, line protocol is up
  Routing Protocol: IS-IS (ABC)
    Network Type: Broadcast
    Circuit Type: level-1-2
    Local circuit ID: 0x02
    Extended Local circuit ID: 0x00000005
    Local SNPA: 5254.00b1.d6fb
    IP interface address:
      40.40.40.2/24
    IPv6 interface address:
      fe80::5054:ff:feb1:d6fb/64
    Level-2 Metric: 10/10, Priority: 64, Circuit ID: 0000.0000.0004.02
    Number of active level-2 adjacencies: 1
    Level-2 LSP MTU: 1492
    Next IS-IS LAN Level-2 Hello in 0 milliseconds