Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

IBgp issue

bgp part1.JPG

AS 2 Ibpg  configured with ospf, on Router 3 and Router 5 both ebgp routes appear in route table, but on R4 and R6 there is no Ebgp routes.Goal is need to ping from R1 to R2 loop back address.

R5

R5#sh ip bgp 

BGP table version is 6, local router ID is 5.5.5.5

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

*>i1.1.1.1/32       3.3.3.3                  0    100      0 1 i

*> 2.2.2.2/32       192.168.52.2             0             0 3 i

*>i192.168.13.0     3.3.3.3                  0    100      0 1 i

r> 192.168.52.0     192.168.52.2             0             0 3 i

R5#sh ip route bgp

     1.0.0.0/32 is subnetted, 1 subnets

B       1.1.1.1 [200/0] via 3.3.3.3, 00:26:14

B    192.168.13.0/24 [200/0] via 3.3.3.3, 00:26:14

     2.0.0.0/32 is subnetted, 1 subnets

B       2.2.2.2 [20/0] via 192.168.52.2, 00:26:19

R5#sh run | sec bgp

router bgp 2

no synchronization

bgp log-neighbor-changes

neighbor 3.3.3.3 remote-as 2

neighbor 3.3.3.3 update-source Loopback0

neighbor 3.3.3.3 next-hop-self

neighbor 4.4.4.4 remote-as 2

neighbor 4.4.4.4 update-source Loopback0

neighbor 6.6.6.6 remote-as 2

neighbor 6.6.6.6 update-source Loopback0

neighbor 192.168.52.2 remote-as 3

no auto-summary

R3

R3#sh ip bgp

BGP table version is 6, local router ID is 3.3.3.3

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.1.1.1/32       192.168.13.1             0             0 1 i

*>i2.2.2.2/32       5.5.5.5                  0    100      0 3 i

r> 192.168.13.0     192.168.13.1             0             0 1 i

*>i192.168.52.0     5.5.5.5                  0    100      0 3 i

R3#sh ip route bgp

     1.0.0.0/32 is subnetted, 1 subnets

B       1.1.1.1 [20/0] via 192.168.13.1, 00:26:47

     2.0.0.0/32 is subnetted, 1 subnets

B       2.2.2.2 [200/0] via 5.5.5.5, 00:26:47

B    192.168.52.0/24 [200/0] via 5.5.5.5, 00:26:47

R3#sh run | sec bp

R3#sh run | sec bgp

router bgp 2

no synchronization

bgp log-neighbor-changes

neighbor 4.4.4.4 remote-as 2

neighbor 4.4.4.4 update-source Loopback0

neighbor 5.5.5.5 remote-as 2

neighbor 5.5.5.5 update-source Loopback0

neighbor 5.5.5.5 next-hop-self

neighbor 6.6.6.6 remote-as 2

neighbor 6.6.6.6 update-source Loopback0

neighbor 192.168.13.1 remote-as 1

no auto-summary

R3#

R4

R4#sh ip bgp

BGP table version is 5, local router ID is 4.4.4.4

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

* i1.1.1.1/32       192.168.13.1             0    100      0 1 i

* i2.2.2.2/32       192.168.52.2             0    100      0 3 i

* i192.168.13.0     192.168.13.1             0    100      0 1 i

* i192.168.52.0     192.168.52.2             0    100      0 3 i

R4#sh ip route bgp

R4#sh run | sec bgp

router bgp 2

no synchronization

bgp log-neighbor-changes

neighbor 3.3.3.3 remote-as 2

neighbor 3.3.3.3 update-source Loopback0

neighbor 5.5.5.5 remote-as 2

neighbor 5.5.5.5 update-source Loopback0

neighbor 6.6.6.6 remote-as 2

neighbor 6.6.6.6 update-source Loopback0

no auto-summary

R6#sh ip bgp

BGP table version is 5, local router ID is 6.6.6.6

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

* i1.1.1.1/32       192.168.13.1             0    100      0 1 i

* i2.2.2.2/32       192.168.52.2             0    100      0 3 i

* i192.168.13.0     192.168.13.1             0    100      0 1 i

* i192.168.52.0     192.168.52.2             0    100      0 3 i

R6#sh ip route bgp

R6#sh run | sec bgp

router bgp 2

no synchronization

bgp log-neighbor-changes

neighbor 3.3.3.3 remote-as 2

neighbor 3.3.3.3 update-source Loopback0

neighbor 4.4.4.4 remote-as 2

neighbor 4.4.4.4 update-source Loopback0

neighbor 5.5.5.5 remote-as 2

neighbor 5.5.5.5 update-source Loopback0

no auto-summary

R1

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

C       1.1.1.1 is directly connected, Loopback0

C    192.168.13.0/24 is directly connected, Serial1/0

     2.0.0.0/32 is subnetted, 1 subnets

B       2.2.2.2 [20/0] via 192.168.13.3, 00:28:25

B    192.168.52.0/24 [20/0] via 192.168.13.3, 00:28:25

R1#sh ip ngp

          ^

% Invalid input detected at '^' marker.

