GLBPの設定
HSRPとVRRPに続きGLBP(Gateway Load Balancing Protocol)の設定を確認します。先の二つではアクティブなルータのみが利用されますが、GLBPでは複数をバランスを取って利用することが可能で負荷を分散させることが可能です。ルータ4台の設定は前回と同じです。
R1(config)#do sh ip int b Interface IP-Address OK? Method Status Protocol FastEthernet0/0 124.124.124.1 YES manual up up Serial1/2 13.13.13.1 YES manual up up Loopback0 17.17.1.1 YES NVRAM up up R2(config)#do sh ip int b Interface IP-Address OK? Method Status Protocol FastEthernet0/0 124.124.124.2 YES manual up up Serial1/2 23.23.23.2 YES manual up up Loopback0 17.17.2.2 YES NVRAM up up R3(config)#do sh ip int b Interface IP-Address OK? Method Status Protocol Serial1/2 13.13.13.3 YES manual up up Serial1/3 23.23.23.3 YES manual up up Loopback0 17.17.3.3 YES NVRAM up up R4(config)#do sh ip int b Interface IP-Address OK? Method Status Protocol FastEthernet0/0 124.124.124.4 YES manual up up Loopback0 17.17.4.4 YES NVRAM up up |
R1, R2, R3では全てのインターフェースでEIGRPを有効にします。
R3(config)#router ei 100 R3(config-router)#no au R3(config-router)#net 0.0.0.0 R3(config)#do sh ip rou ei 17.0.0.0/24 is subnetted, 3 subnets D 17.17.1.0 [90/2297856] via 13.13.13.1, 00:07:11, Serial1/2 D 17.17.2.0 [90/2297856] via 23.23.23.2, 00:07:11, Serial1/3 124.0.0.0/24 is subnetted, 1 subnets D 124.124.124.0 [90/2172416] via 23.23.23.2, 00:07:11, Serial1/3 [90/2172416] via 13.13.13.1, 00:07:11, Serial1/2 |
R1とR2のF0/0にGLBPを設定します。まずR1でF0/0を指定し、glbpコマンドでグループ124を指定しました。その後、IPアドレスを124.124.124.254とし、R1を優先的に利用するためプライオリティを110としました(指定しない場合は100)。最後にweightingを使って利用配分を指定します。ここではR1とR2を1:1で利用すべく10で指定しました。
R1(config-router)#int f0/0 R1(config-if)#glbp ? <0-1023> Group number R1(config-if)#glbp 124 ? authentication Authentication method client-cache Client cache forwarder Forwarder configuration ip Enable group and set virtual IP address ipv6 Enable group for IPv6 and set the virtual IPv6 address load-balancing Load balancing method name Redundancy name preempt Overthrow lower priority designated routers priority Priority level timers Adjust GLBP timers weighting Gateway weighting and tracking R1(config-if)#glbp 124 ip 124.124.124.254 R1(config-if)#glbp 124 priority 110 R1(config-if)#glbp 124 weighting 10 |
続いてR2を設定します。R1と同じようにweightingは10としました。
R2(config-router)#int f0/0 R2(config-if)#glbp 124 ip 124.124.124.254 R2(config-if)#glbp 124 weighting 10 |
ここまでで設定を確認します。
R1(config-if)#do sh glbp FastEthernet0/0 - Group 124 State is Active 2 state changes, last state change 00:04:08 Virtual IP address is 124.124.124.254 Hello time 3 sec, hold time 10 sec Next hello sent in 0.136 secs Redirect time 600 sec, forwarder timeout 14400 sec Preemption disabled Active is local Standby is 124.124.124.2, priority 100 (expires in 8.296 sec) Priority 110 (configured) Weighting 10 (configured 10), thresholds: lower 1, upper 10 Load balancing: round-robin Group members: c200.1189.0000 (124.124.124.1) local c201.1189.0000 (124.124.124.2) There are 2 forwarders (1 active) Forwarder 1 State is Active 1 state change, last state change 00:03:58 MAC address is 0007.b400.7c01 (default) Owner ID is c200.1189.0000 Redirection enabled Preemption enabled, min delay 30 sec Active is local, weighting 10 Forwarder 2 State is Listen MAC address is 0007.b400.7c02 (learnt) Owner ID is c201.1189.0000 Redirection enabled, 599.044 sec remaining (maximum 600 sec) Time to live: 14399.044 sec (maximum 14400 sec) Preemption enabled, min delay 30 sec Active is 124.124.124.2 (primary), weighting 10 (expires in 9.044 sec) R2(config-if)#do sh glbp FastEthernet0/0 - Group 124 State is Standby 1 state change, last state change 00:22:41 Virtual IP address is 124.124.124.254 Hello time 3 sec, hold time 10 sec Next hello sent in 0.276 secs Redirect time 600 sec, forwarder timeout 14400 sec Preemption disabled Active is 124.124.124.1, priority 110 (expires in 9.176 sec) Standby is local Priority 100 (default) Weighting 10 (configured 10), thresholds: lower 1, upper 10 Load balancing: round-robin Group members: c200.1189.0000 (124.124.124.1) c201.1189.0000 (124.124.124.2) local There are 2 forwarders (1 active) Forwarder 1 State is Listen MAC address is 0007.b400.7c01 (learnt) Owner ID is c200.1189.0000 Time to live: 14399.172 sec (maximum 14400 sec) Preemption enabled, min delay 30 sec Active is 124.124.124.1 (primary), weighting 10 (expires in 8.388 sec) Forwarder 2 State is Active 1 state change, last state change 00:22:49 MAC address is 0007.b400.7c02 (default) Owner ID is c201.1189.0000 Preemption enabled, min delay 30 sec Active is local, weighting 10 |
R4にデフォルトゲートウェイを124.124.124.254で設定します。
R4(config-if)#ip route 0.0.0.0 0.0.0.0 124.124.124.254 R4(config)#do sh ip rou st S* 0.0.0.0/0 [1/0] via 124.124.124.254 |
設定後、R3へのLo0へpingが実行できることが分かり、tracerouteコマンドでR1を経由していることも確認できます。
R4(config)#do trace 17.17.3.3 Type escape sequence to abort. Tracing the route to 17.17.3.3 1 124.124.124.1 16 msec 8 msec 8 msec 2 13.13.13.3 40 msec * 12 msec |
1:1の配分を確認するためにarp-cacheをクリアしています。すると、今度はR2が利用されていることが分かります。
R4(config)#do sh arp 124.124.124.254 Protocol Address Age (min) Hardware Addr Type Interface Internet 124.124.124.254 0 0007.b400.7c01 ARPA FastEthernet0/0 R4(config)#do clear arp-cache R4(config)#do trace 17.17.3.3 Type escape sequence to abort. Tracing the route to 17.17.3.3 1 124.124.124.2 8 msec 4 msec 8 msec 2 23.23.23.3 8 msec * 12 msec R4(config)#do sh arp 124.124.124.254 Protocol Address Age (min) Hardware Addr Type Interface Internet 124.124.124.254 0 0007.b400.7c02 ARPA FastEthernet0/0 |
コメント