BGP: How can I tell a router not to use a learned default route

Answered Question
Apr 4th, 2009

We have an MPLS network and we are using BGP and EIGRP.

The default route is redistributed using BGP through the default-information originate command.

On one of the routers I would like to use a different default route. Does anyone know how I can filter out the default route it is receiving through BGP?

Thank you for your time.

I have this problem too.
0 votes
Correct Answer by Jon Marshall about 7 years 9 months ago

If you actually want to filter out the route from the BGP peer -

access-list 1 deny 0.0.0.0

access-list 1 permit any

router bgp 64521

neighbor x.x.x.x distribute-list 1 in

where x.x.x.x is the BGP peer that is originating the default-route.

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
networklal Sat, 04/04/2009 - 12:08

You can simply enter a static default route and the router will use your static default route rather than the BGP one as static routes' AD is 1 which is less than BGP which is 20..

kasper123 Sat, 04/04/2009 - 12:25

Hi networklal .

Yes that was the first thing I did. And i see thet if I do a traceroute vrf VRF_NAME ip X.X.X.X from the router (7604) I see that the router is using the new default route. But behind this router is a switch (3750) on which we have several vrf and there it still uses the default route that the 7604 is receiving through BGP. Setting the default route in the vrf on the 3750 doesn't work. But I noticed that if I set a route for a specific IP address on the 7604 then the 3750 uses that route.

Correct Answer
Jon Marshall Sat, 04/04/2009 - 12:26

If you actually want to filter out the route from the BGP peer -

access-list 1 deny 0.0.0.0

access-list 1 permit any

router bgp 64521

neighbor x.x.x.x distribute-list 1 in

where x.x.x.x is the BGP peer that is originating the default-route.

Jon

kasper123 Mon, 04/06/2009 - 05:17

Hi jon. That did the trick. Thank you. I did it with a route map but it is the same thing.

router bgp 65000

neighbor 10.X.X.X route-map BGP-IN in

route-map BGP-IN permit 10

match ip add BGP-IN

!

ip access-list standard BGP-IN

deny 0.0.0.0

permit any

Thanx both of you for taking the time to reply.

Actions

This Discussion