[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cisco BGP routing. Is it possible to force traffic out an interface depending on source address?

Posted on 2009-12-18
4
Medium Priority
?
1,042 Views
Last Modified: 2012-05-08
Hi Experts,

We have a Cisco Internet BGP router which peers with two different ISP's. Under normal operation we are load balancing traffic between the two carriers using route maps and odd/even AS paths. Everything works well.. However, We now need to route a particular local network out of a particular carrier interface.

BGP Router interfaces FYI-
GIG1/0 - Various Public networks (This is our inside int connected to L3 switches)
Fastethernet 2/0 - 40Mbps BT Peering
Fastethernet 2/1 - 100Mbps Telewest Peering

For example, We need network A.B.C.D/24 to route via Telewest at all times (Fa2/1) unless there is a failure. But all other networks should loadshare as normal... I thought of maybe using PBR but I think we'll lose the failover to BT if we have a problem?. Incoming traffic is ok as I am using AS Pre-Pending for the A.B.C.D/24 network via Fa2/0. So Fa2/1 naturally becomes the best route for incoming traffic..

It's how to achieve the outgoing traffic which is stumping me?.. I know I can use local-preference/MED but that will apply to all traffic not just the traffic originating from the A.B.C.D/24 network..

Any ideas guys?

Thanks in advance for your help.

Matt  
0
Comment
Question by:needsy
  • 2
4 Comments
 
LVL 3

Expert Comment

by:Greg_Arnold
ID: 26082331
route-map special permit 10
 match ip address 102
 set ip next-hop <fa2/0's gw>

access-list 102 permit ip a.b.c.d 0.0.0.255 any

int g1/0
0
 
LVL 3

Expert Comment

by:Greg_Arnold
ID: 26082333
sorry, needs more

int g1/0
  ip policy route-map special


something like this should be able to be adapted to work.
0
 
LVL 22

Accepted Solution

by:
Jody Lemoine earned 2000 total points
ID: 26082420
You can use policy based routing with a tracking option based on the presence or metric of other routes or on interface status.

track 10 ip route 3.3.3.0/24 metric threshold
 threshold up 100
!
ip access-list extended PolicyOut
 permit ip A.B.C.D 0.0.0.255 any
!
route-map PolicyOut permit 10
 match ip address PolicyOut
 set ip next-hop verify-availability 2.2.2.2 10 track 10

The above example makes your policy routing conditional based on the metric of a tracked route.  Set the "threshold up" metric to the expected metric of a tracked route that you expect to receive from your Telewest BGP peer and the "threshold down" metric to anything lower than this.  When the route is present in the routing table with the specified metric or better, the track is up and policy routing occurs.  When the metric drops below the "threshold up" metric, the track is down and normal routing occurs on the remaining path.  Replace 3.3.3.0/24 with the route you want to track and 2.2.2.2 with the Telewest next hop.

If you're not importing routes from the BGP peer, the tracking can be adjusted to watch the interface status itself or icmp-echo replies from your Telewest next hop or BGP peer.
0
 
LVL 1

Author Closing Comment

by:needsy
ID: 31667846
This worked with a little tweeking for our requirements.. Finally had time to test over Christmas. Many Thanks & Happy New Year
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While it is possible to put two routes in place with the secondary having a higher metric, this may not always work. In the event of a failure that does not bring down the physical interface on the router the primary route is not removed. There is a…
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question