BGP DMZ Link Bandwidth

NOTE

  • peerを張る際のIFの帯域に応じてロードバランスさせることができる
  • 複数peer の帯域比率に応じてロードバランスさせるので、不等コストでも可
  • 拡張コミュニティとして伝搬(BW kbps ⇒ kbytesに変換)

 

 

抜粋

!!! R1
router bgp 65000
 bgp dmzlink-bw
 maximum-paths ibgp 4
!
interface FastEthernet1/0
 ip load-sharing per-packet
!
interface FastEthernet2/0
 ip load-sharing per-packet
!
interface FastEthernet3/0
 ip load-sharing per-packet

 

!!! R2,R3,R4
router bgp 65000
 bgp dmzlink-bw
 neighbor 10.0.0.1 send-community both
 neighbor 10.234.5.5 dmzlink-bw
!
interface FastEthernet0/0
 ip access-group 100 in
!
access-list 100 permit icmp host 10.0.0.1 host 10.0.0.5
access-list 100 permit ip any any

 

R2,R3,R4の帯域は初期値の100Mなので100,000/8=12,500で等コスト

R1#sh ip bgp 10.0.0.5/32
BGP routing table entry for 10.0.0.5/32, version 54
Paths: (3 available, best #3, table default)
Multipath: iBGP
  Not advertised to any peer
  Refresh Epoch 1
  65005
    10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath
      DMZ-Link Bw 12500 kbytes
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 1
  65005
    10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath(oldest)
      DMZ-Link Bw 12500 kbytes
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 1
  65005
    10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath, best
      DMZ-Link Bw 12500 kbytes
      rx pathid: 0, tx pathid: 0x0
R1#

 

1:1:1で333発ずつ

R1#ping 10.0.0.5 so lo 0 rep 999

R2#show access-lists 100
Extended IP access list 100
    10 permit icmp host 10.0.0.1 host 10.0.0.5 (333 matches)
    20 permit ip any any (18 matches)
R2#

R3#show access-lists 100
Extended IP access list 100
    10 permit icmp host 10.0.0.1 host 10.0.0.5 (333 matches)
    20 permit ip any any (19 matches)
R3#

R4#show access-lists 100
Extended IP access list 100
    10 permit icmp host 10.0.0.1 host 10.0.0.5 (333 matches)
    20 permit ip any any (22 matches)
R4#

 

R2,R3,R4のBWを変更

R2#sh int fa1/0 | inc BW
  MTU 1500 bytes, BW 800 Kbit/sec, DLY 100 usec,

R3#sh int fa1/0 | inc BW
  MTU 1500 bytes, BW 800 Kbit/sec, DLY 100 usec,

R4#sh int fa1/0 | inc BW
  MTU 1500 bytes, BW 6400 Kbit/sec, DLY 100 usec,

 

R1#sh ip bgp 10.0.0.5
BGP routing table entry for 10.0.0.5/32, version 8
Paths: (3 available, best #3, table default)
Multipath: iBGP
  Not advertised to any peer
  Refresh Epoch 1
  65005
    10.0.0.4 (metric 2) from 10.0.0.4 (10.0.0.4)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath
      DMZ-Link Bw 800 kbytes
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 1
  65005
    10.0.0.3 (metric 2) from 10.0.0.3 (10.0.0.3)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath(oldest)
      DMZ-Link Bw 100 kbytes
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 1
  65005
    10.0.0.2 (metric 2) from 10.0.0.2 (10.0.0.2)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath, best
      DMZ-Link Bw 100 kbytes
      rx pathid: 0, tx pathid: 0x0

 

1:1:8なので

R1#ping 10.0.0.5 so lo 0 rep 1000

R2#sh access-lists 100
Extended IP access list 100
    10 permit icmp host 10.0.0.1 host 10.0.0.5 (100 matches)
    20 permit ip any any (9 matches)

R3#sh access-lists 100
Extended IP access list 100
    10 permit icmp host 10.0.0.1 host 10.0.0.5 (100 matches)
    20 permit ip any any (10 matches)

R4#sh access-lists 100
Extended IP access list 100
    10 permit icmp host 10.0.0.1 host 10.0.0.5 (800 matches)
    20 permit ip any any (10 matches)

 

※パケット数で確認したかったのでip load-sharing per-packetに変更

コメント