All,
So, I was playing around this morning with the local-as command in bgp. I wanted to make sure I really understood all the options, including the new dual-as option. So I started by reading the cisco documentation. I thought I was pretty familiar with the local-as command with the no-prepend option. According to CCO the no-prepend option "configures the router to not prepend the local autonomous system number to routes that are received from external peers. " Well that just sounded kind of confusing. Is it supposed to no prepend the configured AS to any route it advertises, or just routes that it learned via another eBGP speaker.
I decided to lab it out. I have three routers running eBGP. R2 is connected to R8 and R8 is connected to R1 with the following configs:
R2:
router bgp 22
no synchronization
bgp log-neighbor-changes
network 200.0.0.2 mask 255.255.255.255
neighbor 200.2.8.8 remote-as 88
neighbor 200.2.8.8 local-as 200
no auto-summary
R8:
router bgp 88
no synchronization
bgp log-neighbor-changes
network 200.0.0.8 mask 255.255.255.255
neighbor 200.1.8.1 remote-as 18
neighbor 200.1.8.1 local-as 75
neighbor 200.2.8.2 remote-as 200
no auto-summary
R1:
router bgp 11
no synchronization
bgp log-neighbor-changes
network 200.0.0.1 mask 255.255.255.255
neighbor 200.1.8.8 remote-as 75
neighbor 200.1.8.8 local-as 18
no auto-summary
A show ip bgp on R1 looks thus:
*> 200.0.0.1/32 0.0.0.0 0 32768 i
*> 200.0.0.2/32 200.1.8.8 0 75 88 200 22 i
*> 200.0.0.8/32 200.1.8.8 0 0 75 88 i
Ok that makes sense, everything is as it should be. So, I add the no-prepend option to all the local-as statements. This is a local-as change and naturally causes the session to re-establish. Once the session re-establishes I get the following on R1 from show ip bgp:
*> 200.0.0.1/32 0.0.0.0 0 32768 i
*> 200.0.0.2/32 200.1.8.8 0 75 88 200 22 i
*> 200.0.0.8/32 200.1.8.8 0 0 75 88 i
As you can see nothing has changed. Nothing is different. As far as I can surmise this option does nothing. It does not tell the router to not prepend the configured AS to any eBGP advertisement, including those from another eBGP speaker. Only when I add the replace-as option does the show ip bgp output change on R1:
*> 200.0.0.1/32 0.0.0.0 0 32768 i
*> 200.0.0.2/32 200.1.8.8 0 75 200 i
*> 200.0.0.8/32 200.1.8.8 0 0 75 i
I have tried this on multiple routers, from 3750s and 2800s to 7600 RSP720s and GSRs. I have tried different code trains including 12.0(S). The results always seem to be the same.
Is this right? Am I reading the documentation right, but looking in the wrong place for the effects of this command? Did something change since this command was documented? What does the no-prepend option actually do?