DHCP, 802.1X, and the Default VLAN

Earlier this year I wrote about the basics of 802.1X with the default VLAN. I still believe it provides a great way to slowly coax users to 802.1X without forcing an instant migration as well as a nice way to integrate guests onto your network. Here’s an additional tip for how to work with the default VLAN when using a captive portal, I recommend reading my earlier post first if you haven’t already.

One wrinkle with the default VLAN has to do with DHCP and how tightly coupled it is with the 802.1X process. Ideally the 802.1X supplicant you use would automatically do a DHCP release / renew each time the 802.1X status changes on a port. This isn’t always the case though. I haven’t tested all supplicants yet but certainly some of them (Mac’s built-in supplicant for example) don’t do this. This leaves you with a sequence like this:

  1. Host connects to the network and is challenged with an EAPoL-Start message
  2. Host does not respond or user does not respond to the authentication request dialogue
  3. Authenticator places the host on the default VLAN at which point the host requests a DHCP address
  4. The user initiates the 802.1X authentication manually (after getting his morning coffee, etc.) and succeeds in authenticating
  5. The authenticator puts the host on a different VLAN since now a trusted user has authenticated
  6. The host now has no network connectivity because it still has the old DHCP address for the other VLAN

This is an example of the nascent nature of 802.1X supplicants in general. I can’t think of a valid reason why you wouldn’t do a release renew yet some still don’t. This has been a known issue for quite some time now. In fact I describe a more pernicious variation of this issue in my book:

During my testing, I found a lack of integration between the 802.1x client and the DHCP client in Microsoft Windows 2000 … By the time authentication by 802.1x occurred, the PC had already timed out its DHCP request and opted instead for a link local address (169.254.0.0/16). Though the user could manually go in and restart the DHCP process, for most users this will be infuriating. (343)

There is a reasonable workaround here though it isn’t quite ideal. When the user is placed on a default VLAN–as described in my earlier post–they can be sent through a captive portal device. This captive portal generally provides local DHCP services for the default VLAN as well. So one approach is to simply set the DHCP lease time quite short for these guest systems. Something between one and two minutes is probably appropriate. So now if you start up your 802.1X supplicant after being temporarily placed on the default VLAN, you will only have a short time to wait before the DHCP client gets the proper address.

If you wanted to get really slick you might increase the time of the lease based on the number of times it has been renewed–each renew increases your confidence that the host is actually a guest user. That may add more complexity than it is worth plus it isn’t like the DHCP process is particularly compute intensive, especially if the short lease only applies to guest users. (As an aside, I’m no DHCP expert so I’m not certain if this lease scaling can even be done.)

Regardless of the DHCP particulars this approach will provide a safety net for less than optimal supplicants when working in a network that implements the default VLAN. If you’ve had experience working with this in the field, I’d love to hear about how it went. We’re using this technique in the office here for guest users and according to IT and the guests I’ve talked with it works fairly well.

Technorati Tags: , , ,

6 Responses to “DHCP, 802.1X, and the Default VLAN”

  1. David Hyson Says:

    We’re running wired 802.1x on our campus with Enterasys equipment, and seem to have many of the same kind of issues. It sounds like in your implementation authorized supplicants don’t go through a default VLAN. In our, they do, and it’s caused quite a few issues. In particular, Netlogon was starting while the machine was still in “purgatory” and consequently getting a bad connection to the domain and not loading a mandatory profile. Even turning off XP fast-startup option didn’t fix it. I actually wrote a service that we now use here that delays the start of Netlogon until a machine gets a non-default IP. It helps quite a bit, but I think we’re going to try shortening the lease as well. Thanks for the insight. -DLH

  2. S. Yrneh Says:

    A problem im facing while implementing 802.1x…….. with guest vlan feature.
    A client connects to a 802.1x enabled port, and guest vlan is configured so it gets a IP address in the guest vlan. Then the client gets authenticated and move to the access vlan and since the port state changed the client will get a new IP address in the access vlan. However, if the client unauthenticates come back to the guest vlan, even though port state changed again the client does not release/renew its IP address.

    Anyone got any work around for this ?

  3. Sean Says:

    S.

    Can you be more specific when you say “the client unauthenticates”? Are they issuing an EAP-Logoff? Is the machine rebooted? Is link interrupted on the switch? Also, what supplicant and OS are you using?

    Thanks,

    Sean

  4. Pedro Alipio Says:

    In my point of view, the best solution for this issue should be the authentication server sending an DHCP FORCERENEW message (RFC3203) whenever an user logs in (802.1x). Unfortunately, RFC3203 is not supported by most of the DHCP servers and clients.

  5. Tim Says:

    We have issues with netlogon scripts on our XP SP2 systems too with our implementation of open vlan’s on our procurves

    Got around them using the following GPO settings:

    Computer Configuration (Enabled)
    Policies
    Administrative Templates
    Policy definitions (ADMX files) retrieved from the local machine.System/Logon
    Policy Setting Comment
    Always wait for the network at computer startup and logon Enabled

    System/Scripts
    Policy Setting Comment
    Run logon scripts synchronously Enabled

    Computer Configuration (Enabled)hide
    Policieshide
    Administrative Templates
    Policy definitions (ADMX files) retrieved from the local machine.System/Logon
    Policy Setting Comment
    Always wait for the network at computer startup and logon Enabled

    System/Scripts
    Policy Setting Comment
    Run logon scripts synchronously Enabled

    this works for the mapped drives but still cannot get a couple of .exe that run on via logon scripts to work (probably will just use registry keys)

    Also we use Domain users and Domain computers on the Radius side (which solves the issue of a new user logging into a computer for the first time and creating a profile).

    The newest issue which I am working on is the one mentioned here - some users do not release / renew their IP once authenticated on the Production VLAN. It only happens to some users.

    Anyone play around with disabling “fast reconnect” on the XP Supplicant?

    Tim

  6. Scott Says:

    I have the same issue. Does someone have a script that will automatically release and renew the dhcp ip address?

Leave a Reply