RFC 1364

BGP OSPF Interaction

πŸ“… published September 1992, from ietf

RFC 1364: BGP OSPF Interaction ✨

Okay bestie, here's the header tea πŸ«–πŸ’… This is RFC 1364, titled "BGP OSPF Interaction." It was written by K. Varadhan at OARnet and dated September 1992, and it's part of the Network Working Group. The header doesn't list anything it obsoletes or updates, so no drama there πŸ™ˆ


Status of This Memo πŸ“œ

This RFC specifies an IAB standards track protocol for the Internet community, and it's basically begging everyone to discuss it and suggest improvements πŸ’œ For the standardization state and status of this protocol, check the current edition of the "IAB Official Protocol Standards." The memo can be distributed without limits 🌈

Abstract πŸ¦‹

This memo lays out the criteria you need when designing Autonomous System Border Routers (ASBR). These are the routers that run BGP with other ASBRs outside the AS, and they use OSPF as their IGP 🧚

Table of Contents πŸ“‘

   1.  Introduction .................................................  2
   2.  Route Exchange ...............................................  2
   2.1.  Exporting OSPF routes into BGP .............................  3
   2.2.  Importing BGP routes into OSPF .............................  4
   3.  BGP Identifier and OSPF router ID ............................  5
   4.  Setting OSPF tags, BGP ORIGIN and AS_PATH attributes .........  5
   4.1.  Semantics of the characteristics bits ......................  7
   4.2.  Configuration parameters for setting the OSPF tag ..........  8
   4.3.  Manually configured tags ...................................  9
   4.4.  Automatically generated tags ................................ 9
   4.4.1.  Routes with incomplete path information, pl = 0 ........... 9
   4.4.2.  Routes with incomplete path information, pl = 1 ........... 9
   4.4.3.  Routes with incomplete path information, pl >= 1 ..........10
   4.4.4.  Routes with complete path information, pl = 0 .............10
   4.4.5.  Routes with complete path information, pl = 1 .............11
   4.4.6.  Routes with complete path information, pl >= 1 ............11
   4.5.  Miscellaneous tag settings ..................................12
   4.6.  Summary of the TagType field setting ........................12
   5.  Setting OSPF Forwarding Address and BGP NEXT_HOP attribute ....12
   6.  Security Considerations .......................................13
   7.  Acknowledgements ..............................................13
   8.  Bibliography ..................................................14
   9.  Author's Address ..............................................14

1. Introduction πŸŽ€

This document defines the criteria you use when designing Autonomous System Border Routers (ASBR) that run BGP [RFC1267] with other ASBRs outside the AS, and that use OSPF [RFC1247] as their IGP πŸ’–

It also spells out how these fields in OSPF and attributes in BGP get set when an ASBR connects BGP and OSPF:

      OSPF cost and type      vs. BGP INTER-AS METRIC
      OSPF tag                vs. BGP ORIGIN and AS_PATH
      OSPF Forwarding Address vs. BGP NEXT_HOP

If you want the bigger picture on routing and route exchange problems, go read [ROUTE-LEAKING] and [NEXT-HOP] by Philip Almquist πŸ“šβœ¨

This document uses two terms, "Autonomous System" and "Routing Domain," so let's get them straight 🫢 The first one matches the BGP-3 RFC [RFC1267], which says:

"The use of the term Autonomous System here stresses the fact that, even when multiple IGPs and metrics are used, the administration of an AS appears to other ASs to have a single coherent interior routing plan and presents a consistent picture of what networks are reachable through it. From the standpoint of exterior routing, an AS can be viewed as monolithic: reachability to networks directly connected to the AS must be equivalent from all border gateways of the AS."

"Routing Domain" first showed up in [ROUTE-LEAKING], and it's defined like this:

"A Routing Domain is a collection of routers which coordinate their routing knowledge using a single (instance of) a routing protocol."

2. Route Exchange πŸ”

This section covers the constraints that MUST be met when you swap routes between an external BGP session with a peer from another AS and the internal OSPF routes πŸ’…

