Page MenuHomeVyOS Platform

Zebra doesn't report properly the default gateway in a specific case
Closed, WontfixPublic



I've got a problem in a specific setup, with VyOS 1.1.7, where zebra doesn't push properly the default gateway into linux routing table (check the following picture for further information).

I've reproduced the bug while building a virtual VyOS instance on a dedicated proxmox box, with a bridged public network interface.

The host machine has an IP address in a /24 subnet. My hosting provider gives me public IPv4 addresses outside this /24 subnet to use on my virtual machines. Thus, the baseline network configuration on my VyOS instance looks as follow:

interfaces {
    ethernet eth0 {
        address <vm_ipv4>/32
        description "WAN Interface"
protocols {
    static {
        interface-route <host_subnet_ipv4>/24 {
            next-hop-interface eth0 {
        route {
            next-hop <host_default_gateway> {

Zebra recognises in its table this is a recursive route, but doesn't report properly the default gateway to the linux routing table.

So far, I've fixed the issue by manually setting up the default route as follow:

echo "/sbin/route add -net gw your_gateway" > /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script


Difficulty level
Easy (less than an hour)

Event Timeline

why do you use /32 as for your ip for wan? if you use /32 zebra can not set route.

syncer triaged this task as Wishlist priority.Mar 31 2016, 9:59 PM
syncer added a project: VyOS 1.1.x.
syncer added a subscriber: syncer.

I move this to wishlist, need to dig deeper about this particular cases with OVH/
they use this type of IP allocation and provision

syncer changed the edit policy from "Public (No Login Required)" to "Custom Policy".Aug 21 2017, 1:19 AM
syncer edited projects, added VyOS 1.2 Crux; removed VyOS 1.1.x.
syncer set Version to -.

Moved this to 1.2

syncer claimed this task.

must set interface route to single gw ip and use it after as default gateway