Running two sessions with different local AS numbers is possible, but it si definitely an advanced topic and not an expected use case. Probably the most elegant way would be to have two routing tables, one for each local AS (BGP sessions with that local AS connected to that table) and these tables connected with a pipe with filters like (for direction from A to B): bgp_path.append(A); if B ~ bgp_path then reject; (although B ~ bgp_path -> reject would be perhaps better in import filter of BGP protocols of A) Obviously, the issue is a lot simpler if you do not want redistribute routes from one BGP neighbor to another one.
Is it something like in Wiki - BGP Example 2?
I have two upstream peers: A (ISP1) and B (ISP2), and two local ASN: C and D (one router).
Now AS C connects with A and B - this configuration works ok. But I must add ASN D.
ASN A will connect with D, B with C, and C with D. Like this: A - {D - C} - B
|
-- Miłosz |