I have a problem with two(or more) networks that are using BGP (with lots of AS in every network) and they have to be connected using BGP.
Notes:
a) I have to use only BGP.
b) The following is a simplified example, of course I do not have only six routers or six AS.
c) Aggregation and Confederations does not solutes the problem.
d) I want to reconfigure only border routers.
I am far from a BGP expert, but it is my impression that you shouldn’t be able to do that. BGP uses the AS path attribute of a route it receives from a peer to guarantee loop free topology (if the AS path contains the AS of the receiving router the route update is discarded). If some AS were able to rewrite the AS path of a route by removing AS numbers from the path you could no longer guarantee loop free paths.
How, I could make R4 to advertise R5 and R6 networks to R3 with AS path “4” instead of “4 5 1”?
If all of the routers in ‘network 2’ are under a common administration then it seems what you’re describing is BGP Confederations. If you are, I can show you how to do it in MikroTik.
If not, then I don’t know of a way to achieve what you’re wanting to do. Besides, its probably a bad idea for exactly the same reasons as fewi described.
Confederation is not a solution, because:
a) I do not want it, because I have to make changes on every router. I want to reconfigure only border routers.
b) It does not advertises what you really believe…
Its a bit complicated to explain, but it have been tested, and Confederations does not act as “AS-NAT”.
Note: I am not sure if Mikrotik is able to show a result like the above, since we had tested on Cisco.
Sorry my mistake, it is not possible even with routing filters for the reason fewi mentioned.
If you are not using confederations then your setup is not valid, you can’t divide one AS into two (R1 and R6 has the same AS and are not interconnected) and expect it to work.