Search code examples
loopbackbgpospfquagga

Connecting eBGP and iBGP routers in Quagga


I am trying to announce a prefix from AS7 and I like AS6 receive it and send it to AS2(as shown in the attached topologyenter image description here). I have OSPF running on all routers of AS6. I have assigned 10.x.x.x for each loop back interface of my routers in AS6. for example 10.6.6.6 for r6. 10.4.4.4 for r4 etc. I have stablished a peer connection between all of the routers of AS6. for example, r3 has connection with r6,r4,r9 and r5 event though we do not have physical connection between them.

My question is the ip address I should use for r6 should be a public ip, because if I use 10.6.6.6 for r6, then r7 from AS7 will not be able to communicate with it. the same reason for r5 and r9 which should be run with their public address. If I use r6's public ip and then if i connect r6 to r5 and r9, then I do not need OSPF and without OSPF also r6 will be able to talk to r9 and r5.

I confused how can I involve r6 in my full mesh topology with using its public ip address. Should I assign r6's public ip address to its loop back?


Solution

  • 1) Within AS6 you need a full mesh of IBGP sessions: R3-R4, R3-R5, R3-R6, R3-R9, R4-R5, R4-R6, R4-R9, R5-R6, R6-R9. You need the full mesh for two reasons. One: each router needs the IBGP routes in its forwarding table, so each router needs to speak IGBP. Two: IBGP routes are normally not propagated from one IBGP session to another IBGP session, so the IBGP sessions must form a full mesh.

    Note: Or, as an alternative to a full mesh of IBGP sessions you can use one or more router reflectors: RR-R3, RR-R4, RR-R5, RR-R6, RR-R9.

    Note: A common design is the so-called BGP-free core. In this design you only run IBGP on the edge routers of your AS (in your example R5, R9, and R6). The other routers in the core (R3 and R4 in your example) only run the IGP (which is OSPF in your example). This means that the BGP routes are not in the core routers R3 and R4. To make forwarding work, some sort of (automated) tunneling is used from edge router to edge router (typically MPLS but sometimes GRE or VXLAN).

    2) It is recommended to use the loopback addresses as the source and destination address of the IBGP session. This is to avoid tying the multi-hop IBGP session to a physical interface. For example, imagine you also had an R5-R9 link and consider the R6-R9 IBGP session. The physical path of the R6-R9 IBGP session would normally be R6-R4-R9. But if the R6-R4 interface goes down, we want the IBGP session to stay up and move over to the R6-R3-R5-R9 path.

    3) Because the IBGP sessions are normally loopback to loopback and sometimes multi-hop, you need some mechanism for each BGP speaker (R3, R4, R5, R6, R9) to discover the route to the loopback. This is why every router in the AS must also run OSPF (R3, R4, R5, R6, R9).

    4) The loopback addresses they are typically public IP addresses, but it they could theoretically also be private IP addresses. What really matters is that each router in AS6 has OSPF reachability to the loopback of the other routers in the same domain.

    5) The EBGP sessions R2-R5, R2-R9, and R6-R7 should be bound to the interfaces. In other words, the source and destination IP addresses of those BGP sessions should be the IP addresses of the inter-AS interfaces.