追加設定

DIAGRAM

NOTE

たとえばこんな構成があってsh ip bgp で確認したら

R2#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 10.0.0.1/32      10.0.0.3                 0    100      0 65000 i
 *>                   10.1.2.1                 0             0 65000 i
 * i 10.0.0.2/32      10.0.0.3            156160    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.0.0.3/32      10.0.0.3                 0    100      0 ?
 *>                   10.2.3.3            156160         32768 ?
 * i 10.0.0.4/32      10.0.0.3            156160    100      0 ?
 *>                   10.2.4.4            156160         32768 ?
 * i 10.2.3.0/24      10.0.0.3                 0    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.2.4.0/24      10.0.0.3             30720    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.3.4.0/24      10.0.0.3                 0    100      0 ?
 *>                   10.2.3.3             30720         32768 ?
 * i 192.168.4.0      10.0.0.3             30720    100      0 ?
 *>                   10.2.4.4             30720         32768 ?
R3#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 10.0.0.1/32      10.0.0.2                 0    100      0 65000 i
 *>                   10.1.3.1                 0             0 65000 i
 * i 10.0.0.2/32      10.0.0.2                 0    100      0 ?
 *>                   10.2.3.2            156160         32768 ?
 * i 10.0.0.3/32      10.0.0.2            156160    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.0.0.4/32      10.0.0.2            156160    100      0 ?
 *>                   10.3.4.4            156160         32768 ?
 * i 10.2.3.0/24      10.0.0.2                 0    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.2.4.0/24      10.0.0.2                 0    100      0 ?
 *>                   10.2.3.2             30720         32768 ?
 * i 10.3.4.0/24      10.0.0.2             30720    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 192.168.4.0      10.0.0.2             30720    100      0 ?
 *>                   10.3.4.4             30720         32768 ?

ここで192.168.0.0/16に集約して集約経路のみ広報しなさいと言われたとします。指示だけ考えれば

!!! R2,R3
router bgp 65001
 agg 192.168.0.0 255.255.0.0 sum

で済みます。その後のsh ip bgpは以下です。

R2#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 10.0.0.1/32      10.0.0.3                 0    100      0 65000 i
 *>                   10.1.2.1                 0             0 65000 i
 * i 10.0.0.2/32      10.0.0.3            156160    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.0.0.3/32      10.0.0.3                 0    100      0 ?
 *>                   10.2.3.3            156160         32768 ?
 * i 10.0.0.4/32      10.0.0.3            156160    100      0 ?
 *>                   10.2.4.4            156160         32768 ?
 * i 10.2.3.0/24      10.0.0.3                 0    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.2.4.0/24      10.0.0.3             30720    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.3.4.0/24      10.0.0.3                 0    100      0 ?
 *>                   10.2.3.3             30720         32768 ?
 * i 192.168.0.0/16   10.0.0.3            284160    100      0 ?
 *>                   0.0.0.0                            32768 i
 s>  192.168.4.0      10.2.4.4             30720         32768 ?
R3#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 10.0.0.1/32      10.0.0.2                 0    100      0 65000 i
 *>                   10.1.3.1                 0             0 65000 i
 * i 10.0.0.2/32      10.0.0.2                 0    100      0 ?
 *>                   10.2.3.2            156160         32768 ?
 * i 10.0.0.3/32      10.0.0.2            156160    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.0.0.4/32      10.0.0.2            156160    100      0 ?
 *>                   10.3.4.4            156160         32768 ?
 * i 10.2.3.0/24      10.0.0.2                 0    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.2.4.0/24      10.0.0.2                 0    100      0 ?
 *>                   10.2.3.2             30720         32768 ?
 * i 10.3.4.0/24      10.0.0.2             30720    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 *   192.168.0.0/16   0.0.0.0                            32768 i
 *>                   10.2.3.2            284160         32768 ?
 * i                  10.0.0.2                 0    100      0 i
 s>  192.168.4.0      10.3.4.4             30720         32768 ?

やっぱり/16の部分が気になります。R2は自分で集約生成したものとiBGPで受けたものだけ。R2/R3は冗長構成になっているので期待としては同じエントリ数になるはずがR3では3つある。しかもR3にしかないものがベスト。? があるのでincompleteで、Next HopアドレスがR2-R3のアドレスなのでR2からのEIGRP経路の再配送であることが分かります。
ちなみにR1で/16の見え方は

 *   192.168.0.0/16   10.1.3.3            284160             0 65001 ?
 *>                   10.1.2.2                 0             0 65001 i

これはこれで要件に影響がなければこのままもいいかもしれませんが、やはり気付いてしまった以上は何とかしたくなります。

!!! R2,R3
ip prefix REDIST-ROUTE s 10 deny 192.168.0.0/16
ip prefix REDIST-ROUTE s 100 per 0.0.0.0/0 le 32
route-map BGP-INTO-EIGRP per 10
 match ip add prefix REDIST-ROUTE
router ei 65001
 redist bgp 65001 metric 100000 10 255 1 1500 route-map BGP-INTO-EIGRP

追加設定後のsh ip bgp

