I wanted to ask if anyone knows how the config is done when using OSPF and BGP together. For example if I have an OSPF Area 0 → ASBR → Internet do you run eBGP on the ASBR outgoing interface or do you need a dedicated BGP router after the ASBR so it’s OSPF Area 0 → ASBR → BGP router → Internet? The eBGP config between other eBGP neighbors makes perfect sense to me but exactly how these parts fit together I’m a bit unsure about. So I basically just wanna know how you properly config the connection between ASBR and BGP towards another AS.
When running BGP with OSPF, the ASBR is the router that runs both OSPF and BGP as routing protocols. It runs BGP and creates a neighbor adjacency with other OSPF routers in its area, but it also creates a BGP peering with some other router that faces the internet.
So to answer your question directly, the ASBR itself runs BGP. By definition, an ASBR is the router that runs OSPF but also has routing information from other sources that is redistributed into OSPF. That other source can be BGP.
R1 is a BGP router and will peer with the router labeled BGP. That makes R1 itself a BGP peer! So the ASBR acts as the point of redistribution between the two routing protocols. Does that make sense?