Hi guys, i'm here trying a scenario and got some questions, picture this:
R1 is in AS 100
R2 is in AS 200 (but used to be in AS 99)
R3 is in AS 300
In R2, the peering with R1 is configured with:
neighbor "R1" local-as 99 no-prepend replace-as dual-as
And the peering of R2 with R3 is:
neighbor "R3" local-as 99 no-prepend replace-as
R1 is configured to be peering with R2 using the real AS, (200). But R3 is configured to be peering with R2 using the old, or local AS (99).
Here is the thing, as soon as R1-R2 peering is up, the peering between R2-R3 goes down, then it goes up and R1-R2 goes down, so basically, only one peering is up at a time (R1-R2 or R2-R3).
There are some logs in the routers mentioning "invalid or corrupr as-path" and something about "bad attributes". Cheking the neighbor advertise-ments and routes learned, i learnd that for some reason, R2 is advertising to R1 what it learned from R1, and advertising R3 what it learned from R3. Again, debuging noticed that this, although unusual, is not a problem because R1 and R3 just ignore the advertisments because they see thery AS in the updates..
BUT.. in that debug i noticed a message talking about "enforce as-path first". This is a BGP feature that requires that an update coming from a neighbor in AS X, needs to have AS X as the first as-path hop, which seams fare. But why is this validation failing?
For some reason, R3 is receiving from R2, the routes advertised from R1, with a first hop of AS 100 (the real AS), when it should be AS 99, so of course, the validation fails. The same thing goes to R1 receiving from R2 routes generated in R3 with a first hop of AS 99, when it was expecting a first hop of AS 100 (because that what is configured in R1.. neighbor R2 remote-as 100).
So.. issuing the command "no bgp enforce-first-as" in R1 OR R3, solved the problem.
But this seems very strange.. why does the peering of R2 and R3 affects the peering with R2 and R1? Why is R2 doing route feedback to R1 and R3?
And most important, why is R2, for example, announcing to R3 the routes from R1 with a first hop of AS 100? The option "replace-as" should take down this AS100 and replace it with a AS 99 right??? that is the purpose of the option.
My wild guess is that there must be some kind of order and rules for this two options (replace and dual-as), that says:
My peering with R1 says has the option "no-prepend" so to any route learned from R1 I will not prepend the AS 100. So when I announce it to R3, i cannot replace this AS100 with the AS99 that R3 is expecting" .. or something like that :S
Help! very confused :P
thanks in advance!