Debian Bug report logs - #652573
enable routing via non-local gateways in dhcp client script

version graph

Package: busybox-udeb; Maintainer for busybox-udeb is Debian Install System Team <debian-boot@lists.debian.org>; Source for busybox-udeb is src:busybox.

Reported by: Petter Reinholdtsen <pere@hungry.com>

Date: Sun, 18 Dec 2011 18:18:02 UTC

Severity: wishlist

Found in version busybox/1:1.17.1-8

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, holger@layer-acht.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sun, 18 Dec 2011 18:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
New Bug report received and forwarded. Copy sent to holger@layer-acht.org, Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 18 Dec 2011 18:18:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: submit@bugs.debian.org
Subject: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sun, 18 Dec 2011 19:16:07 +0100
Package: busybox-udeb
Version: 1:1.17.1-8

The Debian/Squeeze installer fail with /32 netmasks provided from DHCP.
From <URL: https://bugs.busybox.net/show_bug.cgi?id=4604 >:

  debian stable busybox udhcp client does not support /32
  netmasks. Changing the netmask to <32 works.

  Debian boots with busybox udhcp and the DHCP configuration fails.
  Once Debian is booted and running with the isc dhclient, the
  configuration works ok.

I am told this bug make it impossible or very hard to install
Debian/Squeeze in some cloud environments.
-- 
Happy hacking
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sun, 18 Dec 2011 18:27:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 18 Dec 2011 18:27:05 GMT) Full text and rfc822 format available.

Message #10 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Petter Reinholdtsen <pere@hungry.com>, 652573@bugs.debian.org
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sun, 18 Dec 2011 22:23:47 +0400
On 18.12.2011 22:16, Petter Reinholdtsen wrote:
> 
> Package: busybox-udeb
> Version: 1:1.17.1-8
> 
> The Debian/Squeeze installer fail with /32 netmasks provided from DHCP.
>>From <URL: https://bugs.busybox.net/show_bug.cgi?id=4604 >:
> 
>   debian stable busybox udhcp client does not support /32
>   netmasks. Changing the netmask to <32 works.

The /32 netmask for a host is at least non-standard.  I'm not sure
it is ever possible to _use_ such a netmask on an ethernet interface
on any other system but linux - it definitely is impossible to use
on windows, not sure about *bsd and others.

>   Debian boots with busybox udhcp and the DHCP configuration fails.
>   Once Debian is booted and running with the isc dhclient, the
>   configuration works ok.
> 
> I am told this bug make it impossible or very hard to install
> Debian/Squeeze in some cloud environments.

I don't know much about cloud enviromnents.  But it appears it is best
to use standard setup, not resorting to /32 netmasks and peer-to-peer
interfaces on ethernet.

Thanks,

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sun, 18 Dec 2011 18:30:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 18 Dec 2011 18:30:09 GMT) Full text and rfc822 format available.

Message #15 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Petter Reinholdtsen <pere@hungry.com>, 652573@bugs.debian.org
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sun, 18 Dec 2011 22:28:55 +0400
severity 652573 wishlist
thanks

On 18.12.2011 22:23, Michael Tokarev wrote:
> On 18.12.2011 22:16, Petter Reinholdtsen wrote:
>>
>> Package: busybox-udeb
>> Version: 1:1.17.1-8
>>
>> The Debian/Squeeze installer fail with /32 netmasks provided from DHCP.
>> >From <URL: https://bugs.busybox.net/show_bug.cgi?id=4604 >:
>>
>>   debian stable busybox udhcp client does not support /32
>>   netmasks. Changing the netmask to <32 works.
> 
> The /32 netmask for a host is at least non-standard.  I'm not sure
> it is ever possible to _use_ such a netmask on an ethernet interface
> on any other system but linux - it definitely is impossible to use
> on windows, not sure about *bsd and others.

And since this is non-standard, downgrading the severity of this
bug to wishlist.  Most likely will be also tagged as wontfix.

