in

IEOC - Internetwork Expert's Online Community

Welcome to Internetwork Expert's Online Community - IEOC - a place for CCIE and CCENT candidates to connect, share, and learn. Our Online Community features CCIE forums and discussions for all tracks including Routing & Switching, Voice, Security, Service Provider, and Storage. Through these online communities you can discuss your questions with thousands of your peers, hundreds of CCIE's and Internetwork Expert's own team of world renowned CCIE instructors and authors, Brian Dennis - Quintuple CCIE #2210, Scott Morris - Quad CCIE #4713, Brian McGahan – Triple CCIE #8593, Petr Lapukhov - Quad CCIE #16379, Anthony Sequeira - CCIE #15626, Keith Barker - Dual CCIE #6783, and Marvin Greenlee - Triple CCIE #12237.
Latest post 06-29-2009 6:34 AM by mpls-te. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 06-23-2009 11:24 PM

    local-as no-prepend replace-as

    Hi, Can someone clarify the differences between these three:

    A) .

    router bgp 500

    neighbor 10.0.0.2 local-as 200

    B) .

    router bgp 500

    neighbor 10.0.0.2 local-as 200 no-prepend

    C).

    router bgp 500

    neighbor 10.0.0.2 local-as 200 no-prepend replace-as

     

    In my lab, I saw both A and B have the same result (200 500 in the as path). C only shows one (200 in the as path). Now I am confused. Please help!

    Thanks!

     

    • Post Points: 20
  • 06-24-2009 1:04 AM In reply to

    • Jent
    • Top 25 Contributor
    • Joined on 01-28-2009
    • Finland
    • Elite
    • Points 6,180

    Re: local-as no-prepend replace-as

    no-prepend  Do not prepend local-as to updates from ebgp peers

    replace-as  Replace real AS with local AS in the EBGP updates

     

    You checked the AS-path from 10.0.0.2, right? The prefixes router in AS500 advertised to 10.0.0.2 were propably received through iBGP ? If you read explanation for "no-prepend" carefully, it only claims to affect only eBGP-received routes. Could this be the reason?

    • Post Points: 35
  • 06-24-2009 10:44 AM In reply to

    Re: local-as no-prepend replace-as

    Yes, I did "show ip bgp" on the peer router (10.0.0.2) which is in AS 400. Yes, they are EBGP peer. I don't see any difference in the result by adding "no-prepend" keyword. Weird, that's way I am confused.

    Thanks!

    • Post Points: 5
  • 06-24-2009 11:50 AM In reply to

    Re: local-as no-prepend replace-as

    Looks like the "no-prepend" option applies to inbound updates from ebgp peers and "replace-as" applies to outbound updates to ebgp peers.  Here are a few examples to illustrate the point from the online command reference for BGP.

     

    no-prepend Keyword Configuration: Example

    The following example configures BGP to not prepend autonomous system 500 to routes received from the 192.168.1.1 neighbor:

    router bgp 400
    address-family ipv4 multicast
     network 192.168.0.0
     neighbor 192.168.1.1 local-as 500 no-prepend 

    replace-as Keyword Configuration: Example

    The following example strips private autonomous system 64512 from outbound routing updates for the 172.20.1.1 neighbor and replaces it with autonomous system 600:

    router bgp 64512 
    address-family ipv4 unicast 
     neighbor 172.20.1.1 local-as 600 no-prepend replace-as 
     neighbor 172.20.1.1 remove-private-as 

    Jent:

    no-prepend  Do not prepend local-as to updates from ebgp peers

    replace-as  Replace real AS with local AS in the EBGP updates

     

    You checked the AS-path from 10.0.0.2, right? The prefixes router in AS500 advertised to 10.0.0.2 were propably received through iBGP ? If you read explanation for "no-prepend" carefully, it only claims to affect only eBGP-received routes. Could this be the reason?

     

    • Post Points: 20
  • 06-24-2009 1:06 PM In reply to

    Re: local-as no-prepend replace-as

     

    Thanks guys! I found it.

    http://ieoc.com/forums/t/3161.aspx

     

     

    • Post Points: 20
  • 06-25-2009 9:56 AM In reply to

    Re: local-as no-prepend replace-as

    Interestengly enough, you can use the combination "local-as no-prepend replace-as" to implement a for of "AS NATing" with BGP.

    For example, if you have the following configuration

     

    AS100--AS200--AS300

     

    You may want to make AS100 thinking that it peers with AS300 and AS300 thinking that it peers with AS100. To accomplish this, AS300 should be configured with "local-as no-prepend replace-as 300" on the peering with AS100 and with "local-as no-prepend replace-as 100" on the peering with AS 300. Furthermore, if you implement MPLS or any other kind of tunneling in AS200, you may make it looking like AS200 does not even exist, and AS100/300 peer directly.

    Petr Lapukhov, CCIE #16379 (R&S/Security/SP/Voice)
    petr@internetworkexpert.com 

    InternetworkExpert Inc.
    http://www.internetworkexpert.com

    Filed under: , ,
    • Post Points: 35
  • 06-25-2009 1:48 PM In reply to

    Re: local-as no-prepend replace-as

    Let's hope that Cisco doesn't include that scenario on a lab.  Although maybe they're adding MPLS to the lab for that specific reason.  Stick out tongue

    Petr Lapukhov:
    Furthermore, if you implement MPLS or any other kind of tunneling in AS200, you may make it looking like AS200 does not even exist, and AS100/300 peer directly.

    • Post Points: 5
  • 06-29-2009 6:34 AM In reply to

    Re: local-as no-prepend replace-as

    Petr Lapukhov:

    Interestengly enough, you can use the combination "local-as no-prepend replace-as" to implement a for of "AS NATing" with BGP.

    For example, if you have the following configuration

     

    AS100--AS200--AS300

     

    You may want to make AS100 thinking that it peers with AS300 and AS300 thinking that it peers with AS100. To accomplish this, AS300 should be configured with "local-as no-prepend replace-as 300" on the peering with AS100 and with "local-as no-prepend replace-as 100" on the peering with AS 300. Furthermore, if you implement MPLS or any other kind of tunneling in AS200, you may make it looking like AS200 does not even exist, and AS100/300 peer directly.

    I've used this command in a migration between 2 companies that are customers of the company I work for (I work for an ICT Service Provider). Its pretty awsome. :)

    CCIE #24150 (SP)
    JNCIS-M
    CCIP
    CCNP
    Bach. of Computer Science.

    --------
    what's next? I'm thinking JNCIE-M.....

    • Post Points: 5
Page 1 of 1 (8 items)
IEOC CCIE Forums Internetwork Expert CCIE Training
About IEOC | Terms of Use | RSS | Privacy Policy
© 2010 Internetwork Expert, Inc. All Rights Reserved