cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8714
Views
15
Helpful
7
Replies

iBGP to eBGP advertisement

ajitkgiri
Level 1
Level 1

Hi,

I am preparing for CCIE. I have created a basic iBGP and eBGP scenario which is attached below. Overall I want to give you a brief idea about the diagram.

(1) R1,R2,R3,R4 are all running OSPF 10. All these routers are coming under AS65000. Even iBGP is running among all routers.

(2) R3 is the Edge router which has formed eBGP neighborship with R5 (Neighborship is formed over the link between R3 and R5).

(3) R5 belong to AS65100.

(4) R1 L0: 10.0.0.1/32 used for OSPF and L1: 99.99.99.99/32 used for iBGP advertisement.

(5) R2 L0: 20.0.0.1/32 used for OSPF // R3 L0: 30.0.0.1/32 used for OSPF // R4 L0: 40.0.0.1/32 used for OSPF.

(6) R5 L0: 51.51.51.51/32 used for eBGP advertisement.

 

I am very n into BGP. So may be asked some foolish question. Please pardon me for that. Now I want to advertise all my Loopback IPs (10.0.0.1/32,20.0.0.1/32 etc) to eBGP peer R5 (AS65100). Even Loopback of R5 also wants to advertise to all iBGP peer of AS65000. In order to achieve that from R5 I have advertised its loopback using "Network" command. even in AS6500 all routers are running iBGP, any eBGP update from R3 gets advertise to its all iBGP neighbor.

But problems starts when I want to advertise all my iBGP Loopback subnets  to R5. So I dont want to advertise (10.0.0.1/32,20.0.0.1/32 etc) using "Network" command from R3. Even I dont want to redistribute OSPF 10 into BGP 65100. So is there any other way to achieve the same goal.

I am attaching all my router configuration below.

Kindly let me know your expert suggestion. For more clarity I am mentioning some command output below.

 

R3#sh ip bgp
BGP table version is 89, local router ID is 30.0.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
*> 51.51.51.51/32   5.5.5.2                  0             0 65100 i
*>i99.99.99.99/32   10.0.0.1                 0    100      0 i

 

R3#sh ip bgp summary
BGP router identifier 30.0.0.1, local AS number 65000
BGP table version is 89, main routing table version 89
2 network entries using 202 bytes of memory
2 path entries using 96 bytes of memory
2 BGP path attribute entries using 120 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 442 total bytes of memory
BGP activity 35/33 prefixes, 39/37 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
5.5.5.2         4 65100     223     258       89    0    0 00:07:32        1
10.0.0.1        4 65000     200     242       89    0    0 03:13:42        1
20.0.0.1        4 65000     197     242       89    0    0 03:13:47        0
40.0.0.1        4 65000     197     242       89    0    0 03:13:33        0

 

R3#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, 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

     51.0.0.0/32 is subnetted, 1 subnets
B       51.51.51.51 [20/0] via 5.5.5.2, 00:07:46
     1.0.0.0/30 is subnetted, 1 subnets
O       1.1.1.0 [110/20] via 3.3.3.1, 00:16:13, Ethernet1/1
     2.0.0.0/30 is subnetted, 1 subnets
O       2.2.2.0 [110/20] via 4.4.4.2, 00:16:13, Ethernet1/0
     3.0.0.0/30 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Ethernet1/1
     4.0.0.0/30 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Ethernet1/0
     99.0.0.0/32 is subnetted, 1 subnets
B       99.99.99.99 [200/0] via 10.0.0.1, 03:13:45
     20.0.0.0/32 is subnetted, 1 subnets
O       20.0.0.1 [110/11] via 3.3.3.1, 00:16:14, Ethernet1/1
     5.0.0.0/30 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, FastEthernet0/0
     40.0.0.0/32 is subnetted, 1 subnets
O       40.0.0.1 [110/11] via 4.4.4.2, 00:16:14, Ethernet1/0
     10.0.0.0/32 is subnetted, 1 subnets
O       10.0.0.1 [110/21] via 4.4.4.2, 00:16:14, Ethernet1/0
                 [110/21] via 3.3.3.1, 00:16:14, Ethernet1/1
     30.0.0.0/32 is subnetted, 1 subnets
C       30.0.0.1 is directly connected, Loopback0

 

R5#sh ip bgp
BGP table version is 120, local router ID is 51.51.51.51
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
*> 51.51.51.51/32   0.0.0.0                  0         32768 i
*> 99.99.99.99/32   5.5.5.1                                0 65000 i

R5#sh ip bgp summary
BGP router identifier 51.51.51.51, local AS number 65100
BGP table version is 120, main routing table version 120
2 network entries using 202 bytes of memory
2 path entries using 96 bytes of memory
2 BGP path attribute entries using 120 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 442 total bytes of memory
BGP activity 46/44 prefixes, 57/55 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
5.5.5.1         4 65000     259     224      120    0    0 00:08:16        1

