Redistributing routes into OSPFv2

The redistribution of BGP, connected, and static IP routes into OSPFv2 is configured on a device.

  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the router ospf command to enter OSPFv2 router configuration mode and enable OSPFv2 on the device.
    device(config)# router ospf
  3. Enter the redistribute command with the static parameter to redistribute static routes.
    device(config-router-ospf-vrf-default-vrf)# redistribute static
  4. Enter the redistribute command with the connected parameter to redistribute static routes.
    device(config-router-ospf-vrf-default-vrf)# redistribute connected
  5. Enter the redistribute command with the bgp parameter to redistribute BGP routes.
    device(config-router-ospf-vrf-default-vrf)# redistribute bgp

Example

The following example redistributes static and BGP routes into OSPFv2 on a device.

device# configure terminal
device(config)# router ospf 
device(config-router-ospf-vrf-default-vrf)# redistribute static
device(config-router-ospf-vrf-default-vrf)# redistribute connected
device(config-router-ospf-vrf-default-vrf)# redistribute bgp