BGP doesn't carry subnet info in routing updates πŸ™ˆ So when we talk about a subnetted network in the OSPF routing domain, we look at the equivalent network route from the BGP side.

Multiple subnet routes for one subnetted network in OSPF get squished into a single network route when they're exported into BGP 🌸

2.1. Exporting OSPF routes into BGP πŸš€

  1. The administrator MUST be able to selectively export routes into BGP using an appropriate filter mechanism.

This filter mechanism MUST support that control at the granularity of a single network 🎯

The administrator also MUST be able to filter based on the OSPF tag and its various sub-fields. The settings for the tag and sub-fields are covered in section 4 in more detail.

  • By default, no routes MUST be exported from OSPF into BGP. One single mechanism MUST permit all OSPF inter-area and intra-area routes to be exported into BGP.

OSPF external routes of type 1 and type 2 MUST never be exported into BGP unless they're explicitly configured. Not them, not unless you say so πŸ™…β€β™€οΈ

  1. When the ASBR is configured to export a network, it MUST advertise a network route for a subnetted network, as long as at least one subnet in that subnetted network is reachable via OSPF 🌈
  2. The network administrator MUST be able to statically configure the BGP attribute INTER-AS METRIC for any network route ⭐
    • By default, the INTER_AS METRIC MUST default to 1.

Explanatory text: The OSPF cost and the BGP INTER-AS METRIC are different widths. The OSPF cost is a two level metric, while the BGP INTER-AS METRIC is only an optional non-transitive attribute. So a more complex BGP INTER-AS METRIC-OSPF cost mapping scheme isn't necessary, and honestly that's a relief πŸ’œ

  1. When an ASBR is advertising an OSPF route to network Y to external BGP neighbours and learns that the route has become unreachable, the ASBR MUST immediately propagate this information to the external BGP neighbours πŸ’€
  2. An implementation of BGP and OSPF on an ASBR MUST have a mechanism to set up a minimum amount of time that MUST elapse between learning a new route via OSPF and the later advertisement of that route via BGP to the external neighbours ⏳
    • The default value for this setting MUST be 0, which means the route gets advertised to the neighbour BGP peers instantly ⚑

Heads up: [RFC1267] mandates a mechanism to dampen the inbound advertisements from adjacent neighbours 🫧

2.2. Importing BGP routes into OSPF πŸ¦‹

  1. BGP implementations SHOULD allow an AS to control announcements of BGP-learned routes into OSPF. Implementations SHOULD support that control at the granularity of a single network. Implementations SHOULD also support that control at the granularity of an autonomous system, where the autonomous system can be either the one that originated the route or the one that advertised the route to the local system (the adjacent autonomous system) 🧠
    • By default, no routes MUST be imported from BGP into OSPF. Administrators MUST configure every route they want to import πŸ™Œ

A mechanism MAY allow an administrator to configure an ASBR to import all the BGP routes into the OSPF routing domain.

  1. The administrator MUST be able to configure the OSPF cost and the OSPF metric type of every route imported into OSPF πŸŽ€
    • The OSPF cost MUST default to 1, and the OSPF metric type MUST default to type 2 ✨
  2. Routes learned via IBGP MUST NOT be imported into OSPF 🚫
  3. The ASBR MUST never generate a default route into the OSPF routing domain unless it's explicitly configured to do so πŸ™…β€β™€οΈ

One possible criterion for generating a default into an IGP is to let the administrator specify a set of (network route, AS_PATH, default route cost, default route type) tuples. If the ASBR learns the network route for an element of the set, with the matching AS_PATH, then it generates a default route into the OSPF routing domain, with cost "default route cost" and type "default route type." The lowest cost default route then gets injected into the OSPF routing domain πŸ’…

This is the RECOMMENDED method for originating default routes in the OSPF routing domain 🌟

3. BGP Identifier and OSPF router ID πŸ†”

The BGP identifier MUST be the same as the OSPF router id at all times that the router is up 🫢

This characteristic is REQUIRED for two reasons, and both of them are lowkey important πŸ‘‘

