Re: [dhcwg] Any documentation for handling /32 IPv4 assignments from DHCP?

Matthew Dempsky <matthew@dempsky.org> Fri, 06 December 2013 19:59 UTC

Return-Path: <matthew@dempsky.org>
X-Original-To: dhcwg@ietfa.amsl.com
Delivered-To: dhcwg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C1A681AE0A0 for <dhcwg@ietfa.amsl.com>; Fri, 6 Dec 2013 11:59:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8EahA6ujiA0W for <dhcwg@ietfa.amsl.com>; Fri, 6 Dec 2013 11:59:24 -0800 (PST)
Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by ietfa.amsl.com (Postfix) with ESMTP id 145181AE06F for <dhcwg@ietf.org>; Fri, 6 Dec 2013 11:59:23 -0800 (PST)
Received: by mail-lb0-f180.google.com with SMTP id w6so472558lbh.11 for <dhcwg@ietf.org>; Fri, 06 Dec 2013 11:59:19 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4iXarbHUoB5pZQMEpT+aGyOLh9c+1WOlhuxHrTgxgv8=; b=cjdf8l6Q6gKOOhIXZAeGzaJEyiPaYYBq82K3yvDsQ/qqFumVVejtkIOXn/0ihEjgU1 cMjGvkevpwVe0K90cezaP115RioNNykWUwShVSZxk5bMCcO90ANxBDyxw3yuduWlVT2A WSjnhEr+rNSlvt2nBrSu6ga9rlsLEnONP91tCxgEfxBARsS43JSTyBVBp4sm5qKMVnD9 jETQXXzrGKFxZRBKb25HH/6dZ49T5c9G08Drvz3fYnC5DeRUAVo2xecqfIcT4ACP4SQz 6ds5LhdPXRkvaVLL5O4d/KM8nnw9yavXG3xjMBG7RSHGoMjo+sdNGJVZNmisecmwvlGp NJsA==
X-Gm-Message-State: ALoCoQk4FdKiZKQcRzvnpwAVQQ9lk7KDTrIvN+gd7BZmQnBSQJX/svN8OTL3zUTqERASNAZjI8IU
MIME-Version: 1.0
X-Received: by 10.112.92.112 with SMTP id cl16mr1322248lbb.15.1386359959390; Fri, 06 Dec 2013 11:59:19 -0800 (PST)
Received: by 10.152.22.132 with HTTP; Fri, 6 Dec 2013 11:59:19 -0800 (PST)
In-Reply-To: <52A1F936.3040902@gmail.com>
References: <CANKkrzEew4WtYpa33GL3QB-8Wd8jGZTEv5djkOr9LbOMa7+icw@mail.gmail.com> <52A1F936.3040902@gmail.com>
Date: Fri, 06 Dec 2013 11:59:19 -0800
Message-ID: <CANKkrzFTaD8=bMb0EX7k48tmuj1VSZfbwr+5GO0H_0k-_6VJ-Q@mail.gmail.com>
From: Matthew Dempsky <matthew@dempsky.org>
To: Alexandru Petrescu <alexandru.petrescu@gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: dhcwg@ietf.org
Subject: Re: [dhcwg] Any documentation for handling /32 IPv4 assignments from DHCP?
X-BeenThere: dhcwg@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <dhcwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dhcwg/>
List-Post: <mailto:dhcwg@ietf.org>
List-Help: <mailto:dhcwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 19:59:25 -0000

On Fri, Dec 6, 2013 at 8:20 AM, Alexandru Petrescu
<alexandru.petrescu@gmail.com> wrote:
> First, I am not sure why this script is written that way.  When a router
> address is allocated by DHCP ('option routers') it is typically a default
> router, and hence it must have that 'default' qualifier in the subsequent
> route add command.  The first lines of the script would be nonsense.

Oh, sorry, I should have provided some more background information.

On Linux, a command like "route add -host 5.6.7.8 dev eth0" tells the
Linux kernel that IP address 5.6.7.8 is directly addressable via eth0,
even if there's no otherwise appropriate IP/netmask assignment on eth0
that includes 5.6.7.8.

E.g., the network I'm trying to connect to is giving a DHCP lease like
"IP: 1.2.3.4, Subnet Mask: 255.255.255.255, Router: 5.6.7.8".  The
issue is if you simply configure the interface like

    ifconfig eth0 inet 1.2.3.4 netmask 255.255.255.255
    route add default 5.6.7.8

then there's no existing route for 5.6.7.8, so the default route is
rejected as invalid.

ISC DHCP has that extra netmask==255.255.255.255 check so that it
instead executes

    ifconfig eth0 inet 1.2.3.4 netmask 255.255.255.255
    route add -host 5.6.7.8 dev eth0
    route add default 5.6.7.8

which allows the default route to then be added successfully, because
5.6.7.8 is now reachable via eth0 (using srcip 1.2.3.4).  Effectively,
eth0 is now treated as a point-to-point network consisting of only
1.2.3.4 and 5.6.7.8.

> I wonder whether those two lines above have anything to do with IPv4 Subnet
> Allocation RFC6656 "Description of Cisco Systems' Subnet Allocation Option
> for DHCPv4" INFORMATIONAL.

I don't think so.  The network I'm using doesn't send a DHCP response
with option 220, and ISC DHCP doesn't appear to support it either.

> Maybe one would ask the author of that script why did s/he write it that
> way?  Does the script have a author name in the head.

I'll try tracking down an ISC DHCP author.  (I was kinda hoping maybe
one would be on dhcwg.)

Thanks