BGP auto-summary

NOTE

BGPのnetworkコマンドの基本はルーティングテーブル上にマスクまで一致したIGP経路を持つ場合に広報できる。auto-summaryを使うとルーティングテーブルに個別経路があれば、そのクラスフルネットワークを広報してくれる。任意のプレフィクスに集約はできず、ナチュラルマスクだけ。

 

VERIFICATION

R9#sh ip ro | b Gate
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O        10.0.0.7/32 [110/11] via 10.7.9.7, 00:17:58, Ethernet1/0.79
C        10.0.0.9/32 is directly connected, Loopback0
C        10.2.9.0/24 is directly connected, Ethernet1/0.29
L        10.2.9.9/32 is directly connected, Ethernet1/0.29
C        10.7.9.0/24 is directly connected, Ethernet1/0.79
L        10.7.9.9/32 is directly connected, Ethernet1/0.79
      172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        172.16.10.0/24 is directly connected, Loopback10
L        172.16.10.9/32 is directly connected, Loopback10
R9#

R9#sh run | sec router bgp
router bgp 65079
 bgp router-id 10.0.0.9
 neighbor 10.0.0.7 remote-as 65079
 neighbor 10.0.0.7 update-source Loopback0
 neighbor 10.0.0.7 next-hop-self
 neighbor 10.2.9.2 remote-as 65002
R9#

R9#sh ip bgp nei 10.2.9.2 adv | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 10.0.0.7/32      10.0.0.7                 0    100      0 i

Total number of prefixes 1
R9#

 

上記のケースでauto summaryを使うと、networkコマンドでクラスフルな経路を広報できる(network 172.16.0.0)

R9#conf t
R9(config)#router bgp 65079
R9(config-router)#network 172.16.0.0
R9(config-router)#auto-summary
R9(config-router)#end
R9#
R9#clear ip bgp * soft
R9#

R9#sh ip bgp nei 10.2.9.2 adv | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 10.0.0.7/32      10.0.0.7                 0    100      0 i
 *>  172.16.0.0       0.0.0.0                  0         32768 i

Total number of prefixes 2
R9#

 

クラスフル以外の集約では効果無し

R9#conf t
R9(config)#router bgp 65079
R9(config-router)#no network 172.16.0.0
R9(config-router)#network 172.16.0.0 mask 255.255.128.0
R9(config-router)#end
R9#
R9#clear ip bgp * soft
R9#sh ip bgp nei 10.2.9.2 adv | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 10.0.0.7/32      10.0.0.7                 0    100      0 i

Total number of prefixes 1
R9#

 

DIAGRAM & CONFIGURATION

 

コメント