IPv4 redistribute connected gotcha

In Cisco IOS, when you are redistributing between routing protocols, redistribution is not transitive, with connected networks of the source protocol being excepted.  However, if you explicitly redistribute connected, then the exception is removed and all connected networks must be explicitly redistributed.  It can be a bit confusing, hence the reason to break it down and write about it.

Let’s set up an example and observe the behavior.

We’ll make R1 a border router between RIP and OSPF.  R2 will be an OSPF router.

topo.jpg

red1.jpg

R2’s routing table:  r2.png

Now, let’s redistribute R1’s loopback into OSPF and see what happens:

red2.jpg

connected.png

The loopback is advertised, but the 11.11.11.0/24 network has been withdrawn.

Let’s redistribute our loopback into RIP instead

red3.jpg

Now we got nothin’:

red.connected.png

To break it down, there’s two things happening here:

  1. Redistribution is not transitive.
    1. i.e. protocol 1->protocol 2->protocol 3
      1. Protocol 3 will not get protocol 1’s routes
        1. connected counts as a protocol*
  2. The above rule is bent for connected when not explicitly redistributed
    1. The moment we redistribute connected into the protocol the transitive property is instated for connected routes.  This includes links the are covered by the source protocol.  I.e. the interface running RIP is considered to belong to connected before it belongs to RIP

Any time you’re asked  to redistribute connected into a border router, be mindful to pick up any additional interfaces that need to be seen by the destination routing protocol in your route map.

red4.png

red5.png