Thanks,

/mjt




Severity set to 'wishlist' from 'normal' Request was from Michael Tokarev <mjt@tls.msk.ru> to control@bugs.debian.org. (Sun, 18 Dec 2011 18:30:10 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'https://bugs.busybox.net/show_bug.cgi?id=4604'. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Tue, 20 Dec 2011 10:30:16 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 20 Dec 2011 16:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Conrad Wood <cnw@conradwood.net>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 20 Dec 2011 16:18:03 GMT) Full text and rfc822 format available.

Message #24 received at 652573@bugs.debian.org (full text, mbox):

From: Conrad Wood <cnw@conradwood.net>
To: 652573@bugs.debian.org
Subject: /32 netmask
Date: Tue, 20 Dec 2011 16:31:40 +0100
as the original reporter of the issue, /32 instructs linux (and windows
2000+ and MacOS) to send all traffic to the gateway, never local.
This is actually fairly common in switched & shared datacenters and
avoids the need for private ip-addresses between two hops, or worse
using valuable IPv4 addresses for routing hops.

Noteworthy is that isc-dhcp does The Right Thing in my opinion, by
passing any semantically correct netmask on to the underlying layer
without logical test. That should be up to the network layer wether or
not it can digest it.

uDHCP seems to filter it prematurely.

Whilst setting IP & netmask manually works around this issue it is
inconvenient for users.

And yes... it is a bit of a hack that became common rather than one that
was designed and RFC'ed afaik ;-)





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sat, 02 Jun 2012 15:21:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 02 Jun 2012 15:21:08 GMT) Full text and rfc822 format available.

Message #29 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Petter Reinholdtsen <pere@hungry.com>, 652573@bugs.debian.org
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sat, 02 Jun 2012 19:19:04 +0400
On 18.12.2011 22:28, Michael Tokarev wrote:
> On 18.12.2011 22:23, Michael Tokarev wrote:
>> On 18.12.2011 22:16, Petter Reinholdtsen wrote:
>>>
>>> Package: busybox-udeb
>>> Version: 1:1.17.1-8
>>>
>>> The Debian/Squeeze installer fail with /32 netmasks provided from DHCP.
>>> >From <URL: https://bugs.busybox.net/show_bug.cgi?id=4604 >:
>>>
>>>   debian stable busybox udhcp client does not support /32
>>>   netmasks. Changing the netmask to <32 works.
>>
>> The /32 netmask for a host is at least non-standard.  I'm not sure
>> it is ever possible to _use_ such a netmask on an ethernet interface
>> on any other system but linux - it definitely is impossible to use
>> on windows, not sure about *bsd and others.

Peter, can you give some more details please, maybe some
hints on how to setup the test environment / dhcp server?

Looking at the dhcp client code in busybox - either current 1.20
or squeeze 1.17 version, I don't see where it might not work.
The /32 (255.255.255.255) netmask should Just Work.  So in
order to do something with this bugreport (as opposed to just
forgetting about it entirely), I need some reproducer/verifier...

Thanks,

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sat, 02 Jun 2012 18:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 02 Jun 2012 18:09:06 GMT) Full text and rfc822 format available.

Message #34 received at 652573@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: Michael Tokarev <mjt@tls.msk.ru>, 652573@bugs.debian.org
Cc: Conrad Wood <cnw@conradwood.net>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sat, 02 Jun 2012 20:04:38 +0200
[Michael Tokarev]
> Peter, can you give some more details please, maybe some hints on how
> to setup the test environment / dhcp server?

Sorry, I do not have more details any more.  If I remember correctly,
the problem was with installing Debian on virtual machines where the
installation environment only provided one IP address to the virtual
ethernet and used this to set the IP using DHCP.

Probably better to ask Conrad Wood for more details. Cc to him.
-- 
Happy hacking
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sat, 02 Jun 2012 20:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 02 Jun 2012 20:18:03 GMT) Full text and rfc822 format available.

