DynagenでCCIEを目指す
20100412 EIGRP 不等コストロードバランス
最終更新:
it_certification
-
view
目的
- EIGRPのロードバランス設定方法を確認します。
構成
- 設定概要
- EIGRPによってルーティングします。
- 検証の都合上、R3 loopback 0 に対して、複数のsecondary addressを割り当てます。
- ルーティングテーブルを見やすくするため、上記seconday addressはR3で経路集約します。
- 構成図

- netファイル
ghostios = True sparsemem = True model = 2620 [localhost] [[2620]] image = C:\Program Files\Dynamips\images\c2600-ipbasek9-mz.124-21.bin ram = 256 [[ROUTER R1]] f0/0 = R2 f0/0 e1/0 = R2 e1/0 e1/1 = R2 e1/1 [[ROUTER R2]] e1/2 = R3 e1/2 [[ROUTER R3]]
- 初期設定 R1
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.0.1 255.255.255.0 duplex auto speed auto ! interface Ethernet1/0 ip address 192.168.10.1 255.255.255.0 full-duplex ! interface Ethernet1/1 ip address 192.168.11.1 255.255.255.0 full-duplex ! interface Ethernet1/2 no ip address shutdown half-duplex ! interface Ethernet1/3 no ip address shutdown half-duplex ! router eigrp 1 network 1.1.1.1 0.0.0.0 network 192.168.0.0 network 192.168.10.0 network 192.168.11.0 no auto-summary ! ip forward-protocol nd ! ip http server no ip http secure-server ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- 初期設定 R2
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.0.2 255.255.255.0 duplex auto speed auto ! interface Ethernet1/0 ip address 192.168.10.2 255.255.255.0 full-duplex ! interface Ethernet1/1 ip address 192.168.11.2 255.255.255.0 full-duplex ! interface Ethernet1/2 ip address 192.168.12.2 255.255.255.0 full-duplex ! interface Ethernet1/3 no ip address shutdown half-duplex ! router eigrp 1 network 2.2.2.2 0.0.0.0 network 192.168.0.0 network 192.168.10.0 network 192.168.11.0 network 192.168.12.0 no auto-summary ! ip forward-protocol nd ! ip http server no ip http secure-server ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- 初期設定 R3
! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 15 ip cef ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 10.0.0.1 255.255.255.255 secondary ip address 10.0.0.2 255.255.255.255 secondary ip address 10.0.0.3 255.255.255.255 secondary ip address 10.0.0.4 255.255.255.255 secondary ip address 10.0.0.5 255.255.255.255 secondary ip address 10.0.0.6 255.255.255.255 secondary ip address 10.0.0.7 255.255.255.255 secondary ip address 10.0.0.8 255.255.255.255 secondary ip address 10.0.0.9 255.255.255.255 secondary ip address 10.0.0.10 255.255.255.255 secondary ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! interface Ethernet1/0 no ip address shutdown half-duplex ! interface Ethernet1/1 no ip address shutdown half-duplex ! interface Ethernet1/2 ip address 192.168.12.3 255.255.255.0 ip summary-address eigrp 1 10.0.0.0 255.255.255.0 5 full-duplex ! interface Ethernet1/3 no ip address shutdown half-duplex ! router eigrp 1 network 3.3.3.3 0.0.0.0 network 10.0.0.0 network 192.168.12.0 no auto-summary ! ip forward-protocol nd ! ip http server no ip http secure-server ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
検証1 不等コスト ロードバランス
- ルーティングテーブル確認
R1のルーティングテーブルを表示します。R3へのルート(例:3.3.3.3/32)に着目すると、必ずf0/0を通りロードバランスされていない事が確認できます。
R1#show ip route - 略 - D 192.168.12.0/24 [90/284160] via 192.168.0.2, 00:14:01, FastEthernet0/0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/156160] via 192.168.0.2, 00:12:48, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/412160] via 192.168.0.2, 00:11:28, FastEthernet0/0 <- ロードバランスされていない C 192.168.10.0/24 is directly connected, Ethernet1/0 C 192.168.11.0/24 is directly connected, Ethernet1/1 10.0.0.0/24 is subnetted, 1 subnets D 10.0.0.0 [90/412160] via 192.168.0.2, 00:00:48, FastEthernet0/0 C 192.168.0.0/24 is directly connected, FastEthernet0/0
- 不等コスト ロードバランスの設定
R1, R2に対して、varianceコマンドで不等コスト ロードバランスの設定を行います。varianceは「最大何倍のコスト差のある経路をロードバランスの対象とするか」を意味する値です。例えば、varience 3ならば、「最小コストの3倍以下の経路を用いて、ロードバランスする」という意味になります。
設定が終わったら、ルーティングテーブルを確認します。先ほどと異なり、ロードバランスされている事が読み取れます。例えば、3.3.3.3/24に着目すると、f0/0, e1/0, e0/2の3本の経路を使っている事が確認できます。
設定が終わったら、ルーティングテーブルを確認します。先ほどと異なり、ロードバランスされている事が読み取れます。例えば、3.3.3.3/24に着目すると、f0/0, e1/0, e0/2の3本の経路を使っている事が確認できます。
R1(config)#router eigrp 1 R1(config-router)#variance 3 R1(config-router)#do show ip route - 略 - D 192.168.12.0/24 [90/307200] via 192.168.11.2, 00:00:03, Ethernet1/1 [90/307200] via 192.168.10.2, 00:00:03, Ethernet1/0 [90/284160] via 192.168.0.2, 00:00:03, FastEthernet0/0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/409600] via 192.168.11.2, 00:00:03, Ethernet1/1 [90/409600] via 192.168.10.2, 00:00:03, Ethernet1/0 [90/156160] via 192.168.0.2, 00:00:03, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/435200] via 192.168.11.2, 00:00:03, Ethernet1/1 <- ロードバランスされています。 [90/435200] via 192.168.10.2, 00:00:03, Ethernet1/0 [90/412160] via 192.168.0.2, 00:00:03, FastEthernet0/0 C 192.168.10.0/24 is directly connected, Ethernet1/0 C 192.168.11.0/24 is directly connected, Ethernet1/1 10.0.0.0/24 is subnetted, 1 subnets D 10.0.0.0 [90/435200] via 192.168.11.2, 00:00:04, Ethernet1/1 [90/435200] via 192.168.10.2, 00:00:04, Ethernet1/0 [90/412160] via 192.168.0.2, 00:00:04, FastEthernet0/0 C 192.168.0.0/24 is directly connected, FastEthernet0/0
- 経路の確認
R3からR1 loopback 0(1.1.1.1)に対してpingを大量に送信します。その後、R1でカウンタを確認します。
すると、カウンタからはロードバランスされている様子が読み取れません。これは、パケット単位でロードバランスするわけではなく、宛先IPアドレスと送信元IPアドレスのハッシュ値に基づいてロードバランスするからです。
すると、カウンタからはロードバランスされている様子が読み取れません。これは、パケット単位でロードバランスするわけではなく、宛先IPアドレスと送信元IPアドレスのハッシュ値に基づいてロードバランスするからです。
R3#ping 1.1.1.1 repeat 500 Type escape sequence to abort. Sending 500, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!! Success rate is 100 percent (500/500), round-trip min/avg/max = 12/62/248 ms R3# R1#show interfaces summary *: interface is up IHQ: pkts in input hold queue IQD: pkts dropped from input queue OHQ: pkts in output hold queue OQD: pkts dropped from output queue RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec) TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec) TRTL: throttle count Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL ------------------------------------------------------------------------ * FastEthernet0/0 0 0 0 0 7000 7 0 0 0 * Ethernet1/0 0 0 0 0 0 0 7000 7 0 * Ethernet1/1 0 0 0 0 0 0 0 0 0 Ethernet1/2 0 0 0 0 0 0 0 0 0 Ethernet1/3 0 0 0 0 0 0 0 0 0 * Loopback0 0 0 0 0 0 0 0 0 0
送信元IPアドレスを変更し、再度pingを送信します。先ほどとは違う経路を通っている事が確認できます。
R3#ping 1.1.1.1 repeat 500 source 10.0.0.1 Type escape sequence to abort. Sending 500, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: Packet sent with a source address of 10.0.0.1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!! Success rate is 100 percent (500/500), round-trip min/avg/max = 1/62/184 ms R1#show interfaces summary *: interface is up IHQ: pkts in input hold queue IQD: pkts dropped from input queue OHQ: pkts in output hold queue OQD: pkts dropped from output queue RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec) TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec) TRTL: throttle count Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL ------------------------------------------------------------------------ * FastEthernet0/0 0 0 0 0 0 0 0 0 0 * Ethernet1/0 0 0 0 0 7000 7 0 0 0 * Ethernet1/1 0 0 0 0 0 0 7000 7 0 Ethernet1/2 0 0 0 0 0 0 0 0 0 Ethernet1/3 0 0 0 0 0 0 0 0 0 * Loopback0 0 0 0 0 0 0 0 0 0
検証2 maximum-pathsの設定
maximum-pathsは最大何本の経路まででロードバランスするかの設定です。以下のように最大2本まででロードバランスするような設定をR1, R2に投入します。
すると、ルーティングテーブルを確認すると、ロードバランスする経路が3本から2本に減っている事が確認できます。
すると、ルーティングテーブルを確認すると、ロードバランスする経路が3本から2本に減っている事が確認できます。
R1(config)#router eigrp 1 R1(config-router)#maximum-paths 2 R1(config-router)#do show ip route - 略 - D 192.168.12.0/24 [90/307200] via 192.168.11.2, 00:00:02, Ethernet1/1 [90/284160] via 192.168.0.2, 00:00:02, FastEthernet0/0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/409600] via 192.168.11.2, 00:00:02, Ethernet1/1 [90/156160] via 192.168.0.2, 00:00:02, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/435200] via 192.168.10.2, 00:00:02, Ethernet1/0 <- 経路が3本から2本に減っています [90/412160] via 192.168.0.2, 00:00:02, FastEthernet0/0 C 192.168.10.0/24 is directly connected, Ethernet1/0 C 192.168.11.0/24 is directly connected, Ethernet1/1 10.0.0.0/24 is subnetted, 1 subnets D 10.0.0.0 [90/435200] via 192.168.11.2, 00:00:03, Ethernet1/1 [90/412160] via 192.168.0.2, 00:00:03, FastEthernet0/0 C 192.168.0.0/24 is directly connected, FastEthernet0/0
検証3 traffic-share balanced
- 先駆者の確認
先駆者の方々のブログを確認しますと、ロードバランスの設定は以下のように書かれています。
(config-router)#traffic-share balanced (config-router)#variance 倍率
http://www.n-study.com/kyo/archives/2005/01/_eigrp.html
http://www.netagency.biz/ccie/modules/smartsection/item.php?itemid=3
http://www.netagency.biz/ccie/modules/smartsection/item.php?itemid=3
- traffic-share balancedの設定
R1, R2にtraffic-shareの設定を加えます。balancedは「ロードバランスする」の意味で、minは「最小コストを通る(ロードバランスしない)」の意味です。
R2(config-router)#traffic-share ? balanced Share inversely proportional to metric min All traffic shared among min metric paths R2(config-router)#traffic-share balanced
runnning-configを確認します。traffic-shareの文字が見当たりません。
R2#show running-config | begin router router eigrp 1 variance 3 network 2.2.2.2 0.0.0.0 network 192.168.0.0 network 192.168.10.0 network 192.168.11.0 network 192.168.12.0 maximum-paths 2 no auto-summary !
恐らく、私の使用したIOSでは、traffic-share balancedがデフォルトではないかと推測できます。
ちなみに、show versionの抜粋は以下の通りです。
ちなみに、show versionの抜粋は以下の通りです。
R2#show version Cisco IOS Software, C2600 Software (C2600-IPBASEK9-M), Version 12.4(21), RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2008 by Cisco Systems, Inc. Compiled Thu 10-Jul-08 01:21 by prod_rel_team ROM: ROMMON Emulation Microcode ROM: C2600 Software (C2600-IPBASEK9-M), Version 12.4(21), RELEASE SOFTWARE (fc1)
添付ファイル