Skip to content

No route to IPv6 gateway added when scatic "far" gateway added. #7556

Description

@RooHTaylor

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug
To Reproduce

When adding a static IPv6 "far" gateway, no route is added to the routing table to reach said gateway and therefor all upsteam IPv6 traffic fails with No Route To Host.

I have a /64 network on my WAN and my provider uses a static gateway in a different /64 (same /56) as the default upstream gateway, instead of RAs. I assign a static IPv6 address from the WAN /64 to the WAN interface and apply the settings (issue occurs whether I perform this step first or not). I attempt to add the gateway via the GUI page /ui/routing/configuration with the following configuration options:

Interface: WAN
Address Family: IPv6
IP Address: <GATEWAY_IP>
Upstream Gateway: [X]
Far Gateway: [X]
Disable Gateway Monitoring: [ ]
Disable Host Route: [ ]
Monitor IP: <GATEWAY_IP>
Mark Gateway as Down: [ ]
Priority: 255

After saving I "Apply". In can be immediately seen on the that the newly added gateway status is "Down". Attempting to ping any upstream IPv6 address fails with "No route to host". Inspection of the routing table via /ui/diagnostics/interface/routes or via the command line route -6 show <GATEWAY_IP> show that the gateway address is not in the routing table.

Adding the gateway under "Static IPv6 configuration > IPv6 gateway rules" on /interfaces.php?if=wan makes no difference either.

Adding a route to the address manually via the command route -6 add <GATEWAY_IP> -interface vtnet0 makes everything work as expected. I can ping IPv6 upstream, however the route disappears after every reboot.

Expected behavior

As far as I can tell, a "Far gateway" MUST be available on the link. An on-link route should be added for a gateway address specified as a "Far gateway". This matches the behaviour of IPv4 gateways, which do not suffer from this problem. When a "Far" IPv4 gateway is added, an on-link route to the IPv4 address is added to the routing table.

Describe alternatives you considered

I considered having the route manually added via script at every boot, but the behaviour should be automatic.

Relevant log files

There are no logs, other than a failure to add the default route because there is "no route to host". As far as I can tell it doesn't even try to add an on-link route to the address.

Environment

OPNsense 24.1.8-amd64
FreeBSD 13.2-RELEASE-p11

KVM proxmox-ve: 8.2.0 (running kernel: 6.8.8-1-pve)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributor missing / timeoutsupportCommunity support or awaiting triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions