BGP Directing Traffic

Discussion in 'Cisco' started by mhoppes@gmail.com, Aug 22, 2007.

  1. Guest

    I am trying to direct a few select subnets to prefer one path (we'll
    call it PPL) instead of the other (we'll call it Sprint).

    The subnet in question is 63.174.244.0/24.

    With the following configuration EVERYTHING goes out PPL, which is
    what I would expect:
    router bgp 26383
    neighbor 160.81.248.77 remote-as 1239
    neighbor 160.81.248.77 description ebgp link to sprint
    neighbor 160.81.248.77 version 4
    neighbor 160.81.248.77 soft-reconfiguration inbound
    neighbor 160.81.248.77 route-map addmyas in
    neighbor 160.81.248.77 route-map addmyas out
    !
    ip prefix-list sendoutppl description Sends Traffic Out PPL
    ip prefix-list sendoutppl seq 5 permit 63.174.244.0/24
    !
    ip prefix-list sendoutsprint description Sends Traffic Out Sprint
    ip prefix-list sendoutsprint seq 5 deny 0.0.0.0/0
    !
    route-map addmyas permit 10
    match ip address prefix-list sendoutsprint
    !
    route-map addmyas permit 20
    match ip address prefix-list sendoutppl
    set as-path prepend 26383 26383

    With the following configuration, my 63.174.244.0/24 block is still
    going out Sprint, why?
    router bgp 26383
    neighbor 160.81.248.77 remote-as 1239
    neighbor 160.81.248.77 description ebgp link to sprint
    neighbor 160.81.248.77 version 4
    neighbor 160.81.248.77 soft-reconfiguration inbound
    neighbor 160.81.248.77 route-map addmyas in
    neighbor 160.81.248.77 route-map addmyas out
    !
    ip prefix-list sendoutppl description Sends Traffic Out PPL
    ip prefix-list sendoutppl seq 5 permit 63.174.244.0/24
    !
    ip prefix-list sendoutsprint description Sends Traffic Out Sprint
    !
    route-map addmyas permit 10
    match ip address prefix-list sendoutsprint
    !
    route-map addmyas permit 20
    match ip address prefix-list sendoutppl
    set as-path prepend 26383 26383
     
    , Aug 22, 2007
    #1
    1. Advertising

  2. Merv Guest

    Use local preference to control / influence how traffic is routed
    OUTBOUND


    Use AS path prepend to control / influence how traffic is routed
    INBOUND
     
    Merv, Aug 22, 2007
    #2
    1. Advertising

  3. Guest

    On Aug 22, 12:25 pm, Merv <> wrote:
    > Use local preference to control / influence how traffic is routed
    > OUTBOUND
    >
    > Use AS path prepend to control / influence how traffic is routed
    > INBOUND


    Ok.. what you say jives with other things I have heard and learned...
    however, I'm a little confused on local-pref. I have 2 routers.
    A&B. If my main network is hanging off of router B, what command
    would I put in router B to make one of my subnets favor the route out
    router A better then the route out router B?

    I know I can set local pref in each router, but that only seems to
    make it always take the route out the local router. So let's say
    with the above config, what do I need to put in those match
    statements, to make my traffic for 63.174.244.0/24 go OUT my PPL pipe?
     
    , Aug 22, 2007
    #3
  4. Chris Guest

    On Wed, 22 Aug 2007 16:32:15 -0000, wrote:

    > On Aug 22, 12:25 pm, Merv <> wrote:
    >> Use local preference to control / influence how traffic is routed
    >> OUTBOUND
    >>
    >> Use AS path prepend to control / influence how traffic is routed
    >> INBOUND

    >
    > Ok.. what you say jives with other things I have heard and learned...
    > however, I'm a little confused on local-pref. I have 2 routers.
    > A&B. If my main network is hanging off of router B, what command
    > would I put in router B to make one of my subnets favor the route out
    > router A better then the route out router B?
    >
    > I know I can set local pref in each router, but that only seems to
    > make it always take the route out the local router. So let's say
    > with the above config, what do I need to put in those match
    > statements, to make my traffic for 63.174.244.0/24 go OUT my PPL pipe?


    Lets say that you have routers A & B and providers 1 & 2 hanging of those
    routers. On router B you get a route from provider 2 for say 10.1.2.0/24
    (as an example). You also get see a route for this prefix from provider 1
    on router A, but for what ever reason (as-path perhaps) provider 2 is
    preferred.

    When you look at the route on your network using 'sh ip bgp 10.1.2.0' you
    can see that the local pref for the route via router B is 200. But .. you
    want to use router A and provider 1 for that traffic.

    On router A you want to tag the inbound route with a higher local pref so
    that it's preferred. So, I do it like this.

    ----------------------------------------------------
    ip prefix-list override-local-pref seq 10 permit 10.1.2.0/24

    route-map Adjust-Inbound permit 100
    match ip address prefix-list override-local-pref
    set local-pref 500

    router bgp 12345
    neighbor 1.2.3.4 route-map Adjust-Inbound in
    -----------------------------------------------------

    If you then refresh your routes ..

    clear ip bgp 1.2.3.4 in

    The prefix 10.1.2.0/24 will be tagged with a local pref of 500 when
    received from that BGP peer. The other route from router B is still 200 and
    so now traffic to that destination goes via router A and provider 1.

    I use this to re-route traffic for certain prefixes if going via one
    transit provider seems to be causing a problem and I want to force it out
    of the other provider.

    I hope that this helps.

    Chris.
     
    Chris, Aug 22, 2007
    #4
  5. Guest

    Chris,
    Thanks... that was most helpful.. and I now have figured out how to
    route traffic out provider A or provider B based on the subnet I am
    trying to get to. I also know how to do as-prepends to make traffic
    coming in prefer A or B better. The only last outstanding question
    is:

    If I have a subnet on MY end (ie 19.2.168.0.1/24) that I want to
    always send out one peer, how would I do that?
     
    , Aug 22, 2007
    #5
  6. Merv Guest

    Routes that fall in your address space that you advertise will attract
    INBOUND traffic

    Thus you would use AS path prepend since the traffic will be INBOUND

    If you only want to advertise a specific prefix to one of your ISP
    then you would apply outbound prefix filtering


    Setup a inbound and outbound route-map for each ISP:

    neighbor x.x.x.x route-map AS-xxxx-IN in
    neighbor x.x.x.x route-map AS-xxxx-OUT out

    neighbor y.y.y.y route-map AS-xxxx-IN in
    neighbor y.y.y.y route-map AS-xxxx-OUT out

    Then construct the appropriate route-maps to implement the desired
    routing policies
     
    Merv, Aug 22, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. UltraEGG

    Directing LAN traffic

    UltraEGG, Oct 10, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    445
  2. Fred
    Replies:
    3
    Views:
    670
    Doug Knox MS-MVP
    Nov 19, 2004
  3. Robert11

    Shortcut, And Re-Directing Of Shortcut Quest. ?

    Robert11, Dec 30, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    683
    Dan DiNicolo
    Dec 30, 2004
  4. Kit

    Re-directing Yahoo Mail to Out Look Expess

    Kit, Jul 5, 2004, in forum: Computer Information
    Replies:
    1
    Views:
    421
    Scott Gardner
    Jul 5, 2004
  5. Brian Huether

    Tips for directing traffic to my online gallery?

    Brian Huether, Nov 15, 2005, in forum: Digital Photography
    Replies:
    6
    Views:
    324
    Frank ess
    Nov 15, 2005
Loading...

Share This Page