Gateway not added when in different subnet

Bug #1084771 reported by Oliver L.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Hi,

as with IPv6 it became usual to have gateways in different subnets than the subnet that is handed out. So it can happen that you get this subnet: "2a01:db8:1234::/64" and the gateway is "2a01:db8::1/128" which is in a different subnet.

If one adds such a gateway to "/etc/network/interfaces" it is not added by the scripts, as there is no route to this host on the system. This is correct, but doesn't solve the problem.

To solve it, it is necessary to add a "local" route to the gateway, like so:

"ip -6 route add 2a01:db8::1" dev $interface".

This lets the system send NDP requests for the gateway's MAC address and makes it able to add the default route like so:

"ip -6 route add default via 2a01:db8::1".

The same problem exists in IPv4, but it's not a common scenario to use a gateway in a different subnet there.

And please, please, don't tell me a gateway has to be in the same subnet as the client...

If you have any questions feel free to contact me.

KR,

Oliver

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ifupdown 0.7.2ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-18.29-generic 3.5.7
Uname: Linux 3.5.0-18-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Thu Nov 29 23:43:58 2012
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:
 TERM=screen
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: ifupdown
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Oliver L. (grimeton) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

It is not possible to use a gateway on a different subnet. By definition, being on a different subnet means the gateway is not reachable on this network.

Changed in ifupdown (Ubuntu):
status: New → Invalid
Revision history for this message
Oliver L. (grimeton) wrote :

I knew it...

Do me a favour - read RFC 2461 http://www.ietf.org/rfc/rfc2461.txt

===== SNIP ====== 8< ============================

    Unlike IPv4, the recipient of an IPv6 redirect assumes that the
      new next-hop is on-link. In IPv4, a host ignores redirects
      specifying a next-hop that is not on-link according to the link's
      network mask. The IPv6 redirect mechanism is analogous to the
      XRedirect facility specified in [SH-MEDIA]. It is expected to be
      useful on non-broadcast and shared media links in which it is
      undesirable or not possible for nodes to know all prefixes for
      on-link destinations.

====== >8 ========= SNAP ========================

...

Changed in ifupdown (Ubuntu):
status: Invalid → New
Changed in ifupdown (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.