How to get a fast zero-config (APIPA) IP address assignment at link start?

Discussion in 'Wireless Networking' started by robin, Jan 23, 2006.

  1. robin

    robin Guest

    I would like to force a newly connected Ethernet link to use a zero-config
    derived
    IP address (aka APIPA) instead of DHCP assigned address (in other words the
    169.256.xxx.xxx
    link is preferred). There is a lot of info on the net about the
    complementary case
    of disallowing/defeating zero-config IP addresses, nothing that I have been
    able
    to find on for my situation.

    The problem is that Windows serializes the link configuration through the
    DHCP client
    on Windows before attempting to any zero-config options. The DHCP client
    requires
    60-second timeout which is far too long to mobile product users to wait for
    the link
    to become "usable".

    Does anyone know of a way to coersce the Windows DHCP client into stop and
    allow
    the zero-config to run? Any suggestion or hacks, gentle or harsh, are
    solicited.
    :)
     
    robin, Jan 23, 2006
    #1
    1. Advertisements

  2. This is relevant: http://support.microsoft.com/kb/220874. It suggests
    that you configure the adapter to use an autonet address manually. You
    might also consider putting a DHCP server on the network. This can be done
    via Windows2003 Server, a cheap router, or 3rd part DHCP server software.

    If you would, let me know about the scenario where you want to do this.
    It seems like everywhere I go, there's a DHCP server ready. Maybe if I was
    in a plane connecting straight to another person's laptop I might want to
    use an autonet address. It wouldn't seem worth working around the delay in
    this case.
     
    Frank Schwieterman [MSFT], Jan 25, 2006
    #2
    1. Advertisements

  3. robin

    robin Guest

    The problem is that this device is a mobile device and plugs into a host
    WindowsXP machine via USB, and presents a NIC with a virtualized network
    behind the NIC.

    While its technically possible to run a DHCP server on this virtualized
    network, this technique is seen as a barrier by corporate IT customers.
    These customers generally do not want to see DHCP servers pop-up on their
    networks turf.
    This product technically extends the corporate network (some small amount),
    and they see adding un-administrated DHCP servers as an administrative
    problem. Each DHCP server represents the yet another security surface and
    the potential for breach: its better to not use DHCP when zero-config would
    suffice.

    Our product doesn't really need an DHCP-dispensed address, just a valid IP
    address, dispensed quickly at USB-plug-in-time.
    Zero-config should work just fine as a substitute for DHCP in our case,
    except for the 60-second wait for the Windows DHCP client to timeout.



     
    robin, Jan 25, 2006
    #3
  4. robin

    robin Guest

    BTW, thanks for the pointer to the article.


     
    robin, Jan 25, 2006
    #4
  5. Sorry to be so slow getting back to this...

    Did you consider configuring a static IP address? I imagine it might be
    undesirable due to the configuration overhead, but I suspect the same amount
    of configuration overhead would be expected to prevent the DHCP timeout.


    --
    Frank Schwieterman [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights.


     
    Frank Schwieterman [MSFT], Feb 18, 2006
    #5
  6. robin

    jan4321

    Joined:
    Apr 5, 2018
    Messages:
    1
    Likes Received:
    1
    12 years late to the party, but maybe still useful to somebody...

    In order to shorten the DHCP timeout in Windows XP and thus have faster APIPA, one has to edit the DHCP Client Service dll found at:
    %windir%\System32\dhcpcsvc.dll

    The value of byte 000184D9 is the number of DHCP DISCOVER attempts:
    01: ~4sec
    02: ~12sec
    03: ~28sec
    04: ~60sec (default)

    Code:
    dhcpcsvc.dll 5.1.2600.5512 (xpsp.080413-0852) (Windows XP SP3)
    
    Address     Hex dump        Command
    000184C5    E8 0483FEFF     CALL 000007CE
    000184CA    2B45 D8         SUB EAX,DWORD PTR SS:[EBP-28]
    000184CD    59              POP ECX
    000184CE    8983 90010000   MOV DWORD PTR DS:[EBX+190],EAX
    000184D4    8B45 F4         MOV EAX,DWORD PTR SS:[EBP-0C]
                    +--+
    000184D7    83F8|04|        CMP EAX,4
                    +--+
    000184DA    8945 E0         MOV DWORD PTR SS:[EBP-20],EAX
    000184DD    0F82 FDFEFFFF   JB 000183E0
    000184E3    6A 79           PUSH 79
    000184E5    58              POP EAX
    000184E6    5F              POP EDI
     
    Last edited: Apr 5, 2018
    jan4321, Apr 5, 2018
    #6
    Ian likes this.
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.