R1#sh ip bgp

BGP table version is 5, local router ID is 1.1.1.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

*> 1.1.1.1/32       0.0.0.0                  0         32768 i

*> 2.2.2.2/32       192.168.13.3                           0 2 3 i

*> 192.168.13.0     0.0.0.0                  0         32768 i

*> 192.168.52.0     192.168.13.3                           0 2 3 i

R1#sh run | sec bgp

router bgp 1

no synchronization

bgp log-neighbor-changes

network 1.1.1.1 mask 255.255.255.255

network 192.168.13.0

neighbor 192.168.13.3 remote-as 2

no auto-summary

R2

R2#sh ip bgp

BGP table version is 5, local router ID is 2.2.2.2

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.1.1.1/32       192.168.52.5                           0 2 1 i

*> 2.2.2.2/32       0.0.0.0                  0         32768 i

*> 192.168.13.0     192.168.52.5                           0 2 1 i

*> 192.168.52.0     0.0.0.0                  0         32768 i

R2#sh ip route bgp

     1.0.0.0/32 is subnetted, 1 subnets

B       1.1.1.1 [20/0] via 192.168.52.5, 00:29:29

B    192.168.13.0/24 [20/0] via 192.168.52.5, 00:29:29

R2#sh run | sec bgp

router bgp 3

no synchronization

bgp log-neighbor-changes

network 2.2.2.2 mask 255.255.255.255

network 192.168.52.0

neighbor 192.168.52.5 remote-as 2

no auto-summary

2 ACCEPTED SOLUTIONS

Accepted Solutions
Purple

IBgp issue

Hi Jon,

if only  r3 and r5 are BGP peers in AS2 then the middle routers will be blackholing the traffic  because they don't know about the BGP routes  from external ASes.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
Hall of Fame Super Blue

Re: IBgp issue

It's what i described in the post where i made an error.

R3 and R5 learnt the EBGP routes via IBGP because you had an IBGP peering between R3 and R5. There is no direct connection between them but that is not a requirement of IBGP.

If in your original setup you had not setup an IBGP peering between R3 and R5 it would not have worked. This is because if an IBGP router receives a route from an IBGP peer it cannot then advertise that route to another IBGP peer.

So if R5 advertised 2.2.2.2 to R4 and R6 they cannot then advertise that route to R3. R3 knows about that route because you have an IBGP peering between R3 and R5.

The way round this IBGP rule, as i said before, is to either have a full mesh so every router has an IBGP peering with every other router or to use route reflectors which relax the rule about not being able to advertise routes between IBGP peers.

You can confirm this by running IBGP on all routers within that AS but do not setup an IBGP peering from R3 to R5.

Jon

18 REPLIES
Hall of Fame Super Blue

IBgp issue

If you do a "sh ip route" on R4 is there is route for 192.168.52.2 ?

It looks like the same problem as before. R4 may have entry in it's BGP table for 192.168.52.2 but it needs it in the IP routing table.

So if that route is not in the IP routing table on R4 and R6 add the "next-hop self" command to R3 and R5 for their peerings with R4 and R6.

Jon

New Member

IBgp issue

0kay now i have bgp routes in R4 and R6 but still not able to ping 1.1.1.1 or 2.2.2.2

R6#sh ip route bgp

     1.0.0.0/32 is subnetted, 1 subnets

B       1.1.1.1 [200/0] via 3.3.3.3, 00:07:59

B    192.168.13.0/24 [200/0] via 3.3.3.3, 00:07:59

     2.0.0.0/32 is subnetted, 1 subnets

B       2.2.2.2 [200/0] via 5.5.5.5, 00:08:38

B    192.168.52.0/24 [200/0] via 5.5.5.5, 00:08:38

R6#sh run | sec bgp

router bgp 2

no synchronization

bgp log-neighbor-changes

neighbor 3.3.3.3 remote-as 2

neighbor 3.3.3.3 update-source Loopback0

neighbor 3.3.3.3 next-hop-self

neighbor 4.4.4.4 remote-as 2

neighbor 5.5.5.5 remote-as 2

neighbor 5.5.5.5 update-source Loopback0

neighbor 5.5.5.5 next-hop-self

no auto-summary

Hall of Fame Super Blue

Re: IBgp issue

When you ping from R4 or R6 the source IP will 192.168.45/65.x respecitvely but R2 does not have routes in it's IP routing table for these subnets.

If you want to be able to ping from R4/R6 you would need to advertise those subnets to R2. You can do this with -

1)   "network ..." commands on R5 under the BGP configuration

or

2) a "redistribute connected" under the BGP configuration on R5

Jon

New Member

IBgp issue

Okay, if remove bgp from  R4 and R6, can we able to ping from As 1 to As 3 using R5 and R3 ?

Purple

IBgp issue

Hi,

In this case you'll have to redistribute those specific BGP routes into your IGP or run MPLS in your core.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
New Member

IBgp issue

If i do so, it will receive lot of prefix from bgp to ospf, and ospf not going handle 350k + prefix

Hall of Fame Super Blue

Re: IBgp issue

