⊹ 4. CCIE Redistribution ⊹

Redistribution

Redistribution

Redistribution is always import feature, when redistribution is configured under a routing protocol it is importing prefixes from the protocol mentioned in redistribute “xxx” command
Only routes that are selected as best paths and installed in the global routing table (RIB) are eligible for redistribution from source protocol, this stops from redistribution of backup paths or longer routes into the protocol, because you dont want EIGRP’s feasible successors (NOT in RIB) but only successor (installed in RIB) similarly OSPF may know multiple paths but you only want the best path (shortest path) from OSPF

A route must exist in the RIB in order for it to be redistributed into the destination protocol. In essence, this provides a safety mechanism by ensuring that the route is deemed reachable by the redistributing router.

OSPF from RIB is mentioned in the path information

show ip route
O       10.13.1.0/24 [110/3] via 10.45.1.4, 00:04:27, GigabitEthernet0/0

show ip eigrp topology 10.13.1.0/24
! Output omitted for brevity
EIGRP-IPv4 Topology Entry for AS(100)/ID(10.56.1.5) for 10.13.1.0/24
   State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560000256
   Descriptor Blocks:
   10.45.1.4, from Redistributed, Send flag is 0x0
       External data:
        AS number of route is 1
        External protocol is OSPF, external metric is 3

When redistributing from a source protocol with a higher AD into a destination protocol with a lower AD, the route shown in the routing table is always that of the source protocol, its not like that now a route is redistributed in protocol of lower AD and ownership has transferred

Using a route map allows for the filtering or modification of route attributes during the injection (catch and change)

Redistribution Sources:

Static – Static routes that are present in RIB

Connected – Interfaces that are in up state only

EIGRP – Any routes in EIGRP, including EIGRP-enabled connected networks.

OSPF – Any routes in the OSPF link-state database (LSDB), including OSPF-enabled interfaces.

BGP – Any routes in the Border Gateway Protocol (BGP) Loc-RIB table learned externally. Internal BGP (iBGP) routes are not redistributed by default and require the command bgp redistribute-internal for redistribution into Interior Gateway Protocol (IGP) routing protocols.

Redistribution Is Not Transitive

When redistributing between two or more routing protocols on a single router, redistribution is not transitive. In other words, when a router redistributes protocol 1 into protocol 2, and protocol 2 redistributes into protocol 3, the routes from protocol 1 are not redistributed into protocol 3. Only routes from protocol 2 are injected into protocol 3 and not include protocol 1

Seed Metrics

Seed means default metric to start with, source protocol must provide some metrics to the destination protocols so that the destination protocol can calculate the best path for the redistributed routes, Every protocol provides a seed metric at the time of redistribution, following are the seed metric offered by protocols

ProtocolDefault Seed Metric
EIGRPInfinity. Routes set with infinity are not installed into the EIGRP topology table.
OSPFAll routes are Type 2 external. Routes sourced from BGP use a seed metric of 1, and all other protocols uses a seed metric of 20.
BGPOrigin is set to incomplete, the multi-exit discriminator (MED) is set to the IGP metric, and the weight is set to 32,768.

Protocol specific redistribution behavior

Every routing protocol has a unique redistribution behavior.

redistribute connected 
redistribute static
redistribute eigrp as-number
redistribute ospf process-id 
redistribute ospf process-id match internal  << this is match without Route map
redistribute ospf process-id match external 1 << this is match without Route map
redistribute ospf process-id match external 2 << this is match without Route map
redistribute bgp as-number 
redistribute xxx route-map route-map-name

Route map “match” options

Redistribute connected route-map RM -> match interface Gixxxx

matching interface in route map applied to redistribute “connected”

router ospf 1
redistribute connected route-map RM
!
route-map RM permit 10
 match interface GigabitEthernet0/1
!
interface GigabitEthernet0/1
 ip address 10.1.1.1 255.255.255.0

Matches 10.1.1.0/24
interface on which the connected network exists

It makes sense that when connected are being considered then matching interface will introduce only interfaces in route map – this when we only selectively want to introduce few router interfaces and not all router interface because redistribute connected imports all connected interfaces on routers

redistribute static route-map RM -> match interface Gixxxx

matching interface in route-map applied on redistribute “static”

ip route 10.2.2.0 255.255.255.0 GigabitEthernet0/2

match interface matches:
The outgoing interface defined in the static route