Message #39 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Conrad Wood <cnw@conradwood.net>
Cc: 652573@bugs.debian.org
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sun, 03 Jun 2012 00:14:39 +0400
On 02.06.2012 23:59, Conrad Wood wrote:
[]
> In some "cloud" environments, including ours, we configure an ethernet device with a single /32 IP Address. Say, for example 5.6.7.8/32. The Default Gateway is, for example, 9.10.11.12. The linux kernel and BSD happily work as desired and send out an arp request out of the ethernet device and route _everything_ to the default gateway. 
> Configuring this manually is straightforward and works as desired.

> Using the ISC-DHCP client also works as desired. It picks up IP, Netmaks and gateway perfectly well.

> However, in the installer, with the busybox dhcp client, it stalls and claims it is unable to configure the network interfaces. Anything _apart_ from /32 (say /31, /30 etc.) works ok. But then the gateway won't be reachable, as the kernel then tries to do 'propper(?)' routing instead of just forwarding the packets.

Did you try using busybox dhcp client on an already
installed system, as opposed to the debian installer?

I just tried - dnsmasq as dhcp server, and squeeze busybox -
it accepts the /32 netmask just fine and configures the
interface accordingly.  I had to overwrite "netmask" option
on the server, setting it explicitly, and I verified with
tcpdump that the server sends correct DHCP reply with the
right netmask.

But I'm not actually sure how debian installer configures
the network...

Thanks,

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sat, 02 Jun 2012 20:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Conrad Wood <cnw@conradwood.net>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 02 Jun 2012 20:18:05 GMT) Full text and rfc822 format available.

Message #44 received at 652573@bugs.debian.org (full text, mbox):

From: Conrad Wood <cnw@conradwood.net>
To: Petter Reinholdtsen <pere@hungry.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>, 652573@bugs.debian.org
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sat, 2 Jun 2012 21:59:24 +0200
On 2 Jun 2012, at 20:04, Petter Reinholdtsen wrote:

> 
> [Michael Tokarev]
>> Peter, can you give some more details please, maybe some hints on how
>> to setup the test environment / dhcp server?
> 
> Sorry, I do not have more details any more.  If I remember correctly,
> the problem was with installing Debian on virtual machines where the
> installation environment only provided one IP address to the virtual
> ethernet and used this to set the IP using DHCP.
> 
> Probably better to ask Conrad Wood for more details. Cc to him.
> -- 
> Happy hacking
> Petter Reinholdtsen
> 

Hi Petter,

In some "cloud" environments, including ours, we configure an ethernet device with a single /32 IP Address. Say, for example 5.6.7.8/32. The Default Gateway is, for example, 9.10.11.12. The linux kernel and BSD happily work as desired and send out an arp request out of the ethernet device and route _everything_ to the default gateway. 
Configuring this manually is straightforward and works as desired.
Using the ISC-DHCP client also works as desired. It picks up IP, Netmaks and gateway perfectly well.
However, in the installer, with the busybox dhcp client, it stalls and claims it is unable to configure the network interfaces. Anything _apart_ from /32 (say /31, /30 etc.) works ok. But then the gateway won't be reachable, as the kernel then tries to do 'propper(?)' routing instead of just forwarding the packets.
Please let me know if you need more information. I can provide a remote console to a Virtual Machine where this problem is reproducible, if that helps.

Conrad 











Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Sat, 02 Jun 2012 20:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Conrad Wood <cnw@profitbricks.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 02 Jun 2012 20:48:02 GMT) Full text and rfc822 format available.

Message #49 received at 652573@bugs.debian.org (full text, mbox):

From: Conrad Wood <cnw@profitbricks.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 652573@bugs.debian.org, Jens Ott - ProfitBricks GmbH <jens.ott@profitbricks.com>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Sat, 2 Jun 2012 22:26:52 +0200
On 2 Jun 2012, at 22:14, Michael Tokarev wrote:

