BGP Routing – iBGP AS Path Prepend Propagation

bgprouterrouting

I have following scenario:
My AS: 64501 has two routers R3 (Redundand) and R4 (Main).

ISP AS: 64500 has 3 routers R1, R2 and R5

I have eBGP peering with ISP, I have no access to ISP configuration, only to configuration on my net (R3, R4).

enter image description here

I need that incoming traffic from ISP always was sent to Main router (R4) and only if Main isn't accessible send traffic to Geo redundant (R3).

I can do it using AS-PATH Prepend sent from Geo-redundant router (R3) and it's working:

enter image description here

But in this case traffic in ISP from R5 is sent as showed on picture (via R1-R2-R4) – one more hop, not straight (R5-R2-R4). This happens because iBGP is not using AS-PATH prepend, so R1 is preferring route via R2, as route R1<->R3 is prepended. But R1 is sending iBGP route update to R5 without as-path prepend. So for R5 there are two equal routes to My network, and it's choosing route via R1, as R1 IP address is lower that R2 IP.

Question#1: Can I configure somehow devices only in My network, so traffic will pass like this, without MED or Communities?

Questions#2: Can I configure somehow devices in My and in ISP network, so traffic will pass like this, without MED or Communities?

enter image description here

Thank you.

Best Answer

I think you are confusing routers and ASes. To BGP, an AS is a hop, not a router. You can try to influence a neighbor AS for which peer it uses to send traffic to your AS, but the neighbor AS is free to ignore your suggestions.

It looks like your neighbor AS is following your suggestion for which of your routers it should use to get to your AS, and you could specify which of your routes could come in on which of your routers, but you cannot control routing inside the neighbor AS to the degree that you seem to want. In any case, MED wouldn't be any more effective than AS prepending. Both are pretty blunt, and neither will give you any degree of control inside the neighbor AS.

You would need to work with the neighbor AS administrators to see if you could come to some arrangement. That may be using communities, or it may be something the neighbor AS administrators want to do on their own. You simply have no direct control over what happens in a different AS. That is the Autonomous in Autonomous System.

Question#1: Can I configure somehow devices only in My network, so traffic will pass like this, without MED or Communities?

Nothing you do in your AS will change the internal routing of a neighbor AS.

Questions#2: Can I configure somehow devices in My and in ISP network, so traffic will pass like this, without MED or Communities?

You don't have the authority to configure devices in your neighbor's AS.


Your problem seems to be that your neighbor AS prefers to send R5 traffic to R1, and that is its right, and there really isn't anything you can do about that, except through business negotiation. What you could do is to make R3 your main router, and R4 your backup router. That would achieve your goal, at least until you are in a failover situation, at which point you will be in the same situation you are now.