✔ This works only if the static route explicitly references an interface ❌ It will NOT match if the static route points to a next-hop IP only – so this will never be used practically

Routes learned via a routing protocol (OSPF, EIGRP, RIP, etc.)
redistribute ospf route-map RM -> match interface Gixxxx

match interface matches:
Only routes learned from OSPF neighbor on that interface

match route-type external [type-1 | type-2]
match route-type internal
match route-type local
match route-type nssa-external [type-1 | type-2]

Selects prefixes based on routing protocol characteristics:
external: External BGP, EIGRP, or OSPF
internal: Internal EIGRP or intra-area/inter-area OSPF routes
local: Locally generated BGP routes
nssa-external: NSSA external (Type 7 LSAs)

Route map set actions

set ActionDescription
set as-path prepend {as-number-pattern | last-as 1-10}Prepends the AS_Path for the network prefix with the pattern specified or uses multiple iterations from the neighboring autonomous system.
set ip next-hop {ip-address | peer-address | self}Sets the next-hop IP address for any matching prefix. BGP dynamic manipulation requires the peer-address or self keywords.
set local-preference 0-4294967295Sets the BGP PA local preference.
set metric {+value | value | value}* value parameters are 0–4294967295Modifies the existing metric or sets the metric for a route.
set origin {igp | incomplete}Sets the BGP PA origin.
set weight 0-65535Sets the BGP PA weight.

Connected Networks

A common scenario in “service provider” networks involves the need for external Border Gateway Protocol (eBGP) peering or transit subnet to exist in the routing table of internal BGP (iBGP) routers within the autonomous system. Instead of enabling the IGP routing protocol on the external interface so that the network is installed into the routing topology, the networks could be redistributed into the Interior Gateway Protocol (IGP). Choosing not to enable a routing protocol on that link removes security concerns within the IGP.

router bgp 65100
 address-family ipv4
  redistribute connected route-map RM-LOOPBACK0
!
route-map RM-LOOPBACK0 permit 10
 match interface Loopback0

BGP

By default, BGP redistributes only eBGP routes into IGP protocols

BGP’s default behavior requires that a route have an AS_Path to redistribute into an IGP, which means only the eBGP routes are redistributed and not iBGP routes, iBGP routes were not included because it is common assumption that the IGP routing topology already has those internal ibgp like routes

BGP is designed to handle a large routing table, whereas IGPs are not. To redistribute BGP into an IGP on a router with a larger BGP table (for example, the Internet table with 800,000+ routes), you use selective route redistribution. Otherwise, the IGP can become unstable in the routing domain, which can lead to packet loss.

You can change BGP behavior so that all BGP routes are redistributed by using the BGP configuration command bgp redistribute-internal. To enable the iBGP route 192.168.3.3/32 to redistribute into OSPF, the bgp redistribute-internal command is required on R2.

Redistributing iBGP routes into an IGP could result in routing loops. A more logical solution is to advertise the network into the IGP

EIGRP Behaviour

When EIGRP redistributes something into itself, that route is given an AD of 170 and classed as external EIGRP route and use a default seed metric of infinity.

Default seed metric of infinity (effectively “unreachable”) (prevents the route from being installed unless you manually define a metric)

The default path metric can be changed from infinity to specific values for bandwidth, load, delay, reliability, and maximum transmission unit (MTU), thereby allowing for the installation into the EIGRP topology table. Routers can set the default metric with the address family configuration command

default-metric bandwidth delay reliability load mtu
!BDRLM

The metric can also be set within a route map or at the time of redistribution with the command 

redistribute source-protocol [metric bandwidth delay reliability load mtu] [route-map route-map-name]

EIGRP to EIGRP redistribution (EIGRP AS X into EIGRP AS Y):

EIGRP does carry over the original EIGRP metric components
(bandwidth, delay, reliability, load, MTU)

BUT EIGRP still treats them as external routes in the receiving AS

The routes become EIGRP external (D EX) with:

AD = 170
External tag
“Original metric preserved”

Example config:

R2 mutually redistributes OSPF into EIGRP
R3 mutually redistributes BGP into EIGRP
R1 is advertising the Loopback 0 address 192.168.1.1/32
R4 is advertising the Loopback 0 address 192.168.4.4/32

R2 uses the default-metric configuration command
both classic and named mode configurations