> On 02.06.2012 23:59, Conrad Wood wrote:
> []
>> In some "cloud" environments, including ours, we configure an ethernet device with a single /32 IP Address. Say, for example 5.6.7.8/32. The Default Gateway is, for example, 9.10.11.12. The linux kernel and BSD happily work as desired and send out an arp request out of the ethernet device and route _everything_ to the default gateway. 
>> Configuring this manually is straightforward and works as desired.
> 
>> Using the ISC-DHCP client also works as desired. It picks up IP, Netmaks and gateway perfectly well.
> 
>> However, in the installer, with the busybox dhcp client, it stalls and claims it is unable to configure the network interfaces. Anything _apart_ from /32 (say /31, /30 etc.) works ok. But then the gateway won't be reachable, as the kernel then tries to do 'propper(?)' routing instead of just forwarding the packets.
> 
> Did you try using busybox dhcp client on an already
> installed system, as opposed to the debian installer?
> 
> I just tried - dnsmasq as dhcp server, and squeeze busybox -
> it accepts the /32 netmask just fine and configures the
> interface accordingly.  I had to overwrite "netmask" option
> on the server, setting it explicitly, and I verified with
> tcpdump that the server sends correct DHCP reply with the
> right netmask.
> 
> But I'm not actually sure how debian installer configures
> the network...
> 
> Thanks,
> 
> /mjt
> 

Hm, I believe we did. +CC Jens Ott, our network guru, I think he did try. Let's see what he has to say about that ;)

Conrad




Conrad Wood
(Deputy CTO, Head of Research & Innovations)

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin
 
Office:	 	+49 30 51 64 09 21
DDI:		+49 30 51 300 021
Email:	 	conrad.wood@profitbricks.com
URL:	 	http://www.profitbricks.com/
Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B.
Geschäftsführer: Andreas Gauger, Achim Weiss






Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 05 Jun 2012 10:21:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jens Ott - Profitbricks <jens.ott@profitbricks.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 10:21:23 GMT) Full text and rfc822 format available.

Message #54 received at 652573@bugs.debian.org (full text, mbox):

From: Jens Ott - Profitbricks <jens.ott@profitbricks.com>
To: Conrad Wood <cnw@profitbricks.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>, 652573@bugs.debian.org
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Tue, 05 Jun 2012 12:18:55 +0200
[Message part 1 (text/plain, inline)]
Michael,
Conrad,

as far as I am aware, the problem is NOT the dhcp-client of busybox
itself but the hook-script used in debian. Find attached a hook-script
which I use in my home-brewn rescue and which used to work also with
/32 (sorry don't have an environment to test at hand, so I could not
proove). So IMHO actually only the hook-script in debian is screwed up.

BR
Jens

