How to modify AS path??

Discussion in 'Cisco' started by Ivan Ostreš, Dec 17, 2004.

  1. Ivan Ostreš

    Ivan Ostreš Guest

    Hello all,

    is there a way to modify (NOT prepend) AS path on cisco routers? I want
    to "clean" some ASN's off the AS-PATH.

    I know it would be dangerous in internet-exposed network because of the
    loops, but this one is not connected to internet (not by bgp at least).


    --
    -Ivan.

    *** Use Rot13 to see my eMail address ***
    Ivan Ostreš, Dec 17, 2004
    #1
    1. Advertising

  2. In article <>,
    Ivan Ostreš <> wrote:

    > Hello all,
    >
    > is there a way to modify (NOT prepend) AS path on cisco routers? I want
    > to "clean" some ASN's off the AS-PATH.
    >
    > I know it would be dangerous in internet-exposed network because of the
    > loops, but this one is not connected to internet (not by bgp at least).


    If the route map says "set as-path ...", instead of "set as-path prepend
    ....", I'd expect it to replace the AS path instead of prepending to it.

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

  3. On 18.12.2004 02:28 Barry Margolin wrote

    > In article <>,
    > Ivan Ostreš <> wrote:
    >
    >> Hello all,
    >>
    >> is there a way to modify (NOT prepend) AS path on cisco routers? I want
    >> to "clean" some ASN's off the AS-PATH.
    >>
    >> I know it would be dangerous in internet-exposed network because of the
    >> loops, but this one is not connected to internet (not by bgp at least).

    >
    > If the route map says "set as-path ...", instead of "set as-path prepend
    > ...", I'd expect it to replace the AS path instead of prepending to it.
    >


    Well, you won't be successfull. The set command only does

    set as-path

    To modify an autonomous system path for BGP routes, use the set as-path
    command in route-map configuration mode. To not modify the autonomous
    system path, use the no form of this command.

    set as-path {tag | prepend as-path-string}

    no set as-path {tag | prepend as-path-string}
    Syntax Description

    tag
    ----
    Converts the tag of a route into an autonomous system path. Applies only
    when redistributing routes into BGP.

    prepend as-path-string
    -----------------------
    Appends the string following the keyword prepend to the autonomous
    system path of the route that is matched by the route map. Applies to
    inbound and outbound BGP route maps.




    Arnold

    --
    Arnold Nipper, AN45
    Arnold Nipper, Dec 18, 2004
    #3
  4. Ivan Ostreš

    Ivan Ostreš Guest

    In article <>,
    says...
    > In article <>,
    > If the route map says "set as-path ...", instead of "set as-path prepend
    > ...", I'd expect it to replace the AS path instead of prepending to it.
    >


    Hm.. I expected that too, but it seems it was wrong since only things
    you can do with "set as-path" is path prepending and using tag values so
    both of that options are out.

    The main problem was that I had a device at edge of the network (non-
    cisco device) that was speaking BGP but didn't have a concept of
    confederation which were heavily used in other parts of the network.

    To summarize: I had to accept NLRI's with my own (actually outside - not
    confederation identifier) AS in the path. I finally solved it using
    "neighbor x.x.x.x allowas-in 1".

    I still don't get it why there's no command to modify AS path....


    --
    -Ivan.

    *** Use Rot13 to see my eMail address ***
    Ivan Ostreš, Dec 18, 2004
    #4
  5. On 18.12.2004 12:28 Ivan Ostreš wrote

    >
    > I still don't get it why there's no command to modify AS path....
    >


    You don't need it and it almost only would cause harm :) There are
    already enough knobs to twiddle on.

    The AS path is constructed by many. Hence it does make sense that you
    only can change your part.




    Arnold
    --
    Arnold Nipper, AN45
    Arnold Nipper, Dec 18, 2004
    #5
  6. Ivan Ostreš

    Ben Guest

    Ivan Ostreš wrote:
    > The main problem was that I had a device at edge of the network (non-
    > cisco device) that was speaking BGP but didn't have a concept of
    > confederation which were heavily used in other parts of the network.
    >


    It is a requirement of confederations that every bgp speaker in the
    network understands them. Your non-confedaration router has to be
    configured outside the AS, e.g. a private AS stub.

    > I still don't get it why there's no command to modify AS path....
    >


    Remember AS-path is BGP's main loop-detection mechanism...imagine the
    chaos if inexperienced engineers started messing with global routes -
    more trouble than it's worth.

    Ben
    Ben, Dec 19, 2004
    #6
  7. Ivan Ostreš

    Ivan Ostreš Guest

    In article <>, says...
    > Ivan Ostreš wrote:
    > > The main problem was that I had a device at edge of the network (non-
    > > cisco device) that was speaking BGP but didn't have a concept of
    > > confederation which were heavily used in other parts of the network.
    > >

    >
    > It is a requirement of confederations that every bgp speaker in the
    > network understands them. Your non-confedaration router has to be
    > configured outside the AS, e.g. a private AS stub.
    >


    It IS confgured like that, the only problem was with customer routes
    received by this "stupid" router when those routes were propagated to
    routers in the confederation. But, I've fixed that so it isn't really a
    problem anymore.

    > > I still don't get it why there's no command to modify AS path....
    > >

    >
    > Remember AS-path is BGP's main loop-detection mechanism...imagine the
    > chaos if inexperienced engineers started messing with global routes -
    > more trouble than it's worth.
    >


    I know very well it is loop-detection mechanism and looks like a good
    one. I don't think there would be bigger chaos (that it is now) if
    changing AS-path would be possible. It would need some additional
    filtering by ISPs (which should be in place anyway).

    --
    -Ivan.

    *** Use Rot13 to see my eMail address ***
    Ivan Ostreš, Dec 20, 2004
    #7
  8. On 20.12.2004 09:27 Ivan Ostreš wrote

    >> Remember AS-path is BGP's main loop-detection mechanism...imagine the
    >> chaos if inexperienced engineers started messing with global routes -
    >> more trouble than it's worth.
    >>

    >
    > I know very well it is loop-detection mechanism and looks like a good
    > one. I don't think there would be bigger chaos (that it is now) if
    > changing AS-path would be possible. It would need some additional
    > filtering by ISPs (which should be in place anyway).
    >


    ymmv, but with AS-path mangling filtering would be absolutely useless as
    the meaning of the AS path is void. BGP life would be a nightmare.



    Arnold
    --
    Arnold Nipper, AN45
    Arnold Nipper, Dec 20, 2004
    #8
  9. Ivan Ostreš

    Ben Guest

    Arnold Nipper wrote:
    > On 20.12.2004 09:27 Ivan Ostreš wrote
    >
    >>> Remember AS-path is BGP's main loop-detection mechanism...imagine the
    >>> chaos if inexperienced engineers started messing with global routes -
    >>> more trouble than it's worth.
    >>>

    >>
    >> I know very well it is loop-detection mechanism and looks like a good
    >> one. I don't think there would be bigger chaos (that it is now) if
    >> changing AS-path would be possible. It would need some additional
    >> filtering by ISPs (which should be in place anyway).
    >>

    >
    > ymmv, but with AS-path mangling filtering would be absolutely useless as
    > the meaning of the AS path is void. BGP life would be a nightmare.
    >
    >
    >
    > Arnold

    Yes, it's virtually the same reason many people dislike NAT...kind of
    defeats one of the original purposes of ip.
    Ben, Dec 20, 2004
    #9
  10. On 20.12.2004 23:52 Ben wrote

    >>
    >> ymmv, but with AS-path mangling filtering would be absolutely useless as
    >> the meaning of the AS path is void. BGP life would be a nightmare.
    >>
    >>
    >>
    >> Arnold

    > Yes, it's virtually the same reason many people dislike NAT...kind of
    > defeats one of the original purposes of ip.


    WSell, I wouldn't even compare both situation to each other. While
    NATting is a more or less elegant solution for saving IPv4 address
    space, mangling with AS paths is like playing with dynamite ... as
    always ymmv,



    Arnold
    --
    Arnold Nipper, AN45
    Arnold Nipper, Dec 21, 2004
    #10
    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. Fred
    Replies:
    3
    Views:
    4,772
    Walter Roberson
    Dec 2, 2004
  2. Christoph Ehret
    Replies:
    1
    Views:
    4,101
    Walter Roberson
    Jan 5, 2005
  3. DW
    Replies:
    7
    Views:
    26,046
    lbellysmit
    Jan 3, 2011
  4. Martin Krag

    Long Path Tool - Fix Path Too Long Forever

    Martin Krag, Mar 31, 2011, in forum: Windows 64bit
    Replies:
    0
    Views:
    1,380
    Martin Krag
    Mar 31, 2011
  5. Martin Krag

    Long Path Tool - Fix Path Too Long Forever

    Martin Krag, Mar 31, 2011, in forum: Wireless Networking
    Replies:
    1
    Views:
    2,263
    robinst
    Dec 15, 2012
Loading...

Share This Page