Using default-metric on whole process
R2 (AS Classic Configuration)
router eigrp 100
 default-metric 1000000 1 255 1 1500
 network 10.23.1.0 0.0.0.255
 redistribute ospf 1
R2 (Named Mode Configuration)
router eigrp EIGRP-NAMED
 address-family ipv4 unicast autonomous-system 100
  topology base
   default-metric 1000000 1 255 1 1500
   redistribute ospf 1
  exit-af-topology
  network 10.23.1.0 0.0.0.255
R3 (Named Mode Configuration)
router eigrp EIGRP-NAMED
address-family ipv4 unicast autonomous-system 100
  topology base
   redistribute bgp 65100 metric 1000000 1 255 1 1500
  exit-af-topology
  network 10.23.1.0 0.0.0.255
 exit-address-family
Using route-map

You can overwrite EIGRP seed metrics by setting K values also with the route map command set metric bandwidth delay reliability load mtu. Setting the metric on a prefix-by-prefix basis during redistribution

R2
router eigrp 100
 network 10.23.1.0 0.0.0.255
 redistribute ospf 1 route-map OSPF-2-EIGRP
!
route-map OSPF-2-EIGRP permit 10
 set metric 1000000 1 255 1 1500
R2# show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(100)/ID(192.168.2.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.34.1.0/24, 1 successors, FD is 3072
         via 10.23.1.3 (3072/2816), GigabitEthernet0/1
P 192.168.4.4/32, 1 successors, FD is 3072, tag is 65200
         via 10.23.1.3 (3072/2816), GigabitEthernet0/1
P 10.12.1.0/24, 1 successors, FD is 2816
         via Redistributed (2816/0)
P 192.168.1.1/32, 1 successors, FD is 2816
         via Redistributed (2816/0)
P 10.23.1.0/24, 1 successors, FD is 2816
         via Connected, GigabitEthernet0/1

The redistributed routes are shown in the routing table with D EX and an AD of 170

R2# show ip route | begin Gateway
! Output omitted for brevity
Gateway of last resort is not set
       10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C         10.12.1.0/24 is directly connected, GigabitEthernet0/0
C         10.23.1.0/24 is directly connected, GigabitEthernet0/1
D EX      10.34.1.0/24 [170/3072] via 10.23.1.3, 00:07:43, GigabitEthernet0/1
O         192.168.1.1 [110/2] via 10.12.1.1, 00:29:22, GigabitEthernet0/0
D EX      192.168.4.4 [170/3072] via 10.23.1.3, 00:08:49, GigabitEthernet0/1
R3# show ip route | begin Gateway
! Output omitted for brevity

D EX     10.12.1.0/24 [170/15360] via 10.23.1.2, 00:22:27, GigabitEthernet0/1
C        10.23.1.0/24 is directly connected, GigabitEthernet0/1
C        10.34.1.0/24 is directly connected, GigabitEthernet0/0
D EX     192.168.1.1 [170/15360] via 10.23.1.2, 00:22:27, GigabitEthernet0/1
B        192.168.4.4 [20/0] via 10.34.1.4, 00:13:21

EIGRP-to-EIGRP Redistribution

Redistributing routes between EIGRP autonomous systems preserves the path metrics during redistribution but still classes them as EIGRP external routes

R2 mutually redistributes routes between AS 10 and AS 20
R3 mutually redistributes routes between AS 20 and AS 30
R1 advertises the Loopback 0 interface (192.168.1.1/32) into EIGRP AS 10
R4 advertises the Loopback 0 interface (192.168.4.4/32) into EIGRP AS 30

The default seed metrics do not need to be set because they are maintained between EIGRP ASs
R2 is using classic configuration mode, and R3 is using EIGRP named configuration mode.

R2
router eigrp 10
 network 10.12.1.0 0.0.0.255
 redistribute eigrp 20
router eigrp 20
 network 10.23.1.0 0.0.0.255
 redistribute eigrp 10
R3
router eigrp EIGRP-NAMED-20
 address-family ipv4 unicast autonomous-system 20
  topology base
   redistribute eigrp 30
  exit-af-topology
  network 10.23.1.0 0.0.0.255
!
router eigrp EIGRP-NAMED-30
 address-family ipv4 unicast autonomous-system 30
  topology base
   redistribute eigrp 20
  exit-af-topology
  network 10.34.1.0 0.0.0.255
exit-address-family

Verification of redistribution on R1 and R4