On 02.06.2012 22:26, Conrad Wood wrote:
> 
> On 2 Jun 2012, at 22:14, Michael Tokarev wrote:
> 
>> On 02.06.2012 23:59, Conrad Wood wrote: []
>>> In some "cloud" environments, including ours, we configure an
>>> ethernet device with a single /32 IP Address. Say, for example
>>> 5.6.7.8/32. The Default Gateway is, for example, 9.10.11.12.
>>> The linux kernel and BSD happily work as desired and send out
>>> an arp request out of the ethernet device and route
>>> _everything_ to the default gateway. Configuring this manually
>>> is straightforward and works as desired.
>> 
>>> Using the ISC-DHCP client also works as desired. It picks up
>>> IP, Netmaks and gateway perfectly well.
>> 
>>> However, in the installer, with the busybox dhcp client, it
>>> stalls and claims it is unable to configure the network
>>> interfaces. Anything _apart_ from /32 (say /31, /30 etc.) works
>>> ok. But then the gateway won't be reachable, as the kernel then
>>> tries to do 'propper(?)' routing instead of just forwarding the
>>> packets.
>> 
>> Did you try using busybox dhcp client on an already installed
>> system, as opposed to the debian installer?
>> 
>> I just tried - dnsmasq as dhcp server, and squeeze busybox - it
>> accepts the /32 netmask just fine and configures the interface
>> accordingly.  I had to overwrite "netmask" option on the server,
>> setting it explicitly, and I verified with tcpdump that the
>> server sends correct DHCP reply with the right netmask.
>> 
>> But I'm not actually sure how debian installer configures the
>> network...
>> 
>> Thanks,
>> 
>> /mjt
>> 
> 
> Hm, I believe we did. +CC Jens Ott, our network guru, I think he
> did try. Let's see what he has to say about that ;)
> 
> Conrad
> 
> 
> 
> 
> Conrad Wood (Deputy CTO, Head of Research & Innovations)
> 
> ProfitBricks GmbH Greifswalder Str. 207 D - 10405 Berlin
> 
> Office:	 	+49 30 51 64 09 21 DDI:		+49 30 51 300 021 Email:
> conrad.wood@profitbricks.com URL:	 	http://www.profitbricks.com/ 
> Sitz der Gesellschaft: Berlin Registergericht: Amtsgericht
> Charlottenburg, HRB 125506 B. Geschäftsführer: Andreas Gauger,
> Achim Weiss
> 
> 



