BGP とIGP を併用する場合の経路選択

スポンサーリンク
スポンサーリンク

NOTE

BGP とEIGRP or OSPF を同時に使う場合で、同じ経路を受信する時、先にIGP から受信しているとBGP から経路を受け取ってもAD 値に従った経路選択がおこなわれない。

 

現在の経路192.168.0.0/24 はEIGRPで学習。

Leaf201# show ip route vrf TN-1:VRF-1
IP Route Table for VRF "TN-1:VRF-1"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF 

10.0.0.11/32, ubest/mbest: 1/0
    *via 10.11.201.11, eth1/11, [90/130816], 00:01:22, eigrp-default, internal
10.11.201.0/24, ubest/mbest: 1/0, attached, direct
    *via 10.11.201.201, eth1/11, [0/0], 00:01:27, direct
10.11.201.201/32, ubest/mbest: 1/0, attached
    *via 10.11.201.201, eth1/11, [0/0], 00:01:27, local, local
192.168.0.0/24, ubest/mbest: 1/0
    *via 10.11.201.11, eth1/11, [90/130816], 00:01:22, eigrp-default, internal
Leaf201#

対向からeBGP による学習は無し。

Leaf201# show bgp ipv4 unicast vrf TN-1:VRF-1
BGP routing table information for VRF TN-1:VRF-1, address family IPv4 Unicast
BGP table version is 28, local router ID is 10.0.0.201
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup

   Network            Next Hop            Metric     LocPrf     Weight Path
*>r10.0.0.11/32       0.0.0.0             130816        100      32768 ?
*>r10.11.201.0/24     0.0.0.0                  0        100      32768 ?
*>r192.168.0.0/24     0.0.0.0             130816        100      32768 ?

その後、学習

Leaf201# show bgp ipv4 unicast vrf TN-1:VRF-1
BGP routing table information for VRF TN-1:VRF-1, address family IPv4 Unicast
BGP table version is 32, local router ID is 10.0.0.201
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup

   Network            Next Hop            Metric     LocPrf     Weight Path
*>r10.0.0.11/32       0.0.0.0             130816        100      32768 ?
*>e10.0.0.12/32       10.12.201.12             0                     0 65001 i
*>r10.11.201.0/24     0.0.0.0                  0        100      32768 ?
*>r10.12.201.0/24     0.0.0.0                  0        100      32768 ?
*>r192.168.0.0/24     0.0.0.0             130816        100      32768 ?
* e                   10.12.201.12             0                     0 65001 i

しかし、EIGRP のままベストパス切り替わらず。

Leaf201# show ip route vrf TN-1:VRF-1
IP Route Table for VRF "TN-1:VRF-1"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF 

10.0.0.11/32, ubest/mbest: 1/0
    *via 10.11.201.11, eth1/11, [90/130816], 00:03:47, eigrp-default, internal
10.0.0.12/32, ubest/mbest: 1/0
    *via 10.12.201.12%TN-1:VRF-1, [20/0], 00:01:04, bgp-65534, external, tag 65001
10.11.201.0/24, ubest/mbest: 1/0, attached, direct
    *via 10.11.201.201, eth1/11, [0/0], 00:03:52, direct
10.11.201.201/32, ubest/mbest: 1/0, attached
    *via 10.11.201.201, eth1/11, [0/0], 00:03:52, local, local
10.12.201.0/24, ubest/mbest: 1/0, attached, direct
    *via 10.12.201.201, eth1/12, [0/0], 00:01:10, direct
10.12.201.201/32, ubest/mbest: 1/0, attached
    *via 10.12.201.201, eth1/12, [0/0], 00:01:10, local, local
192.168.0.0/24, ubest/mbest: 1/0
    *via 10.11.201.11, eth1/11, [90/130816], 00:03:47, eigrp-default, internal
Leaf201#

 

修正予定無しらしいのでBGP とEIGRP or OSPF を同時に使う場合は注意したい。
BGP 側でWeight を調整すれば切り替わる。

Leaf201# show bgp ipv4 unicast vrf TN-1:VRF-1
BGP routing table information for VRF TN-1:VRF-1, address family IPv4 Unicast
BGP table version is 35, local router ID is 10.0.0.201
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup

   Network            Next Hop            Metric     LocPrf     Weight Path
*>r10.0.0.11/32       0.0.0.0             130816        100      32768 ?
*>e10.0.0.12/32       10.12.201.12             0                 40000 65001 i
*>r10.11.201.0/24     0.0.0.0                  0        100      32768 ?
*>r10.12.201.0/24     0.0.0.0                  0        100      32768 ?
*>e192.168.0.0/24     10.12.201.12             0                 40000 65001 i


Leaf201# show ip route vrf TN-1:VRF-1
IP Route Table for VRF "TN-1:VRF-1"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF 

10.0.0.11/32, ubest/mbest: 1/0
    *via 10.11.201.11, eth1/11, [90/130816], 01:04:30, eigrp-default, internal
10.0.0.12/32, ubest/mbest: 1/0
    *via 10.12.201.12%TN-1:VRF-1, [20/0], 00:00:40, bgp-65534, external, tag 65001
10.11.201.0/24, ubest/mbest: 1/0, attached, direct
    *via 10.11.201.201, eth1/11, [0/0], 01:04:35, direct
10.11.201.201/32, ubest/mbest: 1/0, attached
    *via 10.11.201.201, eth1/11, [0/0], 01:04:35, local, local
10.12.201.0/24, ubest/mbest: 1/0, attached, direct
    *via 10.12.201.201, eth1/12, [0/0], 01:01:53, direct
10.12.201.201/32, ubest/mbest: 1/0, attached
    *via 10.12.201.201, eth1/12, [0/0], 01:01:53, local, local
192.168.0.0/24, ubest/mbest: 1/0
    *via 10.12.201.12%TN-1:VRF-1, [20/0], 00:00:40, bgp-65534, external, tag 65001
Leaf201#

 

コメント