R1# show ip route eigrp | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
D EX     10.23.1.0/24 [170/3072] via 10.12.1.2, 00:09:07, GigabitEthernet0/0
D EX     10.34.1.0/24 [170/3328] via 10.12.1.2, 00:05:48, GigabitEthernet0/0
      192.168.4.0/32 is subnetted, 1 subnets
D EX     192.168.4.4 [170/131328] via 10.12.1.2, 00:05:48, GigabitEthernet0/0
R4# show ip route eigrp | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
D EX     10.12.1.0/24 [170/3328] via 10.34.1.3, 00:07:31, GigabitEthernet0/0
D EX     10.23.1.0/24 [170/3072] via 10.34.1.3, 00:07:31, GigabitEthernet0/0
      192.168.1.0/32 is subnetted, 1 subnets
D EX     192.168.1.1 [170/131328] via 10.34.1.3, 00:07:31, GigabitEthernet0/0

EIGRP topology table for the route 192.168.4.4/32 in AS 10 and AS 20. The EIGRP path metrics for bandwidth, reliability, load, and delay are the same between the autonomous systems. Notice that the feasible distance (131,072) is the same for both autonomous systems, but the reported distance (RD) is 0 for AS 10 and 130,816 for AS 20. The RD was reset when it was redistributed into AS 10.

R2# show ip eigrp topology 192.168.4.4/32
! Output omitted for brevity
EIGRP-IPv4 Topology Entry for AS(10)/ID(192.168.2.2) for 192.168.4.4/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 131072
  Descriptor Blocks:
  10.23.1.3, from Redistributed, Send flag is 0x0
      Composite metric is (131072/0), route is External
      Vector metric:
        Minimum bandwidth is 1000000 Kbit
        Total delay is 5020 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
        Originating router is 192.168.2.2
      External data:
        AS number of route is 20
        External protocol is EIGRP, external metric is 131072
        Administrator tag is 0 (0x00000000)
EIGRP-IPv4 Topology Entry for AS(20)/ID(192.168.2.2) for 192.168.4.4/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 131072
  Descriptor Blocks:
  10.23.1.3 (GigabitEthernet0/1), from 10.23.1.3, Send flag is 0x0
      Composite metric is (131072/130816), route is External
      Vector metric:
        Minimum bandwidth is 1000000 Kbit
        Total delay is 5020 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
        Originating router is 192.168.3.3
      External data:
        AS number of route is 30
        External protocol is EIGRP, external metric is 2570240

OSPF Behaviour

The AD is set to 110 for intra-area, inter-area, and external OSPF routes. External OSPF routes are classified as Type 1 or Type 2, with Type 2 as the default setting. The seed metric is 1 for BGP-sourced routes and 20 for all other protocols

The exception is that if OSPF redistributes from another OSPF process, the path metric is transferred. The main differences between Type 1 and Type 2 external OSPF routes follow:

Type 1 routes are preferred over Type 2 routes.

The Type 1 metric equals the redistribution metric plus the total path metric to the autonomous system boundary router (ASBR). In other words, as the LSA propagates away from the originating ASBR, the metric increases.

The Type 2 metric equals only the redistribution metric. The metric is the same for the router next to the ASBR as for the router 30 hops away from the originating ASBR. If two Type 2 paths have exactly the same metric, the lower forwarding cost is preferred. This is the default external metric type used by OSPF.

For redistribution into OSPF, you use the command redistribute source-protocol [subnets] [metric metric] [metric-type {1 | 2}] [tag 0-4294967295] [route-map route-map-name].

If the optional subnets keyword is not included, only the classful networks are redistributed.

The optional tag keyword allows for a 32-bit route tag to be included on each redistributed route.

The metric and metric-type keywords can be set during redistribution.

R2 mutually redistributes EIGRP into OSPF
R3 mutually redistributes RIP into OSPF
R1 is advertising the Loopback 0 interface 192.168.1.1/32
R4 is advertising the Loopback 0 interface 192.168.4.4/32.

R2
router ospf 2
 router-id 192.168.2.2
 network 10.23.1.0 0.0.0.255 area 0
 redistribute eigrp 100 subnets
R3
router ospf 3
 router-id 192.168.3.3
 redistribute rip subnets
 network 10.23.1.3 0.0.0.0 area 0

Redistribution verification

