Re: BGP routing questions

From: Alex Bligh (amb@gxn.net)
Date: Sat Oct 02 1999 - 09:05:19 EDT


routerman@briefcase.com said:
> Interestingly enough seems true. Using route maps I set lower weight
> and higher local pref on routes from a particular AS to try and force
> traffic to prefer traffic from a different AS on another router. It
> still chose the external routes on the locally connected internet
> interface versus from the other router advetising external routes via
> IBGP between routers.

Forget weight, this only applies on the router on which you set it,
and is probably causing the problem.

Just set localpref. And remember to set localpref on things that
don't match the match clause to something else.

IE let's say you have as-path access-list 100 which matches
_1_ and _1239_ to match Sprint and BBN and send these preferentially
out the A connection. Everything else you want to send out the
B connection.

You want on the router connected to A

router bgp nnnn
 neighbor a.a.a.a route-map connection-to-A-IN in
!
ip as-path access-list 100 permit _1_
ip as-path access-list 100 permit _1239_
ip as-path access-list 100 deny .*
!
route-map connection-to-A-IN permit 10
 match as-path 100
 set localpref 110
!
route-map connection-to-A-IN permit 20
 set localpref 90
!

And on the router connected to B

router bgp nnnn
 neighbor b.b.b.b route-map connection-to-B-IN in
!
route-map connection-to-B-IN permit 20
 set localpref 100
!

Now on either router, you should be able to do things like

show ip b reg _1239_

and on both you should see that they are localpreffedto 110 from A
(and thus preferred) but localpreffed to 100 from B, and are thus
preferred on both routers to egress via A.

If you do a show ip b on a route which does not have either 1239 or
1 in the path, you should find it localpreffed to 90 on A, but
to 100 on B, so both routers will egress via B.

-- 
Alex Bligh
GX Networks (formerly Xara Networks)



This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:12:06 EDT