Microsoft Windows DHCP Team Blog

The world's most deployed DHCP Server! Deploy and discuss about your fav. server, here!

Use of BROADCAST (B) flag in dhcp...

Use of BROADCAST (B) flag in dhcp...

  • Comments 18
  • Likes
 

DHCP server or relay agent sending or relaying a DHCP message directly to a DHCP client  should examine the BROADCAST bit in the ’flags’ field. If this bit is set to 1, the DHCP message SHOULD be sent as an IP broadcast using an IP broadcast address as the IP destination address and the link-layer broadcast address as the link-layer destination address. If the BROADCAST bit is cleared to 0, the message SHOULD be sent as an IP unicast to the IP address specified in the ’yiaddr’ field and the link-layer address specified in the ’chaddr’ field.

 

By default, Windows Vista will start with BROADCAST(B) flag set to 1 which means DHCP Server or relay agent has to send reply to broadcast address. User can change this setting by defining REG_DWORD value DhcpConnForceBroadcastFlag under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID} registry key.

 

As a new enhancement, DHCP client in Windows Vista has incorporated intelligence to toggle between the two values of the broadcast flag to interop with routers that do not support the broadcast flag. Once the client is able to acquire an IP address from the DHCP server, it retains the state of flag throughout the lease time.

 

The toggle behavior will be controlled by a registry value “DhcpConnEnableBcastFlagToggle” under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}

 

In case the registry value is set to 1, the DHCP client will do the toggle and only one DORA sequence will be done during the acquisition phase.

 

The DHCP client will start afresh and send the broadcast flag in the DHCP DISCOVER packet with a value as controlled by the registry key. If it fails to get a response from the DHCP server within the allotted 1 min and the toggle flag is not disabled through registry, it will restart the DISCOVER process, this time toggling the broadcast bit sent in the packet. If the server is reachable this time, it will update the interface specific value of the flag in its cache to 1.  This will be used to determine whether or not the flag needs to be set in every subsequent DHCP packet till the next DORA cycle. In the next DORA cycle, the value of the broadcast bit will again be determined by the registry value configured by the admin (or 0 by default).

 

Update (November 05, 2008)

If you run into issues with your Vista installation being unable to get an IP Address via DHCP,   please send us the following information for further investigation:

Router Vendor,  Router/Gateway Model Number,   Firmware Version,  Your  Location (Country & State),   ISP.       You may send this information via email  to msnetworkteam_AT_live_DOT_com.

Thanks,

Ajay

Team Networking

