Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

iBGP Prefix Receive Issue

Dear All Expert:

Hi, I have a small network query and wish to get some clarification. My company have "Router A" and "Router B" at 2 location running iBGP between them and each of the router running eBGP with 1 upstream.

Problem is both router receive full routes from upstream but when they annouce internet route to each other, it is not full routes.

Seems as "Router A" will only announce to "Router B" best routes from upstream AS9214 after compare both upstream AS Path. I though "Router A" should announce to "Router B" all the BGP prefix that it learn from AS9214?

Router A
========
Router A#sh ip bgp summary
Neighbor V   AS  MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
128.119.23.19  4 9214  49021239 1499699 143761299    0    0 16w2d      322184
23.16.14.2 4 18345 37736012 28404625 143761300    0    0 7w3d       290606

router bgp 18345
no synchronization
bgp log-neighbor-changes
neighbor 23.16.14.2 remote-as 18345
neighbor 23.16.14.2 ebgp-multihop 5
neighbor 23.16.14.2 next-hop-self
neighbor 128.119.23.19 remote-as 9214
neighbor 128.119.23.19 soft-reconfiguration inbound
neighbor 128.119.23.19 route-map prefix-outbound out
no auto-summary


Router B
========
Router B#sh ip bgp summary
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
213.144.67.119  4  4859 25060502  540991 104978581    0    0 28w2d      315753
23.16.14.1 4 18345 10542079 12520786 104978581    0    0 7w3d       141969

router bgp 18345
no synchronization
bgp log-neighbor-changes
network 23.16.14.0 mask 255.255.248.0
neighbor 23.16.14.1 remote-as 18345
neighbor 23.16.14.1 ebgp-multihop 5
neighbor 23.16.14.1 next-hop-self
no auto-summary

Thanks alot for everyone kind help.

Regards,

Victor

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: iBGP Prefix Receive Issue

Hello Yaw,

router A will not advertise to router B the prefixes that are BGP best path and are received from router RouterB.

let's take an example:

* i2.96.0.0/14      23.16.14.2                100      0 4859 6461 13285 13285 13285 13285 13285 13285 i

routerA receives this prefix but it does not consider it a best path (missing > ) the initial i means received over an iBGP session

as a result of this RouterA advertises its best path to RouterB:

*> 2.96.0.0/14      128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i

it happens that routerB  is receiving better routes (with shorter As path) and for this most of its routes are installed on routerA

See

>> outer A#sh ip bgp 4.23.89.0/24

BGP routing table entry for 4.23.89.0/24, version 144947637

