BGP route-map

Unanswered Question
Sep 7th, 2007

Hi, I have configured the root map as below to preffer my ISPB over ISPA for only one prefix for outbound traffic,but some how all my inbound traffic start comming through ISPB as well for the rest of 10 prefixes., any advice on my config please,

Router bgp 10

neighbor remote-as 3484

neighbor remote-as 3350

neighbor route-map WT in

network mask

network mask

network mask

ip route Null0 250

route-map WT permit 10

match ip address name WT

set weight 65534


route-map WT permit 20

ip access-list standard WT


7200-CC-1#sh ip route list WT


[90/3072] via, 00:36:07, GigabitEthernet0/3

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
mohindersingh Fri, 09/07/2007 - 07:58


Can you send the running-config of the router so that it can be clear that how u r giving preference to ispA over ISrPB.

And if i am not wrng u wanna to send a particular subnet through ISPB.

also let me know that u wanna failover between ISP-A and ISP-B. Right ?

Thanks and Regards


mohammedrafiq Fri, 09/07/2007 - 10:21


I have not got full config ,cos I am not in office , but config above is for router A which have 2 ebgp peers. peer1 with my other router B ( diffrent AS neighbor remote-as 3484

, and here is ISPB connected.

2nd ebgp peer on this router is with ISPA on this router,

neighbor remote-as 3350

I do want failover .


cisco_lad2004 Fri, 09/07/2007 - 10:28


Weight will control oubound traffic, but this does not mean that traffic inbound will return on same path.

if you want control inbound and outbound, use AS pre-pending on inbound and outbound for the specific prefix. This will also give you failover.



mohammedrafiq Fri, 09/07/2007 - 10:37

I used weight only for one prefix,but it effect all my outbound and inboud traffic for my remainning 10 prefixes.I must admit I did not apply AS prepend outbound, but the route map above shold only effect o one prefix oubotbound .

cisco_lad2004 Fri, 09/07/2007 - 10:52

I might be missing something are advertising and you are trying to get inbound traffic for this prefix to get in from one ISP and not the other. is this correct ?

Your route map in this case will have no effect as it will not match any prefixes received( since you are advertising them not your ISP).

to confirm that route map is not making a difference , remove it and you should see that nothing will change.

Please confirm if you need to influence prefixes you are sending or receiving.

I apologise in advance if I mis understood you.


mohammedrafiq Sat, 09/08/2007 - 04:26


My all traffic is going through ISPA,i would like to prefix to preffer outbound and inbound through ISPB and leave remainning unchanged.

I hope it makes clear.

cisco_lad2004 Sat, 09/08/2007 - 05:16


I presume ISPB=AS3350

neighbor remote-as 3484

neighbor remote-as 3350

neighbor route-map PRE-AS out

route-map PRE-AS permit 10

match ip address name WT

set as-path 10

route-map PRE-AS permit 20

with above Route map, ur prefix is less desirable for ISPA and therfore traffic should come from AS 3350. this takes care of inbound traffic.

for outbound, Hmm...hard to see what can be done without having info on ur set up, topology and internal routing.

if you make a change to ISP A or B prefixes, all of your subnets will be affected the same way. so we have to find a way to influence and only this subnet to exit thru ISP B as primary point.

How is this subnet getting routing info on ISP A or B prefixes. are u using default routes.

1-can you influence (using IGP) next hop to prefer exit point towards ISP B.

2-If you are not using default routes yet, can you advertise one to domain only pointing to ISP A, so ISP B is always primary as it will have longest match prefixes. ISP A default route will only be used if ISP B session fails.



mohammedrafiq Sat, 09/08/2007 - 05:34


I am getting 0/0 from both isp.ISPA defult is *>. I will use prepend to influence the inbound, but still not sure about outbound.only 2 option I have weight and local-pref, but cant use local-pref cos i am not using ibgp.

cisco_lad2004 Sat, 09/08/2007 - 05:58

Hi Mohammed

Inbound traffic will be resolved by pre-pending.

the challenge now is outbound traffic.

If both you are advertising 0/0 from both ISPs, which ever Next HOP in this case ISPA will be prefered for all traffic from all your subnets and not just the one you want.

Weight and local pref will not resolve this.We need to look at IGP.

I assume you have a HOT potato situation and BGP RID is selecting factor to best path.

Depending on which IGP you are using, you need to influence the above for ur subnet only.

are you bale to create a static route to NH ISP B link and advertise it to your subnet only and make sure it is filtered out to other ones ?

if you can achieve the above, your subnet will select ISP B as exit since BGP RID is more attractive.



mohammedrafiq Sat, 09/08/2007 - 06:15

I am using EIGRP as you mean I do this

ip route ISPB's address?.

Keep in mind I am alredy using ststic route to install into bgp as bello.

ip route null0 250

cisco_lad2004 Sat, 09/08/2007 - 07:04


assuming you see on ut BGP table > pointing to

ip route x.x.x.x

where x.x.x.x is the IP address that is NH on link where subnet is located.

can u post more info , diagram and config. this will clarify things a bit more.




This Discussion