R3# show ip ospf database external
! Output omitted for brevity

            OSPF Router with ID (192.168.3.3) (Process ID 2)
               Type-5 AS External Link States

  Link State ID: 10.12.1.0 (External Network Number )
  Advertising Router: 192.168.2.2
  Network Mask: /24
         Metric Type: 2 (Larger than any link state path)
         Metric: 20

  Link State ID: 10.34.1.0 (External Network Number )
  Advertising Router: 192.168.3.3
  Network Mask: /24
         Metric Type: 2 (Larger than any link state path)
         Metric: 20

  Link State ID: 192.168.1.1 (External Network Number )
  Advertising Router: 10.23.1.2
  Network Mask: /32
         Metric Type: 2 (Larger than any link state path)
         Metric: 20

  Link State ID: 192.168.4.4 (External Network Number )
  Advertising Router: 192.168.3.3
  Network Mask: /32
         Metric Type: 2 (Larger than any link state path)
         Metric: 20
R2# show ip route | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.12.1.0/24 is directly connected, GigabitEthernet0/0
C        10.23.1.0/24 is directly connected, GigabitEthernet0/1
O E2     10.34.1.0/24 [110/20] via 10.23.1.3, 00:04:44, GigabitEthernet0/1
      192.168.1.0/32 is subnetted, 1 subnets
D        192.168.1.1 [90/130816] via 10.12.1.1, 00:03:56, GigabitEthernet0/0
      192.168.2.0/32 is subnetted, 1 subnets
C        192.168.2.2 is directly connected, Loopback0
O E2  192.168.4.0/24 [110/20] via 10.23.1.3, 00:04:42, GigabitEthernet0/1
R3# show ip route | begin Gateway
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O E2     10.12.1.0/24 [110/20] via 10.23.1.2, 00:05:41, GigabitEthernet0/1
C        10.23.1.0/24 is directly connected, GigabitEthernet0/1
C        10.34.1.0/24 is directly connected, GigabitEthernet0/0
      192.168.1.0/32 is subnetted, 1 subnets
O E2     192.168.1.1 [110/20] via 10.23.1.2, 00:05:41, GigabitEthernet0/1
      192.168.3.0/32 is subnetted, 1 subnets
C        192.168.3.3 is directly connected, Loopback0
R     192.168.4.0/24 [120/1] via 10.34.1.4, 00:00:00, GigabitEthernet0/0

OSPF-to-OSPF Redistribution

Redistributing routes between OSPF processes preserves the path metric during redistribution, independent of the metric type

R2 redistributes routes between OSPF process 1 and OSPF process 2
R3 redistributes between OSPF process 2 and OSPF process 3.
R2 and R3 set the metric type to 1 during redistribution so that the path metric increments
R1 advertises the Loopback 0 interface 192.168.1.1/32 into OSPF process 1
R4 advertises the Loopback 0 interface 192.168.4.4/32 into OSPF process 3.

but it results in the loss of path information as the Type 1, Type 2, and Type 3 LSAs are not propagated through route redistribution, only metrics are maintained

R2# show running-config | section router ospf
router ospf 1
 redistribute ospf 2 subnets metric-type 1
 network 10.12.1.0 0.0.0.255 area 0
router ospf 2
 redistribute ospf 1 subnets metric-type 1
 network 10.23.1.0 0.0.0.255 area 1
R3# show running-config | section router ospf
router ospf 2
 redistribute ospf 3 subnets metric-type 1
 network 10.23.1.0 0.0.0.255 area 1
router ospf 3
 redistribute ospf 2 subnets metric-type 1
 network 10.34.1.0 0.0.0.255 area 0

Verification on R1 and R4

R1# show ip route ospf | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O E1     10.23.1.0/24 [110/2] via 10.12.1.2, 00:00:21, GigabitEthernet0/0
O E1     10.34.1.0/24 [110/3] via 10.12.1.2, 00:00:21, GigabitEthernet0/0
      192.168.4.0/32 is subnetted, 1 subnets
O E1     192.168.4.4 [110/4] via 10.12.1.2, 00:00:21, GigabitEthernet0/0
R4# show ip route ospf | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O E1     10.12.1.0/24 [110/3] via 10.34.1.3, 00:01:36, GigabitEthernet0/0
O E1     10.23.1.0/24 [110/2] via 10.34.1.3, 00:01:46, GigabitEthernet0/0
      192.168.1.0/32 is subnetted, 1 subnets
