cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1131
Views
10
Helpful
4
Replies

Changing default route after import route-target

maher
Level 1
Level 1

Hi there,

Before I import route-target, the default route is set to 192.168.0.22 . After import the vrf, suddently it change to another PE, which is 192.168.0.19 . How do I force the default route to use 192.168.0.22 ?

before adding route-target import 4000:1

PE#sh ip route vrf customer 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "bgp 100", distance 200, metric 0, candidate default path,

type internal

Last update from 192.168.0.22 00:14:08 ago

Routing Descriptor Blocks:

* 192.168.0.22 (Default-IP-Routing-Table), from 192.168.0.3, 00:14:08 ago

Route metric is 0, traffic share count is 1

AS Hops 0

PE#sh ip bgp vpnv4 vrf customer 0.0.0.0

BGP routing table entry for 100:239:0.0.0.0/0, version 335256

Paths: (2 available, best #2, table customer)

Not advertised to any peer

Local

192.168.0.22 (metric 4) from 192.168.0.45 (192.168.0.45)

Origin incomplete, metric 0, localpref 100, valid, internal

Extended Community: RT:100:120

Originator: 192.168.0.50, Cluster list: 192.168.0.45

Local

192.168.0.22 (metric 4) from 192.168.0.3 (192.168.0.3)

Origin incomplete, metric 0, localpref 100, valid, internal, best

Extended Community: RT:100:120

Originator: 192.168.0.50, Cluster list: 192.168.0.3

after adding route-target import 4000:1

PE#sh ip route vrf customer 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "bgp 100", distance 200, metric 0, candidate default path,

type internal

Last update from 192.168.0.19 00:00:09 ago

Routing Descriptor Blocks:

* 192.168.0.19 (Default-IP-Routing-Table), from 192.168.0.3, 00:00:09 ago

Route metric is 0, traffic share count is 1

AS Hops 0

PE#sh ip bgp vpnv4 vrf customer 0.0.0.0

BGP routing table entry for 100:239:0.0.0.0/0, version 335386

Paths: (3 available, best #1, table customer)

Flag: 0x1820

Not advertised to any peer

Local, imported path from 4000:1:0.0.0.0/0

192.168.0.19 (metric 2) from 192.168.0.3 (192.168.0.3)

Origin incomplete, metric 0, localpref 100, valid, internal, best

Extended Community: RT:4000:1

Originator: 192.168.0.19, Cluster list: 192.168.0.3

Local

192.168.0.22 (metric 4) from 192.168.0.45 (192.168.0.45)

Origin incomplete, metric 0, localpref 100, valid, internal

Extended Community: RT:100:120

Originator: 192.168.0.50, Cluster list: 192.168.0.45

Local

192.168.0.22 (metric 4) from 192.168.0.3 (192.168.0.3)

Origin incomplete, metric 0, localpref 100, valid, internal

Extended Community: RT:100:120

Originator: 192.168.0.50, Cluster list: 192.168.0.3

thanks in advance.

maher

4 Replies 4

Harold Ritter
Spotlight
Spotlight

The new route is chosen because of its lower IGP metric. You could always set a higher local preference inbound on prefixes with RT 4000:1 if you want the other prefix to win.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hi Hritter,

Can you please assist with some example? Quite confuse at the moment with setting route-map.

thanks in advance.

maher

Maher,

Here's an example:

router bgp xx

address-family vpnv4

nei x.x.x.x route-map localpref in

!

ip extcommunity 1 permit rt 4000:1

!

route-map localpref permit 10

match extcommunity 1

set local-preference 110

route-map localpref permit 20

BTW: if the route with RT 4000:1 had a different RD both routes would get imported in the VRF and you could set the local-pref using an import map instead of an inbound route-map on the VPNv4 session.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

I just noticed that I made a mistake. The local-pref should have been set to 90 not 110.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)