offset-list
初期設定
iosv-0#sh ip ro
<略>
Gateway of last resort is not set
D 192.168.2.0/24 [90/3072] via 192.168.21.2, 00:01:20, GigabitEthernet0/1
[90/3072] via 192.168.12.2, 00:01:20, GigabitEthernet0/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/0
L 192.168.12.1/32 is directly connected, GigabitEthernet0/0
192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.21.0/24 is directly connected, GigabitEthernet0/1
L 192.168.21.1/32 is directly connected, GigabitEthernet0/1
・等コストでロードバランシングが行われている
offset-list in
設定
iosv-0(config)#access-list 1 permit 192.168.2.0 0.0.0.255
iosv-0(config)#router eigrp 1
iosv-0(config-router)#offset-list 1 in 25600 gi0/0
iosv-0(config-router)#end
iosv-0#
*Jul 9 08:00:25.018: %SYS-5-CONFIG_I: Configured from console by console
*Jul 9 08:00:32.353: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 192.168.12.2 (GigabitEthernet0/0) is resync: intf route configuration changed
確認
iosv-0#sh ip protocols
<略>
Routing Protocol is "eigrp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Incoming routes in GigabitEthernet0/0 will have 25600 added to metric if on list 1
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
経路
iosv-0#sh ip ro | b Gate
Gateway of last resort is not set
D 192.168.2.0/24 [90/3072] via 192.168.21.2, 00:03:54, GigabitEthernet0/1
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/0
L 192.168.12.1/32 is directly connected, GigabitEthernet0/0
192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.21.0/24 is directly connected, GigabitEthernet0/1
L 192.168.21.1/32 is directly connected, GigabitEthernet0/1
・192.168.2.0/24のネクストホップが1つになる
offset-list out
設定
iosv-1(config)#access-list 1 permit 192.168.2.0 0.0.0.255
iosv-1(config)#router eigrp 1
iosv-1(config-router)#offset-list 1 out 25600 gi0/1
確認
iosv-1#sh ip protocols
Routing Protocol is "eigrp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Outgoing routes in GigabitEthernet0/1 will have 25600 added to metric if on list 1
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP-IPv4 Protocol for AS(1)
経路
iosv-0#sh ip ro | b Gate
Gateway of last resort is not set
D 192.168.2.0/24 [90/3072] via 192.168.12.2, 00:02:18, GigabitEthernet0/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/0
L 192.168.12.1/32 is directly connected, GigabitEthernet0/0
192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.21.0/24 is directly connected, GigabitEthernet0/1
L 192.168.21.1/32 is directly connected, GigabitEthernet0/1
・先ほどと同様にネクストホップが1つになっている
・今回はGi0/1側でメトリックを追加したので、Gi0/0側が優先経路となっている