Search code examples
bgp

Does locally originated routes next hop always 0.0.0.0?


Does locally originated routes will always have next hop 0.0.0.0? and there is situation the a route that is no locally originated will have 0.0.0.0 as next hop? If yes, how can I differ between the two? thank you


Solution

  • Locally injected routes will always have a next hop of 0.0.0.0 which means this is local to the router itself (connected), or learned from an IGP and injected into BGP with the 'network' command.

    These local routes will always have a weight of 32768 (highest) and will always be preferred.

    If it's not one of the two I described above, it won't have 0.0.0.0 as the next hop.