Redistribution of BGP path via OSPF
Good morning, we have setup OSPF internally to redistribute all of our routes and it seems that we lose the as path on the way: BGP OSPF BGP upstream1 -- router1.place6 --- router2.place5 --- upstream2 | | BGP internal peer The routes that are announced by router2.place5 do not contain the AS path of the "internal peer" anymore, as shows the output of router2.place5: bird> show route all XX::/48 Table master6: XX::/48 unicast [ospf_v6 12:01:06.457] E2 (150/5/10000) [147.78.195.251] via fe80::21b:21ff:febc:7c80 on bond0.8 Type: OSPF-E2 univ OSPF.metric1: 5 OSPF.metric2: 10000 OSPF.tag: 0x00000000 OSPF.router_id: 147.78.195.251 This way, when we re-announce XX::/48 to upstream2, it looks like as if we announce that from our ASN, instead of the ASN from the internal peer. At the moment we export all routes via OSPF, internal and external. How do I tell ospf to forward (tag?) the externally received bgp routes and use that information on the other site? Best regards, Nico -- Modern, affordable, Swiss Virtual Machines. Visit www.datacenterlight.ch
On Sat, Dec 28, 2019 at 01:22:53PM +0100, Nico Schottelius wrote:
Good morning,
we have setup OSPF internally to redistribute all of our routes and it seems that we lose the as path on the way:
Hello You do not want export BGP routes to OSPF, or even export them back to BGP. That is unreasonable setup with today BGP table sizes, and intristic limitations like inability to transfer BGP attributes (as you noticed). The standard setup is to use OSPF for internal routes and IBGP for external ones. Or just IBGP with direct / next hop self, if topology is simple enough. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Good morning, thanks for the clarification, I think I begin to get it. - Using eBGP for getting/peering externally - Using OSPF to distribute internal routes as well as routes to the upstreams - Using iBGP to distribute the external routes with unmodified next hop ("direct; gateway recursive;") Does that sound/look sane to you? Best, Nico p.s.: I have to say I find the "next hop self" / iBGP approach a bit confusing, as it hides the original route and makes it hard to debug issues. Ondrej Zajicek <santiago@crfreenet.org> writes:
On Sat, Dec 28, 2019 at 01:22:53PM +0100, Nico Schottelius wrote:
Good morning,
we have setup OSPF internally to redistribute all of our routes and it seems that we lose the as path on the way:
Hello
You do not want export BGP routes to OSPF, or even export them back to BGP. That is unreasonable setup with today BGP table sizes, and intristic limitations like inability to transfer BGP attributes (as you noticed).
The standard setup is to use OSPF for internal routes and IBGP for external ones. Or just IBGP with direct / next hop self, if topology is simple enough.
-- Modern, affordable, Swiss Virtual Machines. Visit www.datacenterlight.ch
participants (2)
-
Nico Schottelius -
Ondrej Zajicek