cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
278
Views
25
Helpful
6
Replies
David Rollins
Beginner

iBGP to EIGRP - setting preferred path.

I have a multi-homed site setup using iBGP and EIGRP. iBGP is redistributed into EIGRP. The redistribution works like a charm, of course after the redistribute internal.

As opposed to load balancing traffic out the BGP connections, I wanted to leave CORE1 as the primary path out and CORE2 as the secondary. CORE1 will redistribute the default route and if its BGP peer dies, CORE2 takes over and redistributes its own learned BGP default route, out. But the problem is, when CORE1 BGP comes back up the default route doesn't flip back over. I made CORE1 and 2 BGP peers and route reflectors of each other. I even set unequal default metrics for both devices under the EIGRP AS. With CORE1 having the better metric.

Basically is there a way to make CORE1 always the preferred path, so long as the BGP is up?

Attached is the network layout diagram.

 

Configurations

CORE-1

route-map BGP_DEFAULT permit 5
match route-type internal

 

router eigrp IWAN-EIGRP
 autonomous-system 100
 eigrp router-id 192.168.2.2
 metric maximum-hops 32
 default-metric 10000000 1 255 1 9216
 redistribute bgp 64512 route-map BGP_DEFAULT
 address-family ipv4 unicast

router bgp 64512
 log-neighbor-changes
 address-family ipv4 unicast
 redistribute direct route-map BGP
 redistribute eigrp IWAN-EIGRP route-map BGP
 neighbor 172.19.2.1
  remote-as 64512
  update-source loopback0
  address-family ipv4 unicast
   weight 100
   filter-list 1 out
 neighbor 192.168.3.2
  remote-as 64512
  update-source loopback1
  address-family ipv4 unicast
   route-reflector-client

 

 

CORE-2

route-map BGP_DEFAULT permit 5
match route-type internal
route-map BGP_LOCALPREF_RM permit 10
set local-preference 150

 

router eigrp IWAN-EIGRP
 autonomous-system 100
 eigrp router-id 192.168.3.2
 passive-interface default
 metric maximum-hops 32
 default-metric 100 10000 0 255 128
 address-family ipv4 unicast
   redistribute bgp 64512 route-map BGP_DEFAULT

router bgp 64512
 log-neighbor-changes
 address-family ipv4 unicast
  redistribute direct route-map BGP
  redistribute eigrp IWAN-EIGRP route-map BGP
 neighbor 172.19.3.1
  remote-as 64512
  update-source loopback0
  address-family ipv4 unicast
   filter-list 1 out
 neighbor 192.168.2.2
  remote-as 64512
  update-source loopback1
  address-family ipv4 unicast
   route-reflector-client
   route-map BGP_LOCALPREF_RM in

 

Show output

Here is the sh ip bgp

 

CORE-2# sh ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 156, Local Router ID is 172.19.3.2
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-i
njected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - b
est2

Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0/0 172.19.2.1 0 150 0 65001 650
01 ?
* i 172.19.3.1 0 100 0 65001 650
01 ?
* i10.70.0.0/24 192.168.2.2 0 150 0 ?
*>r 0.0.0.0 0 100 32768 ?
* i10.70.2.0/23 192.168.2.2 0 150 0 ?

 

CORE-1# sh ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 109, Local Router ID is 172.19.2.2
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-i
njected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - b
est2

Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0/0 172.19.2.1 0 100 100 65001 650
01 ?
* i10.70.0.0/24 192.168.3.2 0 100 0 ?
*>r 0.0.0.0 0 100 32768 ?
* i10.70.2.0/23 192.168.3.2 3072 100 0 ?
*>r 0.0.0.0 0 100 32768 ?
* i10.70.4.0/24 192.168.3.2 0 100 0 ?
*>r 0.0.0.0 3072 100 32768 ?
*>r10.70.128.0/24 0.0.0.0 0 100 32768 ?
*>i172.16.1.16/30 192.168.3.2 0 100 0 ?
*>r172.16.1.20/30 0.0.0.0 0 100 32768 ?
* i172.16.1.32/30 192.168.3.2 0 100 0 ?
*>r 0.0.0.0 3072 100 32768 ?
* i172.16.1.36/30 192.168.3.2 3072 100 0 ?


