[SOLVED] Not able to redistribute BGP to OSPF

I’ve been having difficulties redistributing BGP routes to OSPF. Redistributing static routes work. My ultimate goal is to sumarize the bgp routes and only advertize the sumarized routes in ospf.

Version:

vyos@vyos:~$ show version

Version:          VyOS 1.3.2
Release train:    equuleus

Built by:         Sentrium S.L.
Built on:         Mon 05 Sep 2022 09:23 UTC
Build UUID:       1ceaab3a-4f4e-4692-b551-7c05e1da0a77
Build commit ID:  7ce86511888635

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  Red Hat
Hardware model:   KVM
Hardware S/N:
Hardware UUID:    842ecad3-387e-4143-a1e3-6b5ecad15316

Copyright:        VyOS maintainers and contributors

Relevent Config:

policy {
    route-map sum {
        rule 10 {
            action permit
        }
    }
}
protocols {
    bgp 4242423411 {
        address-family {
            ipv4-unicast {
                network 172.22.148.224/28 {
                }
            }
            ipv6-unicast {
                network fd2e:d3a8:d041::/48 {
                }
            }
        }
        neighbor fe80::2717 {
            address-family {
                ipv4-unicast {
                }
                ipv6-unicast {
                }
            }
            remote-as 4242422717
            solo
            update-source wg1
        }
        neighbor fe80::ade0 {
            address-family {
                ipv4-unicast {
                    soft-reconfiguration {
                        inbound
                    }
                }
                ipv6-unicast {
                    soft-reconfiguration {
                        inbound
                    }
                }
            }
            remote-as 4242423914
            solo
            update-source wg0
        }
        parameters {
            default {
                no-ipv4-unicast
            }
            router-id 172.22.148.224
        }
    }
    ospf {
        area 0.0.0.0 {
            network 10.172.2.0/24
        }
        parameters {
            router-id 10.172.255.3
        }
        passive-interface wg0
        passive-interface wg1
        passive-interface lo
        passive-interface eth0
        redistribute {
            bgp {
                route-map sum
            }
            static {
            }
        }
    }
    static {
        interface-route 172.20.53.98/32 {
            next-hop-interface wg0 {
            }
        }
        interface-route 172.22.66.95/32 {
            next-hop-interface wg1 {
            }
        }
        interface-route6 fdfc:e23f:fb45:3234::2/128 {
            next-hop-interface wg0 {
            }
        }
        route 172.22.148.224/28 {
            blackhole {
            }
        }
        route6 fd2e:d3a8:d041::/48 {
            blackhole {
            }
        }
    }
}

show bgp sum:

BGP router identifier 172.22.148.224, local AS number 4242423411 vrf-id 0
BGP table version 18002
RIB entries 1509, using 283 KiB of memory
Peers 2, using 43 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
fe80::2717      4 4242422717     43422      2197        0    0    0 02:25:11          779      676
fe80::ade0      4 4242423914     32403      5021        0    0    0 16:42:56          778      110

Total number of neighbors 2

IPv6 Unicast Summary:
BGP router identifier 172.22.148.224, local AS number 4242423411 vrf-id 0
BGP table version 19780
RIB entries 1329, using 249 KiB of memory
Peers 2, using 43 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
fe80::2717      4 4242422717     43422      2197        0    0    0 02:25:11          692      613
fe80::ade0      4 4242423914     32403      5021        0    0    0 16:42:56          692       82

Total number of neighbors 2

show ip ospf database

vyos@vyos:~$ show ip ospf database

       OSPF Router with ID (10.172.255.3)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
10.172.255.1    10.172.255.1     191 0x80000008 0x78a3 3
10.172.255.3    10.172.255.3     376 0x80000006 0x9186 1

                Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum
10.172.2.5      10.172.255.1     171 0x80000003 0x3b36

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
172.20.53.98    10.172.255.3     106 0x80000002 0x01aa E2 172.20.53.98/32 [0x0]
172.22.66.95    10.172.255.3     146 0x80000002 0x7728 E2 172.22.66.95/32 [0x0]
172.22.148.224  10.172.255.3     106 0x80000002 0x8456 E2 172.22.148.224/28 [0x0]

If you expect IPv6 routes, you should configure OSPFv3

set protocols ospfv3 xxx

Thanks, I was wanting to get ipv4 working and then I would worry about ipv6. Trying to take baby steps.

adding ebgp-multihop, and nexthop self solved my problem.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.