R1#sh run | s bgp
router bgp 10
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 77.0.10.1 mask 255.255.255.255
neighbor 203.0.113.2 remote-as 20
no auto-summary
R2:
R2#sh run | s bgp
router bgp 20
no synchronization
bgp log-neighbor-changes
neighbor 203.0.113.1 remote-as 10
neighbor 203.0.113.6 remote-as 20
neighbor 203.0.113.6 next-hop-self
no auto-summary
R3:
R3#sh run | s bgp
router bgp 20
no synchronization
bgp log-neighbor-changes
network 88.0.20.1 mask 255.255.255.255
neighbor 203.0.113.5 remote-as 20
no auto-summary
I didn’t create any IGP protocol between R2 and R3 because they’re just directly connected
R1 cannot ping R3 Loopback 1 interface (88.0.20.1) unless I add the source param because there is no going back to R1 from R3:
R1# ping 88.0.20.1 source 77.0.10.1
So there is no communication between those routes actually unless I specify the source IP.
How can it be solved in a more realistic scenario? Am I missing some configuration?
Should a default route be redistributed via any IGP inside each AS pointing at the border route? I guess advertising 203.0.113.4/30 and 203.0.113.0/30 through eBGP is not a good option.
BGP functions somewhat differently than IGPs. When a router leanrs about a particular destination using an IGP like OSPF or EIGRP, you expect to be able to reach that destination with a ping. This is not the case with BGP.
This is because BGP is used to advertise networks from one Autonomous System (AS) to another. The primary information that is given to a BGP router, is the destination AS. In your scenario, the 77.0.10.1/32 network is advertised, and R3 learns about it. R3 knows that to reach that network it must go via AS10. So BGP is telling R3 “You must follow the path of AS20 → AS10 to reach your destination.”
Simply knowing the ASes that you will traverse does not guarentee routing success. You must ensure that the underlying within each AS is also functional. In your particular case, what is happening is that when you ping 88.0.20.1 from R1 without specifying the source, the IP address of the exit interface is used as the souce IP. Specifically, 203.0.113.1 is used as the souce IP. When this ping reaches R3, it must send the ping back to 203.0.113.1. But it doesn’ know where to find it becuse it’s not in the routing table.
If you want to make this ping work, you must enable a IGP within AS20 and advertise the 203.0.113.0/3 network into the routing protocol.
However, keep in mind that you will rarely want a core BGP router to communicate directly with some end device in another AS. This lack of connectivity between the interface of a BGP router and an end device (represented by your Lo0 interface of R3) is actually desirable, and it’s what you would see in a production network. Does that make sense?