R5#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, 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

     51.0.0.0/32 is subnetted, 1 subnets
C       51.51.51.51 is directly connected, Loopback0
     99.0.0.0/32 is subnetted, 1 subnets
B       99.99.99.99 [20/0] via 5.5.5.1, 00:08:32
     5.0.0.0/30 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, FastEthernet0/0

 

R1#sh ip bgp
BGP table version is 104, local router ID is 99.99.99.99
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
* i51.51.51.51/32   5.5.5.2                  0    100      0 65100 i
*> 99.99.99.99/32   0.0.0.0                  0         32768 i

 

R1#sh ip bg su
BGP router identifier 99.99.99.99, local AS number 65000
BGP table version is 104, main routing table version 104
2 network entries using 202 bytes of memory
2 path entries using 96 bytes of memory
2 BGP path attribute entries using 120 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 442 total bytes of memory
BGP activity 33/31 prefixes, 35/33 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
20.0.0.1        4 65000     198     201      104    0    0 03:14:58        0
30.0.0.1        4 65000     244     202      104    0    0 03:15:09        1
40.0.0.1        4 65000     199     202      104    0    0 03:15:04        0

 

Regards

Ajit

1 Accepted Solution

Accepted Solutions

Hello

At present the igbp peers see  ebgp routes next hop originating from the ebgp peer as per default - try setting R3

to advertise its self as the next hop for the ibgp peers and also set ospf admin distance to be higher than bgp.

R3
router bgp 65000
 neighbor 10.0.0.1 next-hop-self
 neighbor 20.0.0.1  next-hop-self
 neighbor 40.0.0.1  next-hop-self

 

clear ip bgp * soft

rtr1-4
router ospf xx
distance 201

 

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

Ajit

If you don't want to use the "network ..." command or redistribute then there isn't really another way to achieve what you want if you want the specific loopbacks advertised.

You could either -

1) advertise a summary address from R3 to R5 which covers all your loopbacks but that would also include a lot more networks than just the specific loopback IPs

or

2) advertise a default route from R3 to R5 but that would cover even more

But as i say both of the above advertise far more than just the loopbacks.

Is there a specific reason you don't want to use either of the ways you suggest ?

Edit - a third alternative may be to use a "redistribute connected" together with a route map to match only the loopback interface under the BGP configuration on each router. I have never done this but it should work.

But it would be a lot of extra configuration and i can't really see any advantage to doing this.

Jon

Hi Jon,

 

Thanks for your quick reply. Without Redistribution  and Network command if you look at the R1 BGP table you can see below output.

 

R1#sh ip bgp
BGP table version is 104, local router ID is 99.99.99.99
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
* i51.51.51.51/32   5.5.5.2                  0    100      0 65100 i
*> 99.99.99.99/32   0.0.0.0                  0         32768 i

But moment I redistribute the OSPF 10 into BGP 65000. All 10.0.0.1,20.0.0.1 etc will appear R1's, R2, R4 BGP table with rib-failure. basically I want to avoid this scenario. Please find the command output.

 

R1#sh ip bgp
BGP table version is 10, local router ID is 99.99.99.99
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>i1.1.1.0/30       3.3.3.1                 20    100      0 ?
r>i2.2.2.0/30       4.4.4.2                 20    100      0 ?
r>i20.0.0.1/32      3.3.3.1                 11    100      0 ?
r>i40.0.0.1/32      4.4.4.2                 11    100      0 ?
* i51.51.51.51/32   5.5.5.2                  0    100      0 65100 i
*> 99.99.99.99/32   0.0.0.0                  0         32768 i

So please let me know the best practice, because I am very mcuh novish into BGP. Please provide ur opinion how to solve this type of scenario.

 

Regards

Ajit

 

Hello.

Per my understanding you need to redistribute on network (AS) edge router (R3 in your diagram) using route-map - to filter unnecessary prefix... and filter prefixes you announce via iBGP.

cadet alain
VIP Alumni
VIP Alumni

Hi,

The rib failures are due to the fact that these prefixes are known on the routers by OSPF with AD of 110 and so they can't be installed as BGP routes because iBGP has an AD of 200.But these prefixes will still be advertsied by BGP as long as they are considered valid and best and on the eBGP peer they will get installed as B routes.

 

Regards

 

Alain

Don't forget to rate helpful posts.

Hello

At present the igbp peers see  ebgp routes next hop originating from the ebgp peer as per default - try setting R3

to advertise its self as the next hop for the ibgp peers and also set ospf admin distance to be higher than bgp.

R3
router bgp 65000
 neighbor 10.0.0.1 next-hop-self
 neighbor 20.0.0.1  next-hop-self
 neighbor 40.0.0.1  next-hop-self

 