O E1     192.168.1.1 [110/4] via 10.34.1.3, 02:38:49, GigabitEthernet0/0

OSPF Forwarding Address

OSPF Type 5 LSAs include a field known as the forwarding address that optimizes forwarding traffic when the source uses a shared network segment

OSPF is enabled on all the links in Area 0 except for network 10.123.1.0/24
R1 forms an eBGP session with R2 (the ASBR) which then redistributes the AS 100 route 192.168.1.1/32 into the OSPF domain
R3 has direct connectivity to R1 but does not establish a BGP session with R1
ASBR is 10.123.1.2 which is the IP address that all OSPF routers forward packets to in order to reach the 192.168.1.1/32 network

Notice that the forwarding address is the default value 0.0.0.0

R3# show ip ospf database external
! Output omitted for brevity
                Type-5 AS External Link States

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS Type: AS External Link
  Link State ID: 192.168.1.1 (External Network Number )
  Advertising Router: 10.123.1.2
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        Metric: 1
        Forward Address: 0.0.0.0

Network traffic from R3 (and R5) takes the suboptimal route R3→R5→R4→R2→R1
The optimal route would use the directly connected 10.123.1.0/24 network

R3# trace 192.168.1.1
Tracing the route to 192.168.1.1
  1 10.35.1.5  0 msec 0 msec 1 msec
  2 10.45.1.4  0 msec 0 msec 0 msec
  3 10.24.1.2  1 msec 0 msec 0 msec
  4 10.123.1.1 1 msec *  0 msec
R5# trace 192.168.1.1
Tracing the route to 192.168.1.1
  1 10.45.1.4  0 msec 0 msec 0 msec
  2 10.24.1.2  1 msec 0 msec 0 msec
  3 10.123.1.1 1 msec *  0 msec

When the forwarding address is 0.0.0.0, all routers forward packets to the ASBR, introducing the potential for suboptimal routing.

The OSPF forwarding address changes from 0.0.0.0 “to the next-hop IP address in the source routing protocol” when:

  • OSPF is enabled on the ASBR’s interface that points to the next-hop IP address.
  • That interface is not set to passive.
  • That interface is a broadcast or nonbroadcast OSPF network type.

When the forwarding address is set to a value besides 0.0.0.0, the OSPF routers forward traffic only to the forwarding address.

OSPF has been enabled on R2’s and R3’s Ethernet interface connected to the 10.123.1.0/24 network,
The interface is Ethernet, which defaults to the broadcast OSPF network type, and all conditions have been met.

Type 5 LSA for the 192.168.1.1/32 network. Now that OSPF has been enabled on R2’s 10.123.1.2 interface and the interface is a broadcast network type, the forwarding address has changed from 0.0.0.0 to 10.123.1.1.

R3# show ip ospf database external
! Output omitted for brevity
                Type-5 AS External Link States1

  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 192.168.1.1 (External Network Number )
  Advertising Router: 10.123.1.2
  Network Mask: /32
         Metric Type: 2 (Larger than any link state path)
         Metric: 1
         Forward Address: 10.123.1.1

verifies that connectivity from R3 and R5 now takes the optimal path to R1 because the forwarding address has changed to 10.123.1.1.

R3# trace 192.168.1.1
Tracing the route to 192.168.1.1
  1 10.123.1.1 0 msec *  1 msec
R5# trace 192.168.1.1
Tracing the route to 192.168.1.1
  1 10.35.1.3  0 msec 0 msec 1 msec
  2 10.123.1.1 0 msec *  1 msec

If the Type 5 LSA forwarding address is not a default value, the address must be an intra-area or inter-area OSPF route
If the route does not exist, the LSA is ignored and is not installed into the RIB

The OSPF forwarding address optimizes forwarding toward the destination network, but return traffic is unaffected. Outbound traffic from R3 or R5 still exits at R3’s Gi0/0 interface, but return traffic is sent directly to R2.

BGP Behaviour

Redistributing routes into BGP does not require a seed metric because BGP is a path vector protocol. Redistributed routes have the following BGP attributes set.

The origin is set to incomplete.

The next-hop address is set to the IP address of the source protocol

The weight is set to 32,768

The MED is set to the path metric of the source protocol