i. Picture three routers, RT1, RT2, and RT3, all in the same autonomous system:

                            +-----+
                            | RT3 |
                            +-----+
                               |

                Autonomous System running OSPF

                        /             \
                    +-----+          +-----+
                    | RT1 |          | RT2 |
                    +-----+          +-----+

Both RT1 and RT2 have routes to an external network X and import it into the OSPF routing domain. RT3 advertises the route to network X to other external BGP speakers. RT3 MUST use the OSPF router ID to figure out whether it's using RT1 or RT2 to forward packets to network X, and that's how it builds the correct AS_PATH to advertise to other external speakers πŸ§šβ€β™€οΈ

More precisely, RT3 MUST use the AS_PATH of the route announced by the ASBR whose BGP Identifier is the same as the OSPF routerID corresponding to its route for network X πŸ”₯

ii. It's also convenient for the network administrator looking at an ASBR to match up different BGP and OSPF routes based on the identifier πŸ“

4. Setting OSPF tags, BGP ORIGIN and AS_PATH attributes πŸŽ€

okay so the OSPF external route tag is this 32-bit field stuck onto every external route πŸ’… and the spec literally says it "may be used to communicate information between AS boundary routers; the precise nature of such information is outside the scope of [the] specification." [RFC1247] πŸ¦‹

OSPF pulls info in from different routing protocols at all its ASBRs 🌍 and sometimes you can run protocols other than EGP or BGP between autonomous systems too. The big thing to get right in BGP is telling apart routes that are external to the OSPF routing domain but still internal to the AS, vs routes that are external to the AS itself. Not the same vibe at all πŸ‘‘

Routes that are internal to the AS (and may or may not be external to the OSPF domain) won't reach the various BGP speakers via IBGP 😭 so ASBRs running BGP MUST have knowledge of this class of routes, so they can advertise them to the various external ASes without waiting for IBGP updates about them 🫢

Also, if an AS is mixing routers running EGP and BGP as external gateway protocols and using OSPF as the IGP, the network admin doesn't have to configure IBGP on every ASBR that runs EGP and not BGP, as long as this info can be carried in the OSPF tag field ✨ no extra IBGP drama needed, iykyk πŸ™ˆ

We use the external route tag field in OSPF to smartly set the ORIGIN and AS_PATH attributes in BGP πŸ”₯ both of those are well-known, mandatory attributes in BGP, so they matter a lot. The exact mechanism for setting the tags is defined below 🧚

The tag gets split into sub-fields, and each one describes a characteristic of the route that got imported into the OSPF routing domain πŸ“ when the high bit (the "Automatic" bit) is set to 1, the following sub-fields apply:

       0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |a|c|p l|     ArbitraryTag      |       AutonomousSystem        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  • a is 1 bit, the Automatic bit. It means the Completeness and PathLength bits were generated automatically by a router. What that means and how it gets set is covered below 🌸
  • c is 1 bit of Completeness info, also explained below πŸ’–
  • pl is 2 bits of PathLength info, and again, the meaning and setting are below πŸ’œ
  • ArbitraryTag (or at) is 12 bits of tag info. It defaults to 0 but can be configured to anything else πŸŽ€
  • AutonomousSystem (or as) is 16 bits holding the AS number for the route. It's 0 if the route is supposed to count as part of the local AS πŸ‘‘

When the Automatic bit is set to 0, the following sub-fields apply instead:

       0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |a|                          LocalInfo                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  • a is 1 bit, the Automatic bit, and in this case it's set to 0 🌈
  • LocalInfo (or li) is 31 bits of an arbitrary value that the network administrator configures by hand πŸ› οΈ

The format of the tag for the different values of the characteristics bits is defined below πŸ’…

4.1. Semantics of the characteristics bits

