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 Ostreš, Dec 17, 2004
    #1
    1. Advertisements

  2. 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, Dec 18, 2004
    #2
    1. Advertisements

  3. On 18.12.2004 02:28 Barry Margolin wrote
    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, Dec 18, 2004
    #3
  4. Ivan Ostreš

    Ivan Ostreš Guest

    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 Ostreš, Dec 18, 2004
    #4
  5. On 18.12.2004 12:28 Ivan Ostreš wrote
    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, Dec 18, 2004
    #5
  6. Ivan Ostreš

    Ben Guest

    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.
    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

    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 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 Ostreš, Dec 20, 2004
    #7
  8. On 20.12.2004 09:27 Ivan Ostreš 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
     
    Arnold Nipper, Dec 20, 2004
    #8
  9. Ivan Ostreš

    Ben Guest

    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
    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, Dec 21, 2004
    #10
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.