R2 mutually redistributes between OSPF and BGP
R3 mutually redistributes between EIGRP AS 100 and BGP
R1 is advertising the Loopback 0 interface 192.168.1.1/32
R4 is advertising the Loopback 0 interface 192.168.4.4/32

Notice that R2 and R3 have used the command bgp redistribute-internal, which allows for any iBGP learned prefixes to be redistributed into OSPF or EIGRP

R2 (Default IPv4 Address Family Enabled)
router bgp 65100
 bgp redistribute-internal
 network 10.23.1.0 mask 255.255.255.0
 redistribute ospf 1
 neighbor 10.23.1.3 remote-as 65100
R3 (Default IPv4 Address Family Disabled)
router bgp 65100
 no bgp default ipv4-unicast
 neighbor 10.23.1.2 remote-as 65100
 !
 address-family ipv4
  bgp redistribute-internal
  network 10.23.1.0 mask 255.255.255.0
  redistribute eigrp 100
  neighbor 10.23.1.2 activate
exit-address-family

Verification, notice the metric is carried over from the IGP metric during redistribution

R2# show bgp ipv4 unicast | begin Network
       Network         Next Hop           Metric LocPrf Weight Path
 *>   10.12.1.0/24     0.0.0.0                 0         32768 ?
 * i  10.23.1.0/24     10.23.1.3               0    100      0 i
 *>                    0.0.0.0                 0         32768 i
 *>i  10.34.1.0/24     10.23.1.3               0    100      0 ?
 *>   192.168.1.1/32   10.12.1.1               2         32768 ?
 *>i  192.168.4.4/32   10.34.1.4          130816    100      0 ?

Detailed BGP path information for the redistributed routes
The origin is incomplete, and the BGP metric matches the IGP metric.

R2# show bgp ipv4 unicast 192.168.1.1
! Output omitted for brevity

BGP routing table entry for 192.168.1.1/32, version 3
Paths: (1 available, best #1, table default)
  Local
    10.12.1.1 from 0.0.0.0 (192.168.2.2)
      Origin incomplete, metric 2, localpref 100, weight 32768, valid, sourced, best
R3# show bgp ipv4 unicast 192.168.4.4
BGP routing table entry for 192.168.4.4/32, version 3
Paths: (1 available, best #1, table default)
  Local
    10.34.1.4 from 0.0.0.0 (10.34.1.3)
      Origin incomplete, metric 130816, localpref 100, weight 32768, valid, sourced,
best

Redistribution of routes from OSPF to BGP does not include OSPF external routes by default. match external [1 | 2] is required to redistribute OSPHighly available network designs use multiple points of redistribution to ensure redundancy, which increases the probability of route feedback. Route feedback can cause suboptimal routing or routing loops, but it can be resolved with the techniques explained in this chapter and in Chapter 12, “Advanced BGP.”F external routes.

Redistribution and Redundancy

Due to redundancy in networks, there are usually 2 redistirbuting points in the network, but following issues may arise

  1. Suboptimal routing – slow connectivity
  2. Routing loops – Total loss of service

Suboptimal routing

Whenever redistribution takes place, network visiblity is lost and seed metric is used as a starting point and this is not an issue when there is only one point of redistribution in the network however it can become an issue if there are 2 or more points of redistribution and it can cause sub optimal routing to the destination learned via redistribution

Left to right, better path to reach 192.168.2.0/24 is via R2 because via R1 we will encounter R1’s 10Mbps link which is slowest in the topology

When you perform redistribution on R1 and R2 (Internal Routers) into EIGRP, EIGRP does not know that the 10 Mbps link or the 1 Gbps link exists in the OSPF domain, in order to avoid this situation we have to add lower seed metric on R2 and higher seed metric on R1

Same Seed Metric

In case seed metric defined on R1 and R2 are same, in EIGRP AS or domain, after adding seed metric (distance vector calculation) and cost of links (1 Gbps link and 100 Mbps links), inside EIGRP AS route to 192.168.2.0/24 through R1 will win and from there I will be routed over the 10 Mbps link

You can recognize this issue in a topological diagram and also by using the traceroute command

You can solve this issue by providing lower seed metric on R2 and higher seed metric on R1

In reverse when EIGRP routes (10.1.1.0/24) are redistributed into OSPF, the redistributed routes have a default seed metric of 20 and are classified as E2 routes;

Due to E2 routes, the metric remains as 20 throughout the OSPF domain, whenever E2 are used we need to keep in mind that routes

next post