clear ip bgp * soft

rtr1-4
router ospf xx
distance 201

 

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi Cadet and Vasilli,

 

Thanks for your update and knowledge sharing. Now I got the idea.

Hi Paul,

Thanks for your knowledge sharing. Now I understand the thing. Now I need few clarity. We can assume my scenario as well.

I am listing down my understanding below.

(1) In AS6500 all routers are configured as iBGP peer (full mesh). So any iBGP advertised subnet from these routers will directly advertised to any eBGP peer ( In this scenario R5 AS65100)??

(2) In order to advertise IGP routes from AS65000, do we need to configure "Redistribution". If not then we should advertise the IGP subnets using "Network" command from R3 to R5.

(3) IGP route will not directly advertised to eBGP peer although iBGP is configured among full mesh peer within AS65000.

(4) suppose if I want to advertise few IGP learned subnets from R3 to R5 using neighbor 5.5.5.2 distribute-list TEST out command.(Neither use of redistribution nor Network command under bgp 65000). Will it reflect on R5 BGP or IGP routing table? Does it work?

Now Please find the command output:

R1#sh ip bgp
BGP table version is 460, local router ID is 99.99.99.99
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>i1.1.1.0/30       30.0.0.1                20    100      0 ?
r>i2.2.2.0/30       30.0.0.1                20    100      0 ?
r>i3.3.3.0/30       30.0.0.1                 0    100      0 ?
r>i4.4.4.0/30       30.0.0.1                 0    100      0 ?
r>i20.0.0.1/32      30.0.0.1                11    100      0 ?
r>i30.0.0.1/32      30.0.0.1                 0    100      0 ?
r>i40.0.0.1/32      30.0.0.1                11    100      0 ?
*>i51.51.51.51/32   30.0.0.1                 0    100      0 65100 i
*> 99.99.99.99/32   0.0.0.0                  0         32768 i

R1#ping  ip 51.51.51.51 source 10.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 51.51.51.51, timeout is 2 seconds:
Packet sent with a source address of 10.0.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/53/100 ms

 

R3#sh ip bgp
BGP table version is 25, local router ID is 30.0.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
*> 1.1.1.0/30       3.3.3.1                 20         32768 ?
*> 2.2.2.0/30       4.4.4.2                 20         32768 ?
*> 3.3.3.0/30       0.0.0.0                  0         32768 ?
*> 4.4.4.0/30       0.0.0.0                  0         32768 ?
*> 10.0.0.1/32      4.4.4.2                 21         32768 ?
*> 20.0.0.1/32      3.3.3.1                 11         32768 ?
*> 30.0.0.1/32      0.0.0.0                  0         32768 ?
*> 40.0.0.1/32      4.4.4.2                 11         32768 ?
*> 51.51.51.51/32   5.5.5.2                  0             0 65100 i
*>i99.99.99.99/32   10.0.0.1                 0    100      0 i

R5#sh ip bgp
BGP table version is 39, local router ID is 51.51.51.51
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.0.1/32      5.5.5.1                 21             0 65000 ?
*> 20.0.0.1/32      5.5.5.1                 11             0 65000 ?
*> 30.0.0.1/32      5.5.5.1                  0             0 65000 ?
*> 40.0.0.1/32      5.5.5.1                 11             0 65000 ?
*> 51.51.51.51/32   0.0.0.0                  0         32768 i
*> 99.99.99.99/32   5.5.5.1                                0 65000 i

R5#sh ip rou
R5#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, 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

     51.0.0.0/32 is subnetted, 1 subnets
C       51.51.51.51 is directly connected, Loopback0
     99.0.0.0/32 is subnetted, 1 subnets
B       99.99.99.99 [20/0] via 5.5.5.1, 00:03:46
     20.0.0.0/32 is subnetted, 1 subnets
B       20.0.0.1 [20/11] via 5.5.5.1, 00:03:46
     5.0.0.0/30 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, FastEthernet0/0
     40.0.0.0/32 is subnetted, 1 subnets
B       40.0.0.1 [20/11] via 5.5.5.1, 00:03:46
     10.0.0.0/32 is subnetted, 1 subnets
B       10.0.0.1 [20/21] via 5.5.5.1, 00:03:46
     30.0.0.0/32 is subnetted, 1 subnets
B       30.0.0.1 [20/0] via 5.5.5.1, 00:03:47

R5#ping ip 20.0.0.1 source 51.51.51.51

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.0.0.1, timeout is 2 seconds:
Packet sent with a source address of 51.51.51.51
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/53/92 ms

 

Regards

 

Ajit

Hello Jon,

 

Please let me explain how to advertise iBGP learn route to eBGP neighbor. 

Review Cisco Networking products for a $25 gift card