TSHOOT – Redistribution Part 3 – OSPF, OSPFv3, and BGP Redistribution review and troubleshooting!

BGP_MED_Top

I will wrap this up with a look at OSPF and BGP Redistribution, above is a Topology I labbed during ROUTE studies of the BGP MED concept, this is to demonstrate visually the difference of iBGP vs eBGP being the AS that BGP Routers reside in.

Troubleshooting Redistribution into OSPF and OSPFv3

OSPF is very different from both RIP and EIGRP in how it does Redistribution, as its default “Seed Metric” is 20, so there is no need to manually set the Seed Metric for routes Redistributed into OSPF Domains, though there are some extra options for OSPF as well.

OSPF has a few unique modifiers to the “redistribute  …” command as shown here:

  • metric – This changes the default Metric of 20 to whatever value is defined
  • metric-type – To manually all Redistributed Routes to use either Metric-Type E1 or E2, the differences explained below in more detail
  • nssa-only – Only redistribute routes into NSSA Area(s)
  • route-map – Use Route-Map for redistribution parameters
  • subnets – Redistribute subnetworks of major networks in the IP Route Table
  • tag – Assign tag value to Routes being Redistributed into OSPF, usually tagging is done via Route-Map to prevent 2-way redistribution from advertisi

The Metric is used to change the default Seed Metric of 20 to another value.

The Metric-Type configures routes to either be type E1 or E2, E2 being the default which will set a static Seed Metric of 20 anywhere in the OSPF Domain, whereas E1 routes will be Redistributed into OSPF with a Seed Metric starting at 20, and be incremented as it moves hops away from the ABR / Boundary Router.

The NSSA-Only option will only Redistribute routes into an NSSA OSPF Area, the IP Route Table codes for these routes will be N1 and N2 rather than E1 and E2 routes.

The Route-Map of course will reference a Route-Map to perform Redistribution Manipulation such as Route-Tagging to filter or manipulate certain routes, change Metric Types for certain routes, and all things that can be performed via Route-Maps.

The Subnets option will simply tell the router to Redistribute classless networks as well as major classful networks from the IP Route table, its odd to me this isn’t a default behavior with Redistribution, but if your not seeing classless subnets being redistributed into your OSPF Domain this modifier may be missing!

The Tag option will assign a value to ALL routes being Redistributed into the OSPF Domain, so that filtering or manipulation can be later performed, this is usually done in Route-Maps in my experience as Route-Tagging is not an option for other protocols to keep a consistency in the configuration between them, but it is an option here as well.

Note that for OSPFv3 (IPv6), it also has the “include-connected” modifier the same as every other IPv6 flavor of other routing protocols.

An OSPF Router performing Redistribution is known as an ASBR or “Autonomous System Boundary Router” not to be confused with an ABR “Area Boarder Router” which simply knows and shares OSPF routes between different OSPF Areas (no Redistribution needed).

There are a few ways to verify which routes are being Redistributed into OSPF:

  • “sh (ip/ipv6) proto” – This will show Redistributed protocols and modifiers such as “subnets” / “metric” / “tag” / “include-connected” / Etc in the output
  • “sh (ip/ipv6) ospf database” – This will show all Redistributed Routes as Type 5 LSA’s (External Link States) for regular OSPF Areas, and Type 7 LSA’s  NSSA Areas
  • “sh (ip/ipv6) route (x.x.x.x)” – To view both the IP Route Table to verify if the IP Route Table reflects what is seen as Type-5 LSA’s in the LSDB, and to verify the source that the Route was learned from to investigate the source if needed

As with the other Dynamic Routing Protocols, IPv6 acts no differently with Redistribution outside of the “include-connected” modifier, outside of the usual tweaks necessary for IPv6 to operate how it operates.

Troubleshooting Redistribution into BGP, and BGP into other Protocols!

BGP being a very unique protocol, has a lot of complex and niche behaviors with Redistribution that I will go through bullet point style, to make them as clear and concise as possible to write to memory!

VERY IMPORTANT BGP REDISTRIBUTION BEHAVIORS TO KNOW(!) :

  • By default BGP will only Redistribute its External (eBGP) routes into RIP / EIGRP / OSPF Routing domains, must configure “bgp redistribute-internal” to also Redistribute Internal (iBGP) routes
  • OSPF will only redistribute Internal routes into BGP by default, to Redistribute any other routes it must be defined during Redistribution with “redistribute ospf # match (internal/external/nssa-external)” which any or all area types can be used
  • The “metric” modifier is available when Redistributing into BGP, however BGP will use the IGP’s metric as the Seed Metric, so it is not required for Redistribution

These quirks are very important to know, because outside of these BGP actually mimics the protocol being Redistributed into it pretty close, as Distance Vector protocols (RIP and EIGRP) will give the same options for Redistribution as if you were doing Redistribution into those Routing Domain types and OSPF is almost the same outside of the one quirk with the Internal-Only Redistribution of OSPF routes unless specified.

To clarify iBGP from eBGP, Internal BGP (iBGP) are routes that are within the same Autonomous System #, where External BGP (eBGP) are routes learned from different Autonomous System #’s (also referred to as AS’s like EIGRP).

The following Topology from my ROUTE labbing MED illustrates iBGP vs eBGP:

BGP_MED_Top

I would not rely on a Topology to give you accurate information on exam day or in the real world!

“sh run | sec router bgp” will show the exact BGP configuration on the router in terms of local “router bgp #” and “neighbor x.x.x.x remote-as #” to really determine the exact configurations on each router, however you can get essentially the same information with “sh (ip/ipv6) proto” in terms of AS # / Neighbor IP / Redistribution configuration (protocols / modifiers used / route-maps) so both commands are useful.

Of course with Dynamic Routing Redistribution you want to attack troubleshooting and verification with all the commands at your disposal:

  • “sh (ip/ipv6) proto” – BGP protocol information
  • “sh run | sec router bgp” –  BGP router configuration
  • sh (ip/ipv6) route (x.x.x.x)” – Shows how / where a route was learned from
  • “sh bgp all” – For BGP Address-Family mode, will show BGP neighbor and route information for both IPv4 and IPv6 Address-Families similar to “sh ip bgp”
  • “sh (ip/ipv6) bgp” – Shows BGP Neighbor / Route information and metrics
  • “sh (ip/ipv6) bgp nei” – Shows current neighbors / adjacencies and statistics
  • “sh route-map” – Shows Route-Map information if applied to Redistribution, verify if in redistribution with either “sh ip proto” or “sh run” output

In terms of redistribution there really is not too much with BGP, but there are some quirks that are not intuitive, that if you do not flat out know them you could miss out why some routes are not showing.

That is about it for Redistributing into Dynamic Routing Protocols

I still have to cover Route-Map review and troubleshooting, however I have yet to cover that material fully enough to write an article on it, and I am going to give myself the rest of the night off to defrag the brain!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s