The Completeness and PathLength characteristics bits describe the route that got imported into OSPF from other ASBRs in the autonomous system πŸ¦‹ whatever gets set here is then used to set the ORIGIN and NEXT_HOP attributes when the route is re-exported to an external BGP speaker ✨

  • The "a" bit, the Automatic characteristic bit, is set when a border router automatically sets the Completeness and PathLength characteristics bits πŸ€– For backward compatibility, the Automatic bit MUST default to 0, and the network administrator MUST have a mechanism to enable automatic tag generation. Nothing MUST be inferred about the characteristics of the OSPF route from the tag bits unless the tag was automatically generated πŸ™ˆ
  • The "c" bit, the Completeness characteristic bit, is set when the source of the incoming route is known precisely. For instance, that's an IGP inside the local autonomous system, or an EGP at one of the autonomous system's boundaries πŸŽ€ It refers to the status of the path information carried by the routing protocol πŸ’–
  • The "pl" sub-field, the PathLength characteristic, is set based on the length of the AS_PATH the protocol could have carried when importing the route into the OSPF routing domain πŸ’œ The length bits show whether the AS_PATH attribute length is zero, one, or greater than one πŸ“

Routes imported from an IGP usually have an AS_PATH of length of 0 🌸 routes imported from an EGP have an AS_PATH of length 1 🌷 and BGP, plus any routing protocols that support complete path information (either as AS_PATHs or routing domain paths), will indicate a path greater than 1 ⭐

The OSPF tag isn't wide enough to carry path information for routes with a PathLength greater than one 😭 so that path info has to be carried via IBGP instead. Such routes MUST NOT be exported from OSPF into BGP 🚫

For brevity in the sections that follow, the keywords O and P refer to the BGP ORIGIN and AS_PATH attributes respectively 🧚 and we use the abbreviations "l" and "nh" for the local_AS and next_hop_AS respectively πŸ’œ

4.2. Configuration parameters for setting the OSPF tag

  • There MUST be a mechanism to enable automatic generation of the tag characteristic bits πŸ”₯
  • Configuration of an ASBR running OSPF MUST include the capability to associate a tag value, for the ArbitraryTag or LocalInfo sub-field of the OSPF tag, with each instance of a routing protocol πŸŽ€
  • Configuration of an ASBR running OSPF MUST include the capability to associate an AS number with each instance of a routing protocol πŸ‘‘

Associating an AS number with an instance of an IGP is basically the same as flagging that set of routes imported from the IGP as external routes outside the local autonomous system 🫢

Specifically, when the IGP is RIP [RFC1058], it SHOULD be possible to associate a tag and/or an AS number with every interface running RIP on the ASBR 🌈

4.3. Manually configured tags

    0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|                          LocalInfo                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This tag setting is what you get when the administrator sets the tag bits by hand πŸ“ Nothing SHALL be inferred about the characteristics of the route that has this tag setting πŸ™…β€β™€οΈ

For backward compatibility with the existing OSPF implementations that are already deployed out in the field, this MUST be the default setting for importing routes into the OSPF routing domain 🌸 There MUST be a mechanism to enable automatic tag generation for imported routes too πŸ’–

The OSPF tag to BGP attribute mappings for these routes MUST be:

a=0, li=Arbitrary_Value  =>  O=<INCOMPLETE>, P=<l>

4.4. Automatically generated tags 🧚

4.4.1. Routes with incomplete path information, pl = 0. 🌸

Okay so this is the first auto-tag, and it's giving mysterious. πŸ¦‹ These are routes imported from routing protocols with incomplete path information. They cannot or may not carry the neighbour AS or AS path as part of the routing information, so the tag has to cover that gap 😭

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|0|0|0|     ArbitraryTag      |       AutonomousSystem        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The OSPF tag to BGP attribute mappings for these routes MUST be:

a=1,c=0,pl=00,as=0 => O=<EGP>, P=<l>

4.4.2. Routes with incomplete path information, pl = 1. πŸ’–

Same vibe as before, but this time the neighbour AS rides along in the routing information πŸŽ€

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|0|0|1|     ArbitraryTag      |       AutonomousSystem        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

These are routes imported from routing protocols with incomplete path information, and they carry the neighbour AS as part of the routing information.

The OSPF tag to BGP attribute mappings for these routes MUST be:

a=1,c=0,pl=01,as=nh => O=<EGP>, P=<l, nh>