*>r 0.0.0.0 3072 100 32768 ?
* i10.70.4.0/24 192.168.2.2 3072 150 0 ?
*>r 0.0.0.0 0 100 32768 ?
*>i10.70.128.0/24 192.168.2.2 0 150 0 ?
*>r172.16.1.16/30 0.0.0.0 0 100 32768 ?
*>i172.16.1.20/30 192.168.2.2 0 150 0 ?
* i172.16.1.32/30 192.168.2.2 3072 150 0 ?

 

Here is the sh ip route

 

CORE-1# sh ip route
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>

0.0.0.0/0, ubest/mbest: 1/0
*via 10.70.0.3, Vlan9, [170/28160256], 01:31:24, eigrp-IWAN-EIGRP, external,
tag 65001
10.69.1.0/25, ubest/mbest: 1/0
*via 10.70.0.3, Vlan9, [90/3072], 02:33:24, eigrp-IWAN-EIGRP, internal
10.70.0.0/24, ubest/mbest: 1/0, attached
*via 10.70.0.2, Vlan9, [0/0], 04:11:46, direct
10.70.0.2/32, ubest/mbest: 1/0, attached
*via 10.70.0.2, Vlan9, [0/0], 04:11:46, local
10.70.2.0/23, ubest/mbest: 1/0, attached

 

CORE-2# sh ip route
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>

0.0.0.0/0, ubest/mbest: 1/0
*via 172.19.2.1, [200/0], 01:31:28, bgp-64512, internal, tag 65001
10.69.1.0/25, ubest/mbest: 1/0, attached
*via 10.69.1.1, Vlan50, [0/0], 04:14:59, direct
10.69.1.1/32, ubest/mbest: 1/0, attached
*via 10.69.1.1, Vlan50, [0/0], 04:14:59, local
10.70.0.0/24, ubest/mbest: 1/0, attached
*via 10.70.0.3, Vlan9, [0/0], 03:00:20, direct
10.70.0.3/32, ubest/mbest: 1/0, attached
*via 10.70.0.3, Vlan9, [0/0], 03:00:20, local

6 REPLIES 6
MHM Cisco World
Advocate

...

I changed the weight on CORE-1 to be 100

router bgp 64512
 neighbor 172.19.2.1
  address-family ipv4 unicast
   weight 100

Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0/0 172.19.2.1 0 100 100 65001 650

 

and left the weight default on CORE-2. I even set the local-pref for routes learned from the neighbor peer to 150

route-map BGP_LOCALPREF_RM permit 10
set local-preference 150

 

router bgp 64512
 neighbor 192.168.2.2
  remote-as 64512
  address-family ipv4 unicast
   route-reflector-client
   route-map BGP_LOCALPREF_RM in

 

Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0/0 172.19.2.1 0 150 0 65001 650
01 ?
* i 172.19.3.1 0 100 0 65001 650
01 ?

....

paul driver
VIP Expert

Hello
It is possible the reason why the ebgp route isn’t preferred when bgp establishes is due to bgp path selection, a redistributed igp route into bgp has a weight of 32768 however an ebgp route has no weight value as such the redistributed route from the igp would still be preferred. The way to negate this would to set the ebgp peering with a higher default weight value than 32768.

router bgp xx
neighbour <ebgp peer> weight 40000


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

I am using iBGP to peer with the edge router. The edge router of course is peering with eBGP. My core is running iBGP and EIGRP. I force iBGP to redistribute routes with the command:

match route-type internal ---------> This command redistributes iBGP routes

I thought Weight is a locally significant attribute, and has no bearing on path selection outside of the router it is configured on? I think my problem, most likely has something to do with some Loop Prevention mechanism. Because you would think that even an external EIGRP route which is AD 170 is still higher than that of the iBGP AD 200.

 

Which I have been able to successfully test whilst redistributing a static default route from other routers. I don't know if any of this makes sense. I sometimes find it hard to put down in words what I know I am thinking.

MHM Cisco World
Advocate

https://costiser.ro/2013/08/19/redistributing-internal-bgp-ibgp-into-an-igp-why-is-it-dangerous/#.Ycy0CS2B2Rs

 

your case, and the recommend is not use redistribute into eigrp but use default origin in both edge router.