[udhcp-script.tpl (application/vnd.groove-tool-template, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 05 Jun 2012 16:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 16:15:03 GMT) Full text and rfc822 format available.

Message #59 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Jens Ott - Profitbricks <jens.ott@profitbricks.com>, 652573@bugs.debian.org
Cc: Conrad Wood <cnw@profitbricks.com>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Tue, 05 Jun 2012 20:10:17 +0400
retitle 652573 busybox ip addr add ip.add.re.ss/32 does not work
thanks

On 05.06.2012 14:18, Jens Ott - Profitbricks wrote:
> Michael,
> Conrad,
> 
> as far as I am aware, the problem is NOT the dhcp-client of busybox
> itself but the hook-script used in debian. Find attached a hook-script
> which I use in my home-brewn rescue and which used to work also with
> /32 (sorry don't have an environment to test at hand, so I could not
> proove). So IMHO actually only the hook-script in debian is screwed up.

Thank you Jens for the reply.  Now I see what's going on.

It is not udhcpc, and not the udhcpc script either.  It is busybox's
`ip' utility.

# busybox ip -4 add 192.168.77.10/32 dev dummy0
ip: invalid argument '192.168.77.10/32' to 'ip'
# busybox ip -4 add 192.168.77.10/31 dev dummy0
# _

And this is exactly what's used in the udeb script:

        bound|renew)
                ip -4 addr add "$ip/$subnet" dev "$interface"

So I'm retitling the bugreport accordingly, and will
try to fix it now, when it is clear where the problem
is, exactly.

Thank you very much guys for the help!

/mjt




Changed Bug title to 'busybox ip addr add ip.add.re.ss/32 does not work' from 'busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks' Request was from Michael Tokarev <mjt@tls.msk.ru> to control@bugs.debian.org. (Tue, 05 Jun 2012 16:15:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 05 Jun 2012 16:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 16:39:03 GMT) Full text and rfc822 format available.

Message #66 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Michael Tokarev <mjt@tls.msk.ru>, 652573@bugs.debian.org
Cc: Jens Ott - Profitbricks <jens.ott@profitbricks.com>, Conrad Wood <cnw@profitbricks.com>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Tue, 05 Jun 2012 20:36:25 +0400
On 05.06.2012 20:10, Michael Tokarev wrote:
[]
> It is not udhcpc, and not the udhcpc script either.  It is busybox's
> `ip' utility.
> 
> # busybox ip -4 add 192.168.77.10/32 dev dummy0
> ip: invalid argument '192.168.77.10/32' to 'ip'

And this is, ofcourse, a typo...  I forgot to use `addr'.

> # busybox ip -4 add 192.168.77.10/31 dev dummy0

And this one I actually didn't run at all, hitting CtrlC
instead of Enter!

That's what happens when you do things when you're too
tired... :(  Please excuse me for the noize.  Digging
further, and I'll update the bugreports accordingly
(will restore it all back if I wont be able to find
the issue).

For now I see another _possible_ issue, which needs
to be verified in d-i: this is the place which adds
routes.  Neither debian default.script nor your script
is able to add routes:

# busybox ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0
ip: RTNETLINK answers: No such process

The same happens when using route(8) utility.  For this
to work, two routes should be added: first to the gateway
host, without the "via" part:

 # busybox ip r add 192.168.77.11 dev dummy0

and second is the actual default (or whatever) route going
via that gateway, the regular way:

 # busybox ip r add 10.255.0.0/28 via 192.168.77.11

("dev" is optional here, just like for the regular case).

Alternative is to use the keyword "onlink":

 # ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0 onlink

but this does not work with busybox (yet).

I think this /32 case is worth to handle specially, using the
onlink or two route entries.

But I'm not sure this is the actual case the regular bug is
about: for the route to work with netmask != /32, the gateway
must be within the netmask, so if you specify, eg, 1.1.1.1/31
for the client, the router must be 1.1.1.0.

Does it look real?

But again, please note that the script provided by Jens should
fail exactly the same way!  So... I guess it is not the issue... :(

Thank you for patience!

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 05 Jun 2012 16:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jens Ott - Profitbricks <jens.ott@profitbricks.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 16:45:03 GMT) Full text and rfc822 format available.

Message #71 received at 652573@bugs.debian.org (full text, mbox):

From: Jens Ott - Profitbricks <jens.ott@profitbricks.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 652573@bugs.debian.org, Conrad Wood <cnw@profitbricks.com>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Tue, 05 Jun 2012 18:41:00 +0200
Michael

On 05.06.2012 18:36, Michael Tokarev wrote:
> On 05.06.2012 20:10, Michael Tokarev wrote:
> []
>> It is not udhcpc, and not the udhcpc script either.  It is busybox's
>> `ip' utility.
>>
>> # busybox ip -4 add 192.168.77.10/32 dev dummy0
>> ip: invalid argument '192.168.77.10/32' to 'ip'
> 
> And this is, ofcourse, a typo...  I forgot to use `addr'.
> 
>> # busybox ip -4 add 192.168.77.10/31 dev dummy0
> 
> And this one I actually didn't run at all, hitting CtrlC
> instead of Enter!
> 
> That's what happens when you do things when you're too
> tired... :(  Please excuse me for the noize.  Digging
> further, and I'll update the bugreports accordingly
> (will restore it all back if I wont be able to find
> the issue).
> 
> For now I see another _possible_ issue, which needs
> to be verified in d-i: this is the place which adds
> routes.  Neither debian default.script nor your script
> is able to add routes:
> 
> # busybox ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0
> ip: RTNETLINK answers: No such process

That can't work. That's why my script sets the routers-variable to $ip
when netmask is "255.255.255.255".

Somewhere in ARP-RFC it is defined that a router shall respond to
WHO-HAS requests where requester and sender is the same address. So you
actually set default-route to the assigned IP on /32-Assignments.

> 
> The same happens when using route(8) utility.  For this
> to work, two routes should be added: first to the gateway
> host, without the "via" part:
> 
>  # busybox ip r add 192.168.77.11 dev dummy0
> 
> and second is the actual default (or whatever) route going
> via that gateway, the regular way:
> 
>  # busybox ip r add 10.255.0.0/28 via 192.168.77.11
> 
> ("dev" is optional here, just like for the regular case).
> 
> Alternative is to use the keyword "onlink":
> 
>  # ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0 onlink
> 
> but this does not work with busybox (yet).
> 
> I think this /32 case is worth to handle specially, using the
> onlink or two route entries.
> 
> But I'm not sure this is the actual case the regular bug is
> about: for the route to work with netmask != /32, the gateway
> must be within the netmask, so if you specify, eg, 1.1.1.1/31
> for the client, the router must be 1.1.1.0.
> 
> Does it look real?
> 
> But again, please note that the script provided by Jens should
> fail exactly the same way!  So... I guess it is not the issue... :(
> 
> Thank you for patience!
> 
> /mjt

BR
Jens




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 05 Jun 2012 16:51:15 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 16:51:15 GMT) Full text and rfc822 format available.

Message #76 received at 652573@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@tls.msk.ru>
To: Jens Ott - Profitbricks <jens.ott@profitbricks.com>
Cc: 652573@bugs.debian.org, Conrad Wood <cnw@profitbricks.com>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Tue, 05 Jun 2012 20:50:40 +0400
On 05.06.2012 20:41, Jens Ott - Profitbricks wrote:
> Michael
[]
>> For now I see another _possible_ issue, which needs
>> to be verified in d-i: this is the place which adds
>> routes.  Neither debian default.script nor your script
>> is able to add routes:
>>
>> # busybox ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0
>> ip: RTNETLINK answers: No such process
> 
> That can't work.

Sure, because the "gateway" 192.168.77.11 isn't reachable
when the netmask is /32, this is exactly what I described
(quoted below).

>  That's why my script sets the routers-variable to $ip
> when netmask is "255.255.255.255".

And this does not work to.  I think you had a typo there.
See:

[ "$subnet" = "255.255.255.255" ] && routers=$ip
case "$1" in
        renew|bound)
                if [ -n "$router" ] ; then
                        for i in $router ; do
                                echo "Adding router $i"
                                route add default gw $i dev $interface metric $((metric++))
                        done
                fi
..


Note you're setting "routeS" while use "routeR".

This is why it should not work exactly the same way
as current busybox's version!

> Somewhere in ARP-RFC it is defined that a router shall respond to
> WHO-HAS requests where requester and sender is the same address. So you
> actually set default-route to the assigned IP on /32-Assignments.

Well.  In this case, the DHCP server should just set router
correctly, to be the same as client address, everything will
Just Work (tm).

This is a good piece of information, and why I asked for a
reproducer -- it didn't occur to me to use the same IP for
router and client's own ip address, even if I know it might
work exactly the way you describe by sending an ARP for everyhing.

The same can also be achieved by using not own's IP address
but all zeros, like,

 ip route add default via 0.0.0.0 dev eth0

and this is even more correct, I think, this is equivalent
of not specifying "via" at all.  Again, this can be set in
the DHCP server.

I thought about a different case, when you actually specify
some non-dummy gateway, it is not this case...

So, I guess, nothing should be fixed on the busybox/debian
side, do you not agree? :)

Thank you!

/mjt

>> The same happens when using route(8) utility.  For this
>> to work, two routes should be added: first to the gateway
>> host, without the "via" part:
>>
>>  # busybox ip r add 192.168.77.11 dev dummy0
>>
>> and second is the actual default (or whatever) route going
>> via that gateway, the regular way:
>>
>>  # busybox ip r add 10.255.0.0/28 via 192.168.77.11
>>
>> ("dev" is optional here, just like for the regular case).
>>
>> Alternative is to use the keyword "onlink":
>>
>>  # ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0 onlink
>>
>> but this does not work with busybox (yet).




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#652573; Package busybox-udeb. (Tue, 05 Jun 2012 20:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jens Ott - Profitbricks <jens.ott@profitbricks.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 20:30:03 GMT) Full text and rfc822 format available.

Message #81 received at 652573@bugs.debian.org (full text, mbox):

From: Jens Ott - Profitbricks <jens.ott@profitbricks.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 652573@bugs.debian.org, Conrad Wood <cnw@profitbricks.com>
Subject: Re: Bug#652573: busybox-udeb: debian stable busybox udhcp client does not support /32 netmasks
Date: Tue, 05 Jun 2012 22:28:20 +0200
[Message part 1 (text/plain, inline)]
Hi,

as written in PM my submitted script was an very ancient version. Find
attached the current Version. What I did there is if netmask is /32 then
set a device-route for the gateway-ip.

Sorry for confusion.

BR
Jens

On 05.06.2012 18:50, Michael Tokarev wrote:
> On 05.06.2012 20:41, Jens Ott - Profitbricks wrote:
>> Michael
> []
>>> For now I see another _possible_ issue, which needs
>>> to be verified in d-i: this is the place which adds
>>> routes.  Neither debian default.script nor your script
>>> is able to add routes:
>>>
>>> # busybox ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0
>>> ip: RTNETLINK answers: No such process
>>
>> That can't work.
> 
> Sure, because the "gateway" 192.168.77.11 isn't reachable
> when the netmask is /32, this is exactly what I described
> (quoted below).
> 
>>  That's why my script sets the routers-variable to $ip
>> when netmask is "255.255.255.255".
> 
> And this does not work to.  I think you had a typo there.
> See:
> 
> [ "$subnet" = "255.255.255.255" ] && routers=$ip
> case "$1" in
>         renew|bound)
>                 if [ -n "$router" ] ; then
>                         for i in $router ; do
>                                 echo "Adding router $i"
>                                 route add default gw $i dev $interface metric $((metric++))
>                         done
>                 fi
> ..
> 
> 
> Note you're setting "routeS" while use "routeR".
> 
> This is why it should not work exactly the same way
> as current busybox's version!
> 
>> Somewhere in ARP-RFC it is defined that a router shall respond to
>> WHO-HAS requests where requester and sender is the same address. So you
>> actually set default-route to the assigned IP on /32-Assignments.
> 
> Well.  In this case, the DHCP server should just set router
> correctly, to be the same as client address, everything will
> Just Work (tm).
> 
> This is a good piece of information, and why I asked for a
> reproducer -- it didn't occur to me to use the same IP for
> router and client's own ip address, even if I know it might
> work exactly the way you describe by sending an ARP for everyhing.
> 
> The same can also be achieved by using not own's IP address
> but all zeros, like,
> 
>  ip route add default via 0.0.0.0 dev eth0
> 
> and this is even more correct, I think, this is equivalent
> of not specifying "via" at all.  Again, this can be set in
> the DHCP server.
> 
> I thought about a different case, when you actually specify
> some non-dummy gateway, it is not this case...
> 
> So, I guess, nothing should be fixed on the busybox/debian
> side, do you not agree? :)
> 
> Thank you!
> 
> /mjt
> 
>>> The same happens when using route(8) utility.  For this
>>> to work, two routes should be added: first to the gateway
>>> host, without the "via" part:
>>>
>>>  # busybox ip r add 192.168.77.11 dev dummy0
>>>
>>> and second is the actual default (or whatever) route going
>>> via that gateway, the regular way:
>>>
>>>  # busybox ip r add 10.255.0.0/28 via 192.168.77.11
>>>
>>> ("dev" is optional here, just like for the regular case).
>>>
>>> Alternative is to use the keyword "onlink":
>>>
>>>  # ip r add 10.255.0.0/28 via 192.168.77.11 dev dummy0 onlink
>>>
>>> but this does not work with busybox (yet).

[udhcp-script.tpl (application/vnd.groove-tool-template, attachment)]

Changed Bug title to 'enable routing via non-local gateways in dhcp client script' from 'busybox ip addr add ip.add.re.ss/32 does not work' Request was from <mjt@tls.msk.ru> to control@bugs.debian.org. (Mon, 09 Dec 2013 22:51:05 GMT) Full text and rfc822 format available.

Unset Bug forwarded-to-address Request was from <mjt@tls.msk.ru> to control@bugs.debian.org. (Sun, 26 Jan 2014 18:39:14 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 11:13:29 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.