This setting SHOULD be used for importing EGP routes into the OSPF routing domain. It can also be used when importing BGP routes whose origin=<EGP> and AS_PATH=<nh>. If the BGP learned route has no other transitive attributes, then its propagation via IBGP can be suppressed. ✨

4.4.3. Routes with incomplete path information, pl >= 1. πŸ“

Now we're in the truncated-path zone πŸ’€

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|0|1|0|     ArbitraryTag      |       AutonomousSystem        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

These are routes imported from routing protocols with truncated path information.

The OSPF tag to BGP attribute mappings for these routes MUST be:

a=1,c=0,pl=10,as=don't care

These are imported by a border router, which is running BGP to a stub domain, and not running IBGP to other ASBRs. That causes a truncation of the AS_PATH. These routes MUST NOT be re-exported into BGP at another ASBR. πŸš«πŸ’…

4.4.4. Routes with complete path information, pl = 0. πŸ‘‘

Complete path info, no drama ✨

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|1|0|0|     ArbitraryTag      |       AutonomousSystem        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

These are routes imported from routing protocols with either complete path information, or routes known to be complete through means other than what the routing protocol carries.

The OSPF tag to BGP attribute mappings for these routes MUST be:

a=1,c=1,pl=00,as=0 => O=<IGP>, P=<l>

This SHOULD be used for importing routes into OSPF from an IGP. 🌈

4.4.5. Routes with complete path information, pl = 1. πŸ¦‹

Complete path, plus the neighbour AS is on the table too 🫢

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|1|0|1|     ArbitraryTag      |       AutonomousSystem        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

These are routes imported from routing protocols with either complete path information, or routes known to be complete through means other than the routing protocol. The routing protocol also has additional information about the neighbour AS of the route.

The OSPF tag to BGP attribute mappings for these routes MUST be:

a=1,c=1,pl=01,as=nh => O=<IGP>, P=<l, nh>

This setting SHOULD be used when the administrator explicitly associates an AS number with an instance of an IGP. It can also be used when importing BGP routes whose origin=<IGP> and AS_PATH=<nh>. If the BGP learned route has no other transitive attributes, then its propagation via IBGP can be suppressed. πŸ”₯

4.4.6. Routes with complete path information, pl >= 1. πŸ§šβ€β™€οΈ

The tag here is pure main character energy πŸ‘‘

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|1|1|0|     ArbitraryTag      |       AutonomousSystem        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

These are routes imported from routing protocols with complete path information, and they carry the AS path information as part of the routing information.

The OSPF tag MUST be set to:

a=1,c=1,pl=10,as=don't care

These routes MUST NOT be exported into BGP, because they are already imported from BGP into the OSPF RD. So it's assumed that the BGP speaker will convey this information to other BGP speakers via IBGP. 🀝

Note that an implementation MAY import BGP routes with a path length of 1 and no other transitive attributes directly into OSPF, and not send these routes via IBGP. In this situation, it MUST use tag settings corresponding to 4.1.2.2, or 4.1.2.5. πŸ’…

4.5. Miscellaneous tag settings πŸŽ€

 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|x|1|1|              Reserved  for  future  use               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The value of pl = 3 is reserved during automatic tag generation. Routers MUST NOT generate such a tag when importing routes into the OSPF routing domain. ASBRs MUST ignore tags which indicate a pl = 3. πŸ™ˆ


4.6. Summary of the tag sub-field setting πŸ“Š

The following table summarises the various combinations of automatic tag settings for the Completeness and PathLength sub-field of the OSPF tag, plus the default behaviour permitted for each setting. Here's the cheat sheet πŸ’–

      Completeness := 0 | 1 ;
      PathLength := 00 | 01 | 10 | 11;
      ORIGIN := <INCOMPLETE> | <IGP> | <EGP>;

               AS_PATH := valid AS path settings as defined in BGP.

           pl = 00       pl = 01            pl = 10        pl = 11
       +----------------------------------------------------------------
       |
c = 0  |    <EGP><l>    <EGP><l,nh>       never export       reserved
c = 1  |    <IGP><l>    <IGP><l,nh>       out of band        reserved
       |