You do not need to redistribute BGP into OSPF because you have an IBGP peering between R3 and R5. OSPF in your setup is simply used to provide reachability between R3 and R5.

So as long as you use the "next-hop self" command you should be fine.

Bear in mind that when you had IBGP on R4/R6 any routes received by R5 from R2 were advertised to R3, R4 and R6 but R4 and R6 did then not advertise the same routes to R3.

This is because an IBGP router that learns a route from an IBGP peer cannot then advertise it to another IBGP peer. Your setup worked because you also had an IBGP peering between R3 and R5 even though it actually went via R4 or R6 ie. there is no direct link between R3 and R5.

You can overcome the IBGP issue with a full mesh ie. every IBGP router peers with every other IBGP router whether over direct links or indirect links although direct are better or you can use route reflectors.

Jon

Purple

IBgp issue

Hi Jon,

if only  r3 and r5 are BGP peers in AS2 then the middle routers will be blackholing the traffic  because they don't know about the BGP routes  from external ASes.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
Hall of Fame Super Blue

Re: IBgp issue

Hi Alain

You are completely correct, my mistake.

Thanks for correcting.

Jon

Hall of Fame Super Blue

Re: IBgp issue

Alain

I'm must remember to save this post for when there is yet another discussion about ratings in the social forums and everyone (except myself and Rick) argues for removing the lower marks.

It's posts like the one above that should actually get that rating because it's just basic routing.

Once again, thanks for stepping in and clearing things up

Jon

Purple

IBgp issue

Hi Jon,

I don't mind about ratings so much as to ask the deletion of 1 or 2 marks but sometimes we solve problems(whether they are basic or not is just a point of view and what is basic for me may not be for the poster) and we only get 1-2 marks then indeed it is disappointing but this is very rare and my first objective here is not points even if my signature could be interpreted in another way 

By the way thanks for the +5 

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
Purple

IBgp issue

Hi,

If i do so, it will receive lot of prefix from bgp to ospf, and ospf not going handle 350k + prefix 

that's why I said:

In this case you'll have to redistribute those specific BGP routes into your IGP or run MPLS in your core.

Using a route-map.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Re: IBgp issue

Hello

Alain - As I see it you dont need to to redistribute bgp into ospf-

As long as the IBGP "core* has  a full mesh with synchronization turned off and full NRLI via ospf  then all should be fine- and R1=R2 should be able to reach each other via their loopbacks

Would be nice to see the IGP config for routers R3-6

res

Paul

Please don't forget to rate any posts that have been helpful.

Thanks.

Please don't forget to rate any posts that have been helpful. Thanks.
Purple

IBgp issue

Hi Paul,

If there is no BGP on the middle routers then how wil they know about the BGP prefixes unless we redistribute or use static routes ?

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.
New Member

Re: IBgp issue

i forget to ask one thing, if middle router don't know about bgp routes then how r3 and r5 exchange their ebgp routes between as, it should came from r4 or r6 am right ?

Hall of Fame Super Blue

Re: IBgp issue

It's what i described in the post where i made an error.

R3 and R5 learnt the EBGP routes via IBGP because you had an IBGP peering between R3 and R5. There is no direct connection between them but that is not a requirement of IBGP.

If in your original setup you had not setup an IBGP peering between R3 and R5 it would not have worked. This is because if an IBGP router receives a route from an IBGP peer it cannot then advertise that route to another IBGP peer.

So if R5 advertised 2.2.2.2 to R4 and R6 they cannot then advertise that route to R3. R3 knows about that route because you have an IBGP peering between R3 and R5.

The way round this IBGP rule, as i said before, is to either have a full mesh so every router has an IBGP peering with every other router or to use route reflectors which relax the rule about not being able to advertise routes between IBGP peers.

You can confirm this by running IBGP on all routers within that AS but do not setup an IBGP peering from R3 to R5.

Jon

Re: IBgp issue

Hello

If R4-R6 routers are running OSPF only they are unaware of any bgp routes,

As Alian as suggested the R3 -R5 are running OSPF/BGP (ebgp &ibgp) but these routing processes are unaware of each other routes ( SIN routing)

So when you redistribute the specific bgp routes on R3 (1.1.1.1) -  R5 (2.2.2.2)  via a route-map into ospf then  with your ibgp peering will have a valid path and reachability will be available.

However if you remove the ibgp peering between R3/R5 you will need to perform mutual redistribution on these routers to gain reachability.

@Alian

Somewhere I must of mis-interpreted the OP query as looking through it I see full IBGP hence my post -

Yes without full ibgp peering in the "core" network totally agree with the redistribution.

res

Paul

Please don't forget to rate any posts that have been helpful.


Thanks.

Please don't forget to rate any posts that have been helpful. Thanks.
Hall of Fame Super Blue

IBgp issue

Paul

At the risk of making yet another basic error in this post

I think the point was that the OP was asking what would he need to do if he turned off IBGP on R4 and R6.

You are totally correct in that if R4 and R6 were running IBGP it would work.

Jon

275
Views
5
Helpful
18
Replies
CreatePlease login to create content