Project

General

Profile

Actions

Feature #972

closed

Allow adding gateways outside of interface subnet

Added by Chris Buechler about 14 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
10/25/2010
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:

Description

Gateways outside of the interface's IP subnet, on Ethernet links, cannot be added under normal circumstances as it's not really a valid config and FreeBSD won't add the default gateway as normal, and will not issue ARP requests for IPs outside of directly connected subnets. The work around to add such a gateway is to run:

# route add -net gatewayip/32 -iface em0 -cloning
# route add default gatewayip
Actions #1

Updated by Seth Mos about 14 years ago

As I understood from Remko Lodder there is a large ISP in .de that also employs this with their ipv6 configuration. Odd.

Actions #2

Updated by Iñigo Martinez about 14 years ago

Gateway test should check in both subnet interface and IP ALIAS subnet.
At this moment, only subnet interface is checked, but not subnet ip alias.

Actions #3

Updated by Franck Bourdonnec about 13 years ago

well, OVH big big french provider is also using this king of setup

A well english detailled big page explain all here

http://blog.magiksys.net/pfsense-firewall-default-gateway-different-subnet

Please implement your two lines fix asap when you detect the strange configuration !
Issue a warning if you want, but don't forbide it.

Franck

Actions #4

Updated by Mike Noordermeer over 12 years ago

This is an rather large issue for me, since my ISP is using HSRP for redundancy on IPv6, and they provide me a link-local address as gateway... I can't enter that address into PFSense and thus can't use an IPv6 IP.

Actions #5

Updated by Jim Pingle about 12 years ago

AT&T is doing this now on their network handing off DHCP with a /32 mask with certain uverse gear like the NVG510, so when we fix this, we'll need to also account for supporting this inside of dhclient-script

Actions #6

Updated by Jim Pingle over 11 years ago

Apparently -cloning has been deprecated in FreeBSD, so that parameter should be removed from the above command.

# route add -net gatewayip/32 -iface em0
# route add default gatewayip
Actions #7

Updated by Oliver K. almost 11 years ago

Three years and counting... How is this still not implemented / patched?

Actions #8

Updated by Chris Buechler almost 11 years ago

because accommodating 1 in 100,000 scenarios isn't a priority, especially when there is an easy manual work around. Patches welcome.

Actions #9

Updated by Dan F almost 11 years ago

What would be the "correct" way to make this survive reboots, please?

Actions #10

Updated by Dédé D almost 11 years ago

Hi Dan,

I felt in the same trouble, and I the idea I have found to survive reboot is using the ShellCmd package : https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

I added the workaround lines in comment #6, and it works (OVH Hyper-V 2008 guest VM).

Actions #11

Updated by Jim Thompson almost 9 years ago

  • Assignee set to Chris Buechler

PR #2119 claims to fix this and #1847

Please evaluate and report.

Actions #12

Updated by Jim Thompson almost 9 years ago

  • Target version changed from Future to 2.3

target set to 2.3

change it back if we don't want to add this now.

Looks like a low-drama PR though.

Actions #13

Updated by Chris Buechler almost 9 years ago

  • Category set to Gateways
  • Status changed from New to Feedback

It works, went ahead and merged it. The deletion doesn't happen correctly, added a comment to that PR, hopefully PiBa can follow up with a fix there.

Leaving for verification again once it's in a snapshot.

Actions #14

Updated by Pi Ba almost 9 years ago

  • % Done changed from 0 to 100
Actions #15

Updated by Chris Buechler almost 9 years ago

  • Status changed from Feedback to Resolved

these are added and removed correctly now

Actions

Also available in: Atom PDF