cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2883
Views
0
Helpful
2
Replies

Remove BGP Default Route When Using IP SLA

matthubach
Level 1
Level 1

Hello, I have an Internet router. The external interface is running BGP towards the ISP. We are not doing any BGP peering, etc.. Basic BGP neighbor with ISP. The internal interface is running OSPF.

 

I have an IP SLA monitoring an upstream address 8.8.8.8. 

 

I have the following static route:

ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 1

 

This is my OSPF config:

redistribute static subnets
default-information originate

 

Everything works fine re the default route propagating through my OSPF domain when 8.8.8.8 is pingable and the track is up. However, when 8.8.8.8 is not reachable (simulating an upstream ISP outage) and the track goes down, the static default route is removed, but then BGP's default route kicks in. Traffic is still routed towards the Internet router but the ISP is down. We have another ISP in another location that is distributing its default route which ideally that is the path it should take when the ISP is down.

 

1) The ultimate question is, can I remove BGP's default route? I do not want any default route if my IP SLA is down.

1 Accepted Solution

Accepted Solutions

Hi,


@matthubach wrote:

 

1) The ultimate question is, can I remove BGP's default route? I do not want any default route if my IP SLA is down.


Yes, you can. Since you are adding a static default route pointing towards ISP1, you can take out BGP default route and still send your traffic using the static route configured.

 

First, check whether you are receiving default route from your ISP1 by running "sh ip bgp x.x.x.x received-routes". If you do and if you are receiving default route, you can filter default route from received routes as follows:

 

config t

ip prefix-list FILTER_DEFAULT_ROUTE deny 0.0.0.0/0

ip prefix-list FILTER_DEFAULT_ROUTE permit 0.0.0.0/1 le 32  ! If you are receiving other routes and wants to keep them. 

!

router bgp YY

 neighbor x.x.x.x prefix-list FILTER_DEFAULT_ROUTE in  ! Add this line to your existing configuration.

 

 

HTH,

Meheretab

HTH,
Meheretab

View solution in original post

2 Replies 2

Hi,


@matthubach wrote:

 

1) The ultimate question is, can I remove BGP's default route? I do not want any default route if my IP SLA is down.


Yes, you can. Since you are adding a static default route pointing towards ISP1, you can take out BGP default route and still send your traffic using the static route configured.

 

First, check whether you are receiving default route from your ISP1 by running "sh ip bgp x.x.x.x received-routes". If you do and if you are receiving default route, you can filter default route from received routes as follows:

 

config t

ip prefix-list FILTER_DEFAULT_ROUTE deny 0.0.0.0/0

ip prefix-list FILTER_DEFAULT_ROUTE permit 0.0.0.0/1 le 32  ! If you are receiving other routes and wants to keep them. 

!

router bgp YY

 neighbor x.x.x.x prefix-list FILTER_DEFAULT_ROUTE in  ! Add this line to your existing configuration.

 

 

HTH,

Meheretab

HTH,
Meheretab

Thanks Meheretab, I will give this a shot soon.

Review Cisco Networking for a $25 gift card