BGP OSPF Interaction
obsoleted by
- rfc-1403 — BGP OSPF Interaction
Extracted elements (30)
BGP does not carry subnet information, so multiple OSPF subnet routes for a subnetted network are collapsed into a single network route when exported into BGP.
Manually configured tags (Automatic bit=0) are the default for backward compatibility with existing OSPF deployments. No route characteristics should be inferred from such tags.
The BGP identifier must equal the OSPF router ID so that an ASBR can determine which border router's AS_PATH to use when a route is imported by multiple ASBRs, and to allow administrators to correlate BGP and OSPF state.
The OSPF cost and BGP INTER-AS METRIC differ in width and semantics, making a complex mapping unnecessary; a simple default of INTER-AS METRIC=1 is used instead.
The OSPF Forwarding Address is populated with BGP NEXT_HOP (and vice versa) to avoid requiring packets to take an extra hop through the ASBR when traversing the AS boundary, analogous to EGP indirect neighbor support.
The OSPF tag encodes BGP ORIGIN and AS_PATH to allow ASBRs not running IBGP to advertise correct routes. This eliminates the need to configure IBGP on every ASBR in an AS that mixes EGP and BGP as exterior gateway protocols.
The OSPF tag is not wide enough to carry AS_PATH information for routes with path length greater than 1. Such routes must be carried via IBGP and must not be exported from OSPF into BGP.
BGP implementations should support control of BGP-learned route import into OSPF at both single-network granularity and at AS granularity, where the AS may be either the originating AS or the adjacent AS.
For backward compatibility with existing OSPF implementations, the manually configured tag format (Automatic bit=0) must be the default for importing routes into OSPF; automatic tag generation must be explicitly enabled by the administrator.
An implementation must have a mechanism to set a minimum elapsed time between learning a new OSPF route and advertising it via BGP; the default value must be 0, meaning the route is advertised instantly.
By default, no routes must be exported from OSPF into BGP. A single mechanism must permit all OSPF inter-area and intra-area routes to be exported; OSPF external routes of type 1 and type 2 must never be exported into BGP unless explicitly configured.
By default, no routes must be imported from BGP into OSPF; administrators must configure every route they wish to import. Routes learned via IBGP must not be imported into OSPF.
For backward compatibility, the Automatic bit must default to 0 and a mechanism must exist to enable automatic tag generation. Nothing must be inferred about OSPF route characteristics from tag bits unless the tag was automatically generated.
Routes with complete path information and pl=10 (a=1,c=1,pl=10) must not be exported into BGP; these routes are already imported from BGP into OSPF and will be conveyed to other BGP speakers via IBGP.
Routes with incomplete path information and pl=10 (truncated AS_PATH) must not be re-exported into BGP at another ASBR, as the AS_PATH has been truncated by a border router not running IBGP.
The ASBR must never generate a default route into the OSPF routing domain unless explicitly configured to do so.
The BGP identifier must be the same as the OSPF router ID at all times that the router is up.
The BGP INTER-AS METRIC must default to 1. The administrator must be able to statically configure the INTER-AS METRIC for any network route.
The OSPF cost must default to 1 and the OSPF metric type must default to type 2 for every BGP route imported into OSPF.
The pl=11 (binary) tag value is reserved; routers must not generate such a tag when importing routes into OSPF, and ASBRs must ignore tags indicating pl=3.
When an ASBR advertising an OSPF route to external BGP neighbors learns that the route has become unreachable, the ASBR must immediately propagate this information to the external BGP neighbors.
When configured to export a network, the ASBR must advertise a network route for a subnetted network as long as at least one subnet in the subnetted network is reachable via OSPF.
Filter mechanisms for OSPF-to-BGP export must support per-network granularity and must support filtering based on the OSPF tag and its sub-fields (ArbitraryTag, AutonomousSystem, Completeness, PathLength).
OSPF cost and BGP INTER-AS METRIC are mapped during route redistribution. OSPF cost is a two-level metric while BGP INTER-AS METRIC is an optional non-transitive attribute; the default mapping sets INTER-AS METRIC=1.
The OSPF external route tag is a 32-bit field used to encode BGP ORIGIN and AS_PATH attributes when redistributing routes between OSPF and BGP. The Completeness (c) and PathLength (pl) sub-fields determine the resulting BGP ORIGIN (IGP, EGP, or INCOMPLETE) and AS_PATH.
The tag-to-BGP mapping table defines six automatic tag settings: c=0/pl=00 => O=EGP, P=<l>; c=0/pl=01 => O=EGP, P=<l,nh>; c=0/pl=10 => never export; c=1/pl=00 => O=IGP, P=<l>; c=1/pl=01 => O=IGP, P=<l,nh>; c=1/pl=10 => out of band via IBGP.
When importing a BGP route into OSPF, the ASBR must fill the OSPF Forwarding Address with the BGP NEXT_HOP attribute. When exporting an OSPF route to BGP, the ASBR must fill the BGP NEXT_HOP with the address of the actual next-hop router to avoid an extra hop at the AS boundary.
Security considerations are not discussed in this memo.
OSPF external route tag with Automatic bit=0: bit 0 is 'a' (set to 0), bits 1-31 are LocalInfo (31 bits) set to an arbitrary value manually configured by the network administrator.
OSPF external route tag with Automatic bit=1: bit 0 is 'a' (Automatic, 1 bit), bit 1 is 'c' (Completeness, 1 bit), bits 2-3 are 'pl' (PathLength, 2 bits), bits 4-15 are ArbitraryTag (12 bits), bits 16-31 are AutonomousSystem (16 bits).