interface GigabitEthernet1/0 ip address 192.168.0.1 255.255.255.252 ! router bgp 65000 no synchronization bgp log-neighbor-changes aggregate-address 10.0.0.0 255.0.0.0 neighbor 192.168.0.2 remote-as 65001 no auto-summary !
------ R2
interface Loopback0 ip address 10.0.1.1 255.255.255.0 ! interface GigabitEthernet1/0 ip address 192.168.0.2 255.255.255.252 ! router bgp 65001 no synchronization bgp log-neighbor-changes network 10.0.1.0 mask 255.255.255.0 neighbor 192.168.0.1 remote-as 65000 no auto-summary !
(Result)
R1#sh ip route
(一部略) 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks B 10.0.0.0/8 [200/0] via 0.0.0.0, 00:08:55, Null0 B 10.0.1.0/24 [20/0] via 192.168.0.2, 00:08:55 192.168.0.0/30 is subnetted, 1 subnets C 192.168.0.0 is directly connected, GigabitEthernet1/0
---------
R2#sh ip route
(一部略) 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks B 10.0.0.0/8 [20/0] via 192.168.0.1, 00:09:50 C 10.0.1.0/24 is directly connected, Loopback0 192.168.0.0/30 is subnetted, 1 subnets C 192.168.0.0 is directly connected, GigabitEthernet1/0
-------------------- R1#sh ip bgp BGP table version is 12, local router ID is 192.168.0.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path *> 10.0.1.0/24 192.168.0.2 0 0 65001 i --------------------
試しにR1でLoopback0(10.0.20.1/24)を作成して BGPにも、
network 10.0.20.0 mask 255.255.255.0
の設定を追加します。すると以下のように集約ルートも発生します。
--------------------------- R1#sh ip bgp
(省略)
Network Next Hop Metric LocPrf Weight Path *> 10.0.0.0 0.0.0.0 32768 i *> 10.0.1.0/24 192.168.0.2 0 0 65001 i *> 10.0.20.0/24 0.0.0.0 0 32768 i
---------------------------
R2でも集約ルートが確認できます。
--------------------------- R2#sh ip bgp (省略)
Network Next Hop Metric LocPrf Weight Path *> 10.0.0.0 192.168.0.1 0 0 65000 i *> 10.0.1.0/24 0.0.0.0 0 32768 i *> 10.0.20.0/24 192.168.0.1 0 0 65000 i ---------------------------