Use of Route Maps for default route

Unanswered Question
Jan 8th, 2009

Hi,

I have tried to set the BGP no-export community for only the default route

between 2 routers.

I have tried the following configuration on the announcing router with no luck (have also tried using standard ACL's).

!

neighbor 195.50.113.250 remote-as 5635

neighbor 195.50.113.250 send-community

neighbor 195.50.113.250 default-originate

neighbor 195.50.113.250 route-map SET_NO_EXPORT out

!

ip prefix-list DEFAULT-ROUTE seq 5 permit 0.0.0.0/0

route-map SET_NO_EXPORT permit 10

match ip address prefix-list DEFAULT-ROUTE

set community no-export

!

Is there something different when using route maps and the default route?

Thanks in advance.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
mikegrous Thu, 01/08/2009 - 06:13

It is possible. I did it differntly than you but it works for me.....Also you are missing route-map SET_NO_EXPORT permit 20.. Anything not matched in permit 10 will get denied.

This is how i accomplished it. 99.99.99.8 is sending the default route to R7..

R7

Router bgp 7

neighbor 99.99.99.8 route-map test in

!

route-map test permit 10

match ip address prefix-list 22

set community no-export

route-map test permit 20

!

ip prefix-list 22 seq 5 permit 0.0.0.0/0

match ip address prefix-list 22

!

____sho ip bgp 0.0.0.0

BGP routing table entry for 0.0.0.0/0, version 37

Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to

EBGP peer)

Flag: 0x8A0

Not advertised to any peer

8

99.99.99.8 (metric 2297856) from 99.99.99.8 (99.99.99.8)

Origin IGP, metric 0, localpref 100, valid, external, best

Community: no-export

R7(config-route-map)#

Harold Ritter Thu, 01/08/2009 - 08:22

Paul,

The default route originated by the "neighbor default-originate" command is not subjected to the outbound route-map.

You can either apply the community to the default route on the inbound route-map at the receiving end or originate the default route using the following commands instead of the "neighbor default-originate" command:

router bgp xyz

netw 0.0.0.0

!

ip route 0.0.0.0 0.0.0.0 null0

or

router bgp xyz

redistribute static

default-information originate

!

ip route 0.0.0.0 0.0.0.0 null0

Regards

paul-giles Fri, 01/09/2009 - 01:37

Thanks for your response and solution Paul.

I have also found that I could apply a route map directly to the default-originate which successfully invokes the no-export community.

!

neighbor x.x.x.x default-originate route-map SET_NO_EXPORT

!

route-map SET_NO_EXPORT

set community no-export

!

Thanks again.

Actions

This Discussion