R2#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 10.0.0.1/32      10.0.0.3                 0    100      0 65000 i
 *>                   10.1.2.1                 0             0 65000 i
 * i 10.0.0.2/32      10.0.0.3            156160    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.0.0.3/32      10.0.0.3                 0    100      0 ?
 *>                   10.2.3.3            156160         32768 ?
 * i 10.0.0.4/32      10.0.0.3            156160    100      0 ?
 *>                   10.2.4.4            156160         32768 ?
 * i 10.2.3.0/24      10.0.0.3                 0    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.2.4.0/24      10.0.0.3             30720    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.3.4.0/24      10.0.0.3                 0    100      0 ?
 *>                   10.2.3.3             30720         32768 ?
 * i 192.168.0.0/16   10.0.0.3                 0    100      0 i
 *>                   0.0.0.0                            32768 i
 s>  192.168.4.0      10.2.4.4             30720         32768 ?
R3#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 10.0.0.1/32      10.0.0.2                 0    100      0 65000 i
 *>                   10.1.3.1                 0             0 65000 i
 * i 10.0.0.2/32      10.0.0.2                 0    100      0 ?
 *>                   10.2.3.2            156160         32768 ?
 * i 10.0.0.3/32      10.0.0.2            156160    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.0.0.4/32      10.0.0.2            156160    100      0 ?
 *>                   10.3.4.4            156160         32768 ?
 * i 10.2.3.0/24      10.0.0.2                 0    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 * i 10.2.4.0/24      10.0.0.2                 0    100      0 ?
 *>                   10.2.3.2             30720         32768 ?
 * i 10.3.4.0/24      10.0.0.2             30720    100      0 ?
 *>                   0.0.0.0                  0         32768 ?
 *>  192.168.0.0/16   0.0.0.0                            32768 i
 * i                  10.0.0.2                 0    100      0 i
 s>  192.168.4.0      10.3.4.4             30720         32768 ?

R1の見え方

 *>  192.168.0.0/16   10.1.3.3                 0             0 65001 i
 *                    10.1.2.2                 0             0 65001 i

問題の指示には無くても、他で追加設定が発生しないかを忘れずに意識したいところです。

CONFIGURATION

hostname R1
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.1.2.1 255.255.255.0
 no shutdown
!
interface FastEthernet1/0
 ip address 10.1.3.1 255.255.255.0
 no shutdown
!
router bgp 65000
 bgp router-id 10.0.0.1
 network 10.0.0.1 mask 255.255.255.255
 neighbor 10.1.2.2 remote-as 65001
 neighbor 10.1.3.3 remote-as 65001
!
end
hostname R2
!
interface Loopback0
 ip address 10.0.0.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.1.2.2 255.255.255.0
 no shutdown
!
interface FastEthernet1/0
 ip address 10.2.4.2 255.255.255.0
 no shutdown
!
interface FastEthernet2/0
 ip address 10.2.3.2 255.255.255.0
 no shutdown
!
router eigrp 65001
 network 10.0.0.2 0.0.0.0
 network 10.2.3.2 0.0.0.0
 network 10.2.4.2 0.0.0.0
 redistribute bgp 65001 metric 10000 100 255 1 1500
 eigrp router-id 10.0.0.2
!
router bgp 65001
 bgp router-id 10.0.0.2
 redistribute eigrp 65001
 neighbor 10.0.0.3 remote-as 65001
 neighbor 10.0.0.3 update-source Loopback0
 neighbor 10.0.0.3 next-hop-self
 neighbor 10.1.2.1 remote-as 65000
!
end
hostname R3
!
interface Loopback0
 ip address 10.0.0.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.1.3.3 255.255.255.0
 no shutdown
!
interface FastEthernet1/0
 ip address 10.3.4.3 255.255.255.0
 no shutdown
!
interface FastEthernet2/0
 ip address 10.2.3.3 255.255.255.0
 no shutdown
!
router eigrp 65001
 network 10.0.0.3 0.0.0.0
 network 10.2.3.3 0.0.0.0
 network 10.3.4.3 0.0.0.0
 redistribute bgp 65001 metric 10000 100 255 1 1500
 eigrp router-id 10.0.0.3
!
router bgp 65001
 bgp router-id 10.0.0.3
 redistribute eigrp 65001
 neighbor 10.0.0.2 remote-as 65001
 neighbor 10.0.0.2 update-source Loopback0
 neighbor 10.0.0.2 next-hop-self
 neighbor 10.1.3.1 remote-as 65000
!
end
hostname R4
!
interface Loopback0
 ip address 10.0.0.4 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.2.4.4 255.255.255.0
 no shutdown
!
interface FastEthernet1/0
 ip address 10.3.4.4 255.255.255.0
 no shutdown
!
interface FastEthernet2/0
 ip address 192.168.4.4 255.255.255.0
 no shutdown
!
router eigrp 65001
 network 10.0.0.4 0.0.0.0
 network 10.2.4.4 0.0.0.0
 network 10.3.4.4 0.0.0.0
 network 192.168.4.4 0.0.0.0
 eigrp router-id 10.0.0.4
!
end

コメント