The "out of band" in the table above implies that OSPF will not be able to carry everything that BGP needs in its routing information. Therefore, some other means MUST be found to carry this information. In BGP, this is done via IBGP. 🫠


5. Setting OSPF Forwarding Address and BGP NEXT_HOP attribute πŸ¦‹

Forwarding addresses exist to avoid extra hops between multiple routers that share a common network and speak different routing protocols with each other. πŸ›£οΈ

Both BGP and OSPF have equivalents of forwarding addresses. In BGP, the NEXT_HOP attribute is a well-known, mandatory attribute. OSPF has a Forwarding address field. We'll go through how these get filled in across different situations 🧠

Consider the 4 router situation below πŸ‘€

        +-----+                 +-----+
        | RT1 |                 | RT2 |
        +-----+                 +-----+
           |                       |            common network
        ---+-----------------------+--------------------------
            <BGP> |                       |
               +-----+     <OSPF>      +-----+
               | RT3 |                 | RT4 |
               +-----+                 +-----+

RT1 and RT2 are in one autonomous system, and RT3 and RT4 are in another. RT1 and RT3 are talking BGP with each other. RT3 and RT4 are talking OSPF with each other. ✨

  • Importing network X to OSPF: Consider an external network X, learnt via BGP from RT1. RT3 MUST always fill the OSPF Forwarding Address with the BGP NEXT_HOP attribute for the route to network X. πŸ’…
  • Exporting network Y to BGP: Consider a network Y, internal to the OSPF routing domain. RT3's route to network Y is via RT4, and network Y is to be exported via BGP to RT1. If network Y is not a subnetted network, RT3 MUST fill the NEXT_HOP attribute for network Y with the address of RT4. This avoids requiring packets to take an extra hop through RT3 when traversing the AS boundary. It's similar to the concept of indirect neighbour support in EGP [RFC888, RFC827]. πŸŽ€

6. Security Considerations 🚨

Security considerations are not discussed in this memo. πŸ’€

7. Acknowledgements 🫢

Bestie thank you, thank you πŸ’– I'd like to thank Yakov Rekhter, Jeff Honig, John Moy, Tony Li, and Dennis Ferguson for their help and suggestions in writing this document, without which I could not have written this document. I'd also like to thank them for giving me the opportunity to write this document, and for putting up with my muddlements through the various phases of it. 😭

I'd also like to thank the countless number of people from the OSPF and BGP working groups who offered numerous suggestions and comments on the different stages of this document. You all ate πŸ‘‘


8. Bibliography πŸ“š

Here are all the references, exactly as written 🧚

   [RFC827]  Rosen, E., "Exterior Gateway Protocol (EGP)", RFC 827,
             BBN, October 1982.

   [RFC888]  Seamonson, L., and E. Rosen, "STUB Exterior Gateway
             Protocol", RFC 888, BBN, January 1984.

   [RFC1058]  Hedrick, C., "Routing Information Protocol", RFC 1058,
              Rutgers University, June 1988.

   [RFC1267]  Lougheed, K., and Y. Rekhter, "A Border Gateway
              Protocol 3 (BGP-3)", RFC 1267, cisco Systems,
              T.J. Watson Research Center, IBM Corp., October 1991.

   [RFC1268]  Rekhter, Y., and P. Gross, Editors, "Application of the
              Border Gateway Protocol in the Internet", RFC 1268,
              T.J. Watson Research Center, IBM Corp., ANS, October 1991.

   [RFC1247]  Moy, J., "The OSPF Specification - Version 2:", RFC 1247,
              Proteon, January 1991.

   [ROUTE-LEAKING]  Almquist, P., "Ruminations on Route Leaking",
                    Work in Progress.

   [NEXT-HOP]  Almquist, P., "Ruminations on the Next Hop",
               Work in Progress.

9. Author's Address 🌸

   Kannan Varadhan
   Internet Engineer, OARnet
   1224 Kinnear Road
   Columbus, OH 43212-1136

   EMail: kannan@oar.net

That's a wrap, bestie!! πŸŒˆβœ¨πŸ’–

πŸ“¦ where this page comes from