Paths: (3 available, best #1, table Default-IP-Routing-Table)

  Not advertised to any peer

  4859 7018 46164

    23.16.14.2 from 23.16.14.2 (23.16.14.24)

      Origin IGP, localpref 100, valid, internal, best

  9214 6453 7018 46164

    128.119.23.19 from 128.119.23.19 (118.143.225.129)

      Origin IGP, localpref 100, valid, external

  9214 6453 7018 46164, (received-only)

    128.119.23.19 from 128.119.23.19 (118.143.225.129)

      Origin IGP, localpref 100, valid, external

as you see the path from iBGP peer is shorter 4859 7018 46164 then  9214 6453 7018 46164

this kind of setup provides automatic route optimization.

if you want Router B to use eBGP routes first you need to enforce a local weight for eBGP peer like

router bgp XX

neigh 128.119.23.19 weight 500

in this way RouterA will prefer all eBGP routes coming from its directly connected eBGP peer

a similar setting can be done on RouterB to have it to prefer true eBGP routes

eBGP route is preferred over a route coming over the iBGP session if AS path lengths are equal

Hope to help

Giuseppe

6 REPLIES
VIP Super Bronze

Re: iBGP Prefix Receive Issue

victorcom wrote:

Dear All Expert:

Hi, I have a small network query and wish to get some clarification. My company have "Router A" and "Router B" at 2 location running iBGP between them and each of the router running eBGP with 1 upstream.

Problem is both router receive full routes from upstream but when they annouce internet route to each other, it is not full routes.

Seems as "Router A" will only announce to "Router B" best routes from upstream AS9214 after compare both upstream AS Path. I though "Router A" should announce to "Router B" all the BGP prefix that it learn from AS9214?

Router A
========
Router A#sh ip bgp summary
Neighbor V   AS  MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
128.119.23.19  4 9214  49021239 1499699 143761299    0    0 16w2d      322184
23.16.14.2 4 18345 37736012 28404625 143761300    0    0 7w3d       290606

router bgp 18345
no synchronization
bgp log-neighbor-changes
neighbor 23.16.14.2 remote-as 18345
neighbor 23.16.14.2 ebgp-multihop 5
neighbor 23.16.14.2 next-hop-self
neighbor 128.119.23.19 remote-as 9214
neighbor 128.119.23.19 soft-reconfiguration inbound
neighbor 128.119.23.19 route-map prefix-outbound out
no auto-summary


Router B
========
Router B#sh ip bgp summary
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
213.144.67.119  4  4859 25060502  540991 104978581    0    0 28w2d      315753
23.16.14.1 4 18345 10542079 12520786 104978581    0    0 7w3d       141969

router bgp 18345
no synchronization
bgp log-neighbor-changes
network 23.16.14.0 mask 255.255.248.0
neighbor 23.16.14.1 remote-as 18345
neighbor 23.16.14.1 ebgp-multihop 5
neighbor 23.16.14.1 next-hop-self
no auto-summary

Thanks alot for everyone kind help.

Regards,

Victor

Hi Victor,

From the config you posted, you have configured EBGP between router-A and router-B not IBGP.  Route-B peers with 18345 and I don't see the statement for peering with your external AS.

Can you clarify?

HTH

Reza

New Member

Re: iBGP Prefix Receive Issue

Please paste the show ip bgp from both routers for comparision for atleast 1 path.

REgards,

bhavesh

Hall of Fame Super Silver

Re: iBGP Prefix Receive Issue

Hello Yaw,

you have configured ebgp multihop 5 over the iBGP session, this is not needed but it is not related to what you see.

what you see can be normal, because the iBGP session allows each device to compare the eBGP routes received from local eBGP peer with the eBGP routes received on the other upstream link/provider

each device stops to advertise to iBGP peer all prefixes for which the best path is via the iBGP peer itself (split horizon)

you have two different upstream providers AS 9214 and AS 4859 you receive two different full BGP tables.

Both provide full coverage of the internet destinations but they are different ( some prefixes can be more specific on one, or AS path length can be shorter)

Hope to help

Giuseppe

New Member

Re: iBGP Prefix Receive Issue

Dear All:

Sorry for my late reply. I have remove the ebgp multihop command and clear the iBGP session but problem is still there.

Router A receive full routes from Router B but cannot advertise full route learn from local eBGP peer to Router B. With your explaination below, Router B should stops advertise to Router A all prefixes for which the best path is via Router A itself but this is not the case..

Router A
========

router bgp 18345
no synchronization
bgp log-neighbor-changes
neighbor 23.16.14.2 remote-as 18345
neighbor 23.16.14.2 next-hop-self
neighbor 128.119.23.19 remote-as 9214
neighbor 128.119.23.19 soft-reconfiguration inbound
neighbor 128.119.23.19 route-map prefix-outbound out
no auto-summary


#routes receive from iBGP peer (full route)

Router A#sh ip bgp neighbors 23.16.14.2 routes
BGP table version is 146014906, local router ID is 218.189.23.150
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
r>i0.0.0.0          23.16.14.2           0    100      0 4859 i
*>i1.12.0.0/24      23.16.14.2                100      0 4859 4134 4847 18245 i
*>i1.12.0.0/14      23.16.14.2                100      0 4859 4134 4847 18245 i
*>i1.24.0.0/13      23.16.14.2                100      0 4859 4837 i
* i1.34.0.0/15      23.16.14.2                100      0 4859 3462 i
* i1.160.0.0/12     23.16.14.2                100      0 4859 3462 i
* i2.96.0.0/14      23.16.14.2                100      0 4859 6461 13285 13285 13285 13285 13285 13285 i
* i2.96.0.0/13      23.16.14.2                100      0 4859 6461 13285 13285 13285 13285 13285 13285 i
* i2.100.0.0/14     23.16.14.2                100      0 4859 6461 13285 13285 13285 13285 13285 13285 i
*>i2.104.0.0/13     23.16.14.2                100      0 4859 3292 i
*>i2.112.0.0/15     23.16.14.2                100      0 4859 6762 3269 i
*>i2.114.0.0/15     23.16.14.2                100      0 4859 6762 3269 i
* i2.120.0.0/13     23.16.14.2                100      0 4859 4589 5607 i
*>i3.51.92.0/23     23.16.14.2                100      0 4859 7018 ?
* i4.0.0.0/9        23.16.14.2                100      0 4859 3549 3356 i
* i4.0.0.0          23.16.14.2                100      0 4859 3549 3356 i
*>i4.21.103.0/24    23.16.14.2                100      0 4859 3549 46133 i
*>i4.23.88.0/24     23.16.14.2                100      0 4859 7018 46164 i
*>i4.23.88.0/23     23.16.14.2                100      0 4859 7018 46164 i
*>i4.23.89.0/24     23.16.14.2                100      0 4859 7018 46164 i
*>i4.23.92.0/23     23.16.14.2                100      0 4859 7018 46164 i
*>i4.23.92.0/22     23.16.14.2                100      0 4859 7018 46164 i
*>i4.23.94.0/23     23.16.14.2                100      0 4859 7018 46164 i
*>i4.23.112.0/24    23.16.14.2                100      0 4859 174 21889 i
*>i4.23.113.0/24    23.16.14.2                100      0 4859 174 21889 i
*>i4.23.114.0/24    23.16.14.2                100      0 4859 174 21889 i
*>i4.36.118.0/24    23.16.14.2                100      0 4859 174 21889 i
*>i4.38.0.0/21      23.16.14.2                100      0 4859 7018 46164 i
*>i4.38.0.0/20      23.16.14.2                100      0 4859 7018 46164 i
*>i4.38.8.0/21      23.16.14.2                100      0 4859 7018 46164 i
*>i4.43.50.0/24     23.16.14.2                100      0 4859 7018 46164 i
*>i4.43.50.0/23     23.16.14.2                100      0 4859 7018 46164 i
*>i4.43.51.0/24     23.16.14.2                100      0 4859 7018 46164 i
* i4.53.201.0/24    23.16.14.2                100      0 4859 6939 18779 26481 i


#routes advertise to iBGP peer (partial route)

Router A#sh ip bgp neighbors 23.16.14.2 advertised-routes
BGP table version is 146015147, local router ID is 218.189.23.150
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
*> 1.34.0.0/15      128.119.23.19                100      0 9214 3462 i
*> 1.160.0.0/12     128.119.23.19                100      0 9214 3462 i
*> 2.80.0.0/14      128.119.23.19                100      0 9214 6453 3356 8657 3243 i
*> 2.96.0.0/14      128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i
*> 2.96.0.0/13      128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i
*> 2.100.0.0/14     128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i
*> 2.120.0.0/13     128.119.23.19                100      0 9214 4589 5607 i
*> 3.0.0.0          128.119.23.19                100      0 9214 80 i
*> 4.0.0.0/9        128.119.23.19                100      0 9214 6453 3356 i
*> 4.0.0.0          128.119.23.19                100      0 9214 6453 3356 i
*> 4.53.201.0/24    128.119.23.19                100      0 9214 26769 18779 26481 i
*> 4.79.181.0/24    128.119.23.19                100      0 9214 10310 14780 i
*> 4.79.248.0/24    128.119.23.19                100      0 9214 22212 12180 i
*> 4.128.0.0/9      128.119.23.19                100      0 9214 6453 3356 i
*> 8.0.0.0/9        128.119.23.19                100      0 9214 6453 3356 i
*> 8.0.0.0          128.119.23.19                100      0 9214 6453 3356 i
*> 8.2.5.0/24       128.119.23.19                100      0 9214 6453 3356 22645 i
*> 8.2.96.0/24      128.119.23.19                100      0 9214 6453 3356 53393 i
*> 8.2.120.0/24     128.119.23.19                100      0 9214 3257 20473 i
*> 8.2.121.0/24     128.119.23.19                100      0 9214 3257 20473 i
*> 8.2.122.0/24     128.119.23.19                100      0 9214 3257 20473 i
*> 8.2.129.0/24     128.119.23.19                100      0 9214 6453 3356 30662 i
*> 8.3.22.0/23      128.119.23.19                100      0 9214 26769 40165 i
*> 8.3.26.0/23      128.119.23.19                100      0 9214 26769 i
*> 8.3.34.0/23      128.119.23.19                100      0 9214 10310 17110 i
*> 8.3.37.0/24      128.119.23.19                100      0 9214 6453 3356 21640 21640 i
*> 8.3.46.0/24      128.119.23.19                100      0 9214 6453 3356 21640 21640 i
*> 8.3.64.0/23      128.119.23.19                100      0 9214 6453 3356 16743 i


#routes receive from eBGP peer (full route)

Router A#sh ip bgp neighbors 128.119.23.19 routes
BGP table version is 146014970, local router ID is 218.189.23.150
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
*  1.12.0.0/24      128.119.23.19                100      0 9214 3257 4134 4847 18245 i
*  1.12.0.0/14      128.119.23.19                100      0 9214 3257 4134 4847 18245 i
*  1.24.0.0/13      128.119.23.19                100      0 9214 6453 4837 4837 4837 i
*> 1.34.0.0/15      128.119.23.19                100      0 9214 3462 i
*> 1.160.0.0/12     128.119.23.19                100      0 9214 3462 i
*> 2.80.0.0/14      128.119.23.19                100      0 9214 6453 3356 8657 3243 i
*> 2.96.0.0/14      128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i
*> 2.96.0.0/13      128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i
*> 2.100.0.0/14     128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i
*  2.104.0.0/13     128.119.23.19                100      0 9214 3257 3292 i
*  2.112.0.0/15     128.119.23.19                100      0 9214 6453 6762 3269 i
*  2.114.0.0/15     128.119.23.19                100      0 9214 6453 6762 3269 i
*> 2.120.0.0/13     128.119.23.19                100      0 9214 4589 5607 i
*> 3.0.0.0          128.119.23.19                100      0 9214 80 i
*  3.51.92.0/23     128.119.23.19                100      0 9214 6453 7018 ?
*> 4.0.0.0/9        128.119.23.19                100      0 9214 6453 3356 i
*> 4.0.0.0          128.119.23.19                100      0 9214 6453 3356 i
*  4.21.103.0/24    128.119.23.19                100      0 9214 6453 3549 46133 i
*  4.23.88.0/24     128.119.23.19                100      0 9214 6453 7018 46164 i
*  4.23.88.0/23     128.119.23.19                100      0 9214 6453 7018 46164 i
*  4.23.89.0/24     128.119.23.19                100      0 9214 6453 7018 46164 i
*  4.23.92.0/23     128.119.23.19                100      0 9214 6453 7018 46164 i
*  4.23.92.0/22     128.119.23.19                100      0 9214 6453 7018 46164 i
*  4.23.94.0/23     128.119.23.19                100      0 9214 6453 7018 46164 i


Router A#sh ip bgp 2.120.0.0/13
BGP routing table entry for 2.120.0.0/13, version 143202013
Paths: (3 available, best #2, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  23.16.14.2
  4859 4589 5607
    23.16.14.2 from 23.16.14.2 (23.16.14.24)
      Origin IGP, localpref 100, valid, internal
  9214 4589 5607
    128.119.23.19 from 128.119.23.19 (118.143.225.129)
      Origin IGP, localpref 100, valid, external, best
  9214 4589 5607, (received-only)
    128.119.23.19 from 128.119.23.19 (118.143.225.129)
      Origin IGP, localpref 100, valid, external


Router A#sh ip bgp 4.23.89.0/24
BGP routing table entry for 4.23.89.0/24, version 144947637
Paths: (3 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  4859 7018 46164
    23.16.14.2 from 23.16.14.2 (23.16.14.24)
      Origin IGP, localpref 100, valid, internal, best
  9214 6453 7018 46164
    128.119.23.19 from 128.119.23.19 (118.143.225.129)
      Origin IGP, localpref 100, valid, external
  9214 6453 7018 46164, (received-only)
    128.119.23.19 from 128.119.23.19 (118.143.225.129)
      Origin IGP, localpref 100, valid, external

Hall of Fame Super Silver

Re: iBGP Prefix Receive Issue

Hello Yaw,

router A will not advertise to router B the prefixes that are BGP best path and are received from router RouterB.

let's take an example:

* i2.96.0.0/14      23.16.14.2                100      0 4859 6461 13285 13285 13285 13285 13285 13285 i

routerA receives this prefix but it does not consider it a best path (missing > ) the initial i means received over an iBGP session

as a result of this RouterA advertises its best path to RouterB:

*> 2.96.0.0/14      128.119.23.19                100      0 9214 3257 13285 13285 13285 13285 13285 13285 i

it happens that routerB  is receiving better routes (with shorter As path) and for this most of its routes are installed on routerA

See

>> outer A#sh ip bgp 4.23.89.0/24

BGP routing table entry for 4.23.89.0/24, version 144947637

Paths: (3 available, best #1, table Default-IP-Routing-Table)

  Not advertised to any peer

  4859 7018 46164

    23.16.14.2 from 23.16.14.2 (23.16.14.24)

      Origin IGP, localpref 100, valid, internal, best

  9214 6453 7018 46164

    128.119.23.19 from 128.119.23.19 (118.143.225.129)

      Origin IGP, localpref 100, valid, external

  9214 6453 7018 46164, (received-only)

    128.119.23.19 from 128.119.23.19 (118.143.225.129)

      Origin IGP, localpref 100, valid, external

as you see the path from iBGP peer is shorter 4859 7018 46164 then  9214 6453 7018 46164

this kind of setup provides automatic route optimization.

if you want Router B to use eBGP routes first you need to enforce a local weight for eBGP peer like

router bgp XX

neigh 128.119.23.19 weight 500

in this way RouterA will prefer all eBGP routes coming from its directly connected eBGP peer

a similar setting can be done on RouterB to have it to prefer true eBGP routes

eBGP route is preferred over a route coming over the iBGP session if AS path lengths are equal

Hope to help

Giuseppe

Re: iBGP Prefix Receive Issue

Hi Yaw,

Router A will advertis all prefixes learned from its ebgp peer to Router B (if no filtering in place) , but it will not advertise prefixes that learned by Router B itself. its then the decision of Router B to choose if it has better path for those prefixes or not.

If router B has better path for those prefixe, its then not installed as best path, if Router B has Router A as best path for those prefixes , then its installed as best path.

Hope it helps,

Mohamed

840
Views
0
Helpful
6
Replies
CreatePlease to create content