split a netblock with bgp advertisements

Discussion in 'Cisco' started by AA, Apr 14, 2004.

  1. AA

    AA Guest

    I have 2 routers each connected to 2 different ISPs. Each router is providing
    internet service to a different location. I am trying to get a net block
    of /20 or /21 addresses. Is it possible to split up my advertisements on
    these addresses under the same AS number so that I could have portions of
    the netblock going to RTR1 and other portions to RTR2? I would like to split
    the /20 or /21 into smaller netblocks and send half of the netblocks to RTR1
    and the other half to RTR2.

    Example:
    My AS AS100
    ISP1 AS200
    ISP2 AS300
    netblock: 172.16.16.0/20 (private address used for example only)

    ISP1 and ISP2 are both connected to RTR1 and RTR2.
    _______________________________________________

    On RTR1 at Site1:
    router bgp 100
    network 172.16.16.0 mask 255.255.248.0
    neighbor <ip for isp1> remote-as 200
    neighbor <ip for isp1> filter-list 2 out
    neighbor <ip for isp1> distribute-list 2 out
    neighbor <ip for isp2> remote-as 300
    neighbor <ip for isp2> filter-list 2 out
    neighbor <ip for isp2> distribute-list 2 out
    !
    ip as-path access-list 1 petmit ^$
    access list 2 permit ip 172.16.16.0 0.0.7.255
    !
    ip route 172.16.16.0 255.255.248.0 null0 250
    _______________________________________________

    On RTR2 at Site2:
    router bgp 100
    network 172.16.24.0 mask 255.255.248.0
    neighbor <ip for isp1> remote-as 200
    neighbor <ip for isp1> filter-list 2 out
    neighbor <ip for isp1> distribute-list 2 out
    neighbor <ip for isp2> remote-as 300
    neighbor <ip for isp2> filter-list 2 out
    neighbor <ip for isp2> distribute-list 2 out
    !
    ip as-path access-list 1 petmit ^$
    access list 2 permit ip 172.16.24.0 0.0.7.255
    !
    ip route 172.16.24.0 255.255.248.0 null0 250
    _______________________________________________

    TIA
     
    AA, Apr 14, 2004
    #1
    1. Advertising

  2. In article <407da0d5_1@127.0.0.1>, "AA" <> wrote:

    > I have 2 routers each connected to 2 different ISPs. Each router is providing
    > internet service to a different location. I am trying to get a net block
    > of /20 or /21 addresses. Is it possible to split up my advertisements on
    > these addresses under the same AS number so that I could have portions of
    > the netblock going to RTR1 and other portions to RTR2? I would like to split
    > the /20 or /21 into smaller netblocks and send half of the netblocks to RTR1
    > and the other half to RTR2.
    >
    > Example:
    > My AS AS100
    > ISP1 AS200
    > ISP2 AS300
    > netblock: 172.16.16.0/20 (private address used for example only)


    Yes, it's possible.

    Let's say you want 172.16.18.0/20 and 172.16.22.0/20 to prefer ISP1, and
    everything else prefer ISP2. Advertise the /20 to both ISPs, with the
    AS path padded to ISP1 (you may also need to send a community to them if
    they require it to de-preference the route). Advertise the two /20's
    only to ISP2.

    There are some caveats. Depending on the address range you were
    assigned, some ISPs may filter out the smaller advertisements, so
    routing may not be totally optimal. But it should generally work.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, Apr 14, 2004
    #2
    1. Advertising

  3. AA

    AA Guest

    Barry Margolin <> wrote:
    >In article <407da0d5_1@127.0.0.1>, "AA" <> wrote:
    >
    >> I have 2 routers each connected to 2 different ISPs. Each router is providing
    >> internet service to a different location. I am trying to get a net block
    >> of /20 or /21 addresses. Is it possible to split up my advertisements

    on
    >> these addresses under the same AS number so that I could have portions

    of
    >> the netblock going to RTR1 and other portions to RTR2? I would like to

    split
    >> the /20 or /21 into smaller netblocks and send half of the netblocks to

    RTR1
    >> and the other half to RTR2.
    >>
    >> Example:
    >> My AS AS100
    >> ISP1 AS200
    >> ISP2 AS300
    >> netblock: 172.16.16.0/20 (private address used for example only)

    >
    >Yes, it's possible.
    >
    >Let's say you want 172.16.18.0/20 and 172.16.22.0/20 to prefer ISP1, and


    >everything else prefer ISP2. Advertise the /20 to both ISPs, with the
    >AS path padded to ISP1 (you may also need to send a community to them if


    >they require it to de-preference the route). Advertise the two /20's
    >only to ISP2.
    >
    >There are some caveats. Depending on the address range you were
    >assigned, some ISPs may filter out the smaller advertisements, so
    >routing may not be totally optimal. But it should generally work.
    >
    >--
    >Barry Margolin,
    >Arlington, MA
    >*** PLEASE post questions in newsgroups, not directly to me ***



    It doesn't matter which ISP is used to get there. The important thing is
    to which router in my AS the traffic is routed. I would like to manipulate
    the traffic such that any traffic headed toward my sites will be routed to
    Site1 or Site2 depending on what part of my /20 they are trying to hit.
    Each of my sites has one connection to ISP1 and one connection to ISP2.
    My two sites are not physically connected so any traffic meant for Site2
    that gets sent to Site1 would need to get rerouted back through one of the
    ISPs.

    For this setup, I do not want any traffic destined for Site2 to enter Site1.
    With AS path prepends, I can make the route appear longer. Hopefully, that
    would cause traffic destined for the appropriate half of my netblock to flow
    through Site2. If site2 were to go down, however, the longer AS path would
    not keep traffic from trying to flow through Site1 to get to Site2. I would
    prefer that traffic going to Site2 never even hit RTR1 (also that traffic
    going to Site1 never hit RTR2)

    In the example I provided, I subneted a /20 netblock into two /21 blocks.
    What I am hoping I can do is have traffic for the first of my /21 routed
    to RTR1 and the second /21 routed to RTR2. I will definately look into what
    communities my ISPs provide but I'm still wondering if spliting up my netblock
    like this will work.
     
    AA, Apr 14, 2004
    #3
  4. In article <407dbef6_1@127.0.0.1>, "AA" <> wrote:

    > It doesn't matter which ISP is used to get there. The important thing is
    > to which router in my AS the traffic is routed. I would like to manipulate
    > the traffic such that any traffic headed toward my sites will be routed to
    > Site1 or Site2 depending on what part of my /20 they are trying to hit.
    > Each of my sites has one connection to ISP1 and one connection to ISP2.
    > My two sites are not physically connected so any traffic meant for Site2
    > that gets sent to Site1 would need to get rerouted back through one of the
    > ISPs.


    In that case, you should just get two unrelated address blocks, rather
    than playing games with one block. The only justification for using a
    single block would be if the sites could back each other up, but they
    can't.

    Anyway, for your purposes, you could just break the /20 into various
    smaller blocks and treat them as if they'd been assigned that way. Just
    advertise each one through the appropriate ISP.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, Apr 15, 2004
    #4
  5. AA

    Guest Guest

    Barry Margolin <> wrote:
    >In article <407dbef6_1@127.0.0.1>, "AA" <> wrote:
    >
    >> It doesn't matter which ISP is used to get there. The important thing

    is
    >> to which router in my AS the traffic is routed. I would like to manipulate
    >> the traffic such that any traffic headed toward my sites will be routed

    to
    >> Site1 or Site2 depending on what part of my /20 they are trying to hit.


    >> Each of my sites has one connection to ISP1 and one connection to ISP2.


    >> My two sites are not physically connected so any traffic meant for Site2
    >> that gets sent to Site1 would need to get rerouted back through one of

    the
    >> ISPs.

    >
    >In that case, you should just get two unrelated address blocks, rather
    >than playing games with one block. The only justification for using a
    >single block would be if the sites could back each other up, but they
    >can't.
    >
    >Anyway, for your purposes, you could just break the /20 into various
    >smaller blocks and treat them as if they'd been assigned that way. Just


    >advertise each one through the appropriate ISP.
    >
    >--
    >Barry Margolin,
    >Arlington, MA
    >*** PLEASE post questions in newsgroups, not directly to me ***


    Can I do this using the same AS for both my routers? These routers do not
    have a physcial connection within my AS (either of my routers would need
    to route back out to my ISP to get to my other router).
     
    Guest, Apr 15, 2004
    #5
  6. In article <407e8011_1@127.0.0.1>, <stry0101@127.0.0.1:7501> wrote:

    > Can I do this using the same AS for both my routers? These routers do not
    > have a physcial connection within my AS (either of my routers would need
    > to route back out to my ISP to get to my other router).


    Oops, I forgot that you were using the same AS.

    You can do that as long as they each have a default route pointing to
    their respective ISPs. BGP's loop prevention works by not advertising
    any routes whose AS path contains the peer's ASN. So if you're getting
    full routes from your ISPs, the routing tables they send you won't
    include the other site's address blocks.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
    Barry Margolin, Apr 15, 2004
    #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. Michael Munford

    Adjusting BGP advertisements

    Michael Munford, Dec 14, 2003, in forum: Cisco
    Replies:
    6
    Views:
    1,351
    Michael Munford
    Dec 19, 2003
  2. Replies:
    1
    Views:
    4,166
    Charlie Root
    Mar 3, 2006
  3. Mike
    Replies:
    4
    Views:
    479
  4. Miika Pekkarinen

    Simple static netblock routing issue

    Miika Pekkarinen, May 3, 2006, in forum: Cisco
    Replies:
    2
    Views:
    858
    Miika Pekkarinen
    May 4, 2006
  5. Dumbell

    a split is not a split

    Dumbell, Mar 9, 2009, in forum: Computer Support
    Replies:
    3
    Views:
    572
    Keyser Söze
    Mar 9, 2009
Loading...

Share This Page