Comments
  • Is there any reason why the broadcast flag was set to be enabled by default in Vista? I've found some of the major DHCP server vendors (Cisco in particular) do not support it. As such, Vista doesn't work with them without a registry edit. It seems to me that every major DHCP server on the market is capable of unicast but some don't implement the multicast. Wouldn't it be better to have this flag disabled by default then for maximum compatability? Is there some benefit to having it enabled that I've overlooked?

  • Is this flag also the same in the version of WinPE that is used in the WDS installation of Vista?

    I've found that whilst DHCP at PXE boot and with XP and Vista work just as expected, the version of WinPE used by WDS is not accepting what appear to be perfectly valid DHCP offer packets.  

    There is some subtle difference that is escaping me here...

  • Hi Govind,

    RFC1542, in sections 3.1.1 and 4.1.2, states that the broadcast flag was introduced as a workaround for old implementations (i.e., old in 1993), and that dhcp servers SHOULD (not MUST!) comply with that flag.

    So, does that mean Vista will also accept a unicast offer as a) it's a current OS and b) cannot rely on the server to actually broadcast the offer?

    Kind regards,

    Rolf

  • Roger,

    WinPE team has seen this happen on machines with NForce NICs that don’t have the latest firmware… in that case,  updating the firmware fixes the problem.

    Thanks,

    Govind

  • We have about 50 Vista Business machines currently deployed in our company. Funny enought these machines are being used by Microsoft Licensing Experts taking calls....

    The problem that we have is that the machines all of a sudden stopped getting IP addresses through DHCP. If you plug in an XP machine it gets it straight away. So what we had to do is set the flag to 0 for it to get an IP. This fix was supposed to be for non-microsoft and some wireless routers... our DHCP servers are up to date Windows 2003 servers... Any comment on that?

  • I have a newer cisco router, and when I try to get a dhcp address from it (have not changed any settings) I do not add the address to my connection.

    When I sniff this exchange, I see that I send the discover with the broadcast flag set, and then I get the offer, with the Your address field set, since its a new binding.  Next I send the request for that address back to the router, and the router sends the ack back to me.

    At this point, I look in the router, using "show ip dhcp binding" and I see this device in the database, but the Vista client (thinkpad laptop in my lab) does not show this as its IPV4 address.  Why does this not work the way it should.  I look at the ack from the router, versus when I do the same with a windows dhcp server, and there is not difference in the packets, other than the network they are associated with, and in one case, the vista machine accepts it and in the other it does not.

    I let this sit for 10 minutes and never got a usable address (note that at the beginning, I sent a dhcp request, not discover, because I already had a cached ip address for the other subnet I was testing with that the PC had used.  I also tried rebooting the vista pc, but still no dice with the cisco router.

    Looking at the captures I have, this is clearly a MSFT issue that needs to be properly and publicly addressed and fixed.  

    [MSFT] If the packets were exactly identical, then the client would have accepted either IP address. The probable cause of the behaviour you are seeing is that one of the options in the ACK message sent by the router must be incorrectly formatted wrt the RFC. This may be causing the client to consider the message as being misformed and drop the ACK message for security reasons.

  • This toggle stuff isn't working.  Is this an upcoming feature or already pushed out in an update?

    My Vista DHCP client isn't reversing the flag & retrying when DHCP doesn't succeed.

    Thx,

    ccarday@yahoo.com

  • I ran into this today with a client's desktop. What is the rationale for using a long deprecated feature?

  • I have heard that SP1 fixes the toggle thing, is it true?

  • it's been said many times already... work ariounds are not good, we need fixes, a form of detetion of the problem, and self-crrection, not a regisyry edit, and when I buy a new router , fix it agian. this mindless resolution of quick fixes  represnts a mentality of the new computer age. make problem goi away, instant gratification.. how about the senior approach.. fix the problem so it never ever happerns again. for anyone who is "up to date" on their fixes. as for 'if it aint broke dont fix it".. how about if i have a problem, it's a new one...rather than reinvinting the same round wheel.  

  • I'm a perfetionist.. is my ISP wrong in not corrceting the firmware in themodem.router they support? or is M/S willing to put out a realfix, rather than a procedure to set the flkag in the registry so it works for eeryone correctly,  defined as : never getting the msg about "public/network seeking, blah blah".

    I would prefer the isp fix the router and everyone fix their s/w and h/wm but realistically, couldn't M/S team just bite the bullit, and make the change for everyone a transoarent one, I for one am not happy to get into registry edits. p.s. can u answerr these quetsions above as well. please.

  • u have a typo above..

    realy agent has to sent reply to broadcast address.

                   should be

    RELAY agent... has to SEND...

    p.s. can u publish an UPDATE that adds & sets this flag for all my "connections" , so I don't have to use REGEDIT, please?

  • Hi H Berg,

    Yes we are already working towards such fix which will be kind of self –correction. I will let you know if the fix will be done for Vista and Vista SP1.

    Thanks

    Ranu

  • Hi Harold,

    Yes we are already working towards such fix which will be kind of self –correction. I will let you know if the fix will be done for Vista and Vista SP1.

    Thanks

    Ranu

  • hi Harold,

    Made the correction. Thanks for pointing it out. Also are you interested in some tool which will set the toggle bit or the broadcast bit for all interfaces? Please clarify that.

    Thanks

    Ranu

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment