802.1x Integration with Active Directory

The idea behind 802.1x is to provide Layer 2 authentication; that is, to authenticate LAN clients at the Ethernet layer.  (This is before the client gets a DHCP lease or anything of that nature.)  With 802.1x in place, rogue users can’t just tap into a physical connection on the network.  In order to gain network connectivity, the device must authenticate before network traffic is allowed.

The idea here is to configure 802.1x authentication on a network switch in such a way as to leverage the existing authentication infrastructure provided by Active Directory.  Like it or not, Active Directory is a widely deployed directory service and leveraging it where we can will certainly provide an advantage.  This process uses RADIUS to provide an interface between a Cisco Catalyst 3560G switch (the 802.1x authenticator in this scenario) and Active Directory.  I could only test Mac OS X as the client (or 802.1x supplicant), but I’m confident that the configuration will work equally well with Windows XP Professional.

Configuring the Cisco Catalyst 3560G

The Catalyst switch I used in this configuration was running IOS 12.2(25); please note that the commands listed here may be different in different versions of IOS.

To configure the switch for 802.1x authentication, three steps are involved:

  1. Enable 802.1x authentication on the switch (global configuration).
  2. Configure the RADIUS server(s) to which the switch will communicate for authentication requests.
  3. Enable 802.1x authentication on the individual ports.

(This document from the Cisco web site was tremendously helpful in configuring 802.1x.)

First, to enable 802.1x authentication on the switch, use the following commands in global configuration mode:

aaa new-model
aaa authentication dot1x default group radius
aaa authorization network default group radius
dot1x system-auth-control

This enables 802.1x globally on the switch, but none of the interfaces are enabled for 802.1x authentication.  Next, we configure the RADIUS server(s) to which the switch will pass the 802.1x authentication traffic.  That’s handled with these commands in global configuration mode:

radius-server host 10.1.1.254 auth-port 1645
acct-port 1646 key Password

(This should all be on one line.)  Note that the “auth-port” and “acct-port” parameters are only necessary if you are using nonstandard ports.  Since Microsoft’s IAS (Internet Authentication Service, which provides the RADIUS interface to Active Directory) uses both sets of standard ports (1645/1812 and 1646/1813) you won’t need to specify these parameters.  The “key” parameter is a shared secret key between the RADIUS client (the switch) and the RADIUS server.  Obviously, you’ll want to use something other than “Password”.

Finally, to enable 802.1x on the applicable interfaces, you’ll use these commands in interface configuration mode:

int gi0/23 (or whatever interface you want to configure)
dot1x port-control auto

That enables 802.1x authentication on that specific port.  Repeat the process for all ports that should use 802.1x authentication.  Note that some ports can’t be enabled for 802.1x authentication; most notably, trunk ports can’t be used for 802.1x.  Refer to the Cisco documentation (or the documentation from your particular vendor) for complete details on the limitations.

Now that the switch is configured, we move on to configuring Active Directory.

Configuring Active Directory and IAS

I suppose that saying we need to “configure Active Directory” isn’t entirely accurate, since no configuration changes and no schema extensions are necessary to make this work.  All that really needs to be done is to enable reversible password encryption (which can be done on a per-user basis) and setup Internet Authentication Service (IAS).

First, regarding reversible password encryption:  The configuration described here uses MD5 hashes (passwords) to authenticate clients to the network.  There are other methods, such as digital certificates, to accomplish the same thing, and I’ll probably revisit this configuration again at a later date to look at using those.  For now, though, the use of MD5 for authentication means that we have to enable reversible password encryption for every user that will need to authenticate via 802.1x, and those users will need to change their passwords after that change is made.  A pain, yes, and a potential security concern, yes, but necessary at this point.  (I won’t bother going through the details of enabling reversible password encryption here; there are plenty of resources available on the Internet, like this one, that provide that information.)

Configuring IAS is really pretty straightforward.  I’ve discussed the use of IAS before (here in discussing Cisco PIX-AD integration and here regarding WatchGuard Firebox-AD integration), and I’ll refer you back to those articles for some of the basics on setting up and configuring IAS.

To configure IAS in this instance (once it has been installed and registered with Active Directory), we’ll do the following:

  • Add the Cisco Catalyst switch as a RADIUS client.  We’ll need to be sure to specify the same shared secret as used in the switch configuration.
  • We’ll create a new remote access policy.  The conditions on the policy should be “NAS-Port-Type” (set to Ethernet) and “Windows-Groups” (set to whatever group should be allowed to authenticate via 802.1x; I used Domain Users).
  • The profile associated with this policy should be edited to note only the EAP MD5 authentication type (under “EAP Methods” on the Authentication tab); all other authentication types should be unchecked.  In addition, all encryption types on the Encryption tab should be unchecked except for “No encryption”.

At this point, the IAS configuration should be complete.  Now for the final step:  configuring the client to use 802.1x.

Configuring the Client (Mac OS X)

As mentioned earlier, I didn’t have a physical Windows XP Professional-based machine to test with, but I did do some testing with Mac OS X.  Although the software used to configure the operating system is different, the overall configuration is similar and should work without any major hitches on Windows XP.

To configure Mac OS X, launch the Internet Connect software in the Applications folder and follow these steps:

  1. From the File menu, choose “New 802.1X Connection…”.
  2. Specify a description and choose the appropriate network port (typically “Built-in Ethernet”).
  3. Specify a username and password.
  4. For authentication types, click to enable MD5 and move it to the top of the list.  Uncheck all other authentication types.
  5. Click OK to save the connection.

Once the connection has been defined, you can plug your OS X-based system into one of the 802.1x-enabled ports and click “Connect” in the Internet Connect window.  If everything is configured correctly, you should be connected and be able to pass network traffic without any issues.  If things don’t work, go back and check the switch configuration and the logs on the IAS/RADIUS server.  In particular, the logs may indicate that an incorrect password was used, or you may be able to determine that the switch isn’t even talking to the IAS/RADIUS server (perhaps a typo in the server address?).

By the way, configuring Mac OS X to use 802.1x for wireless connections is equally easy and done the same way (using Internet Connect).  I used to regularly use my MacBook Pro in an environment that used 802.1x and EAP-FAST/LEAP for wireless authentication with no problems.

Future enhancements to this configuration include switching from EAP-MD5 to something like EAP-TLS or PEAP; this will avoid the need to enable reversible password encryption on the domain.

Tags: , , , ,

  1. jose’s avatar

    Scott,

    I was wondering if you know how to start the 802.1x supplicant on OSX AT STARTUP? If authenticating users to AD, or any database, you have to already login to get a network connection. If however, you reboot the machine you loose the connection.

    Is it possible to start the supplicant at startup with a default set of credentials? This would give you a connection on boot. This allows authentication via AD at login; without it your mac can’t authenticate to the AD server.

    Any ideas?

  2. slowe’s avatar

    Jose,

    I am not aware of any way to start the supplicant at startup. If I come across any additional information on how to do this, I’ll be sure to post something here; likewise, let me know if you find anything so that I can let other readers know and give you the credit for finding the solution.

    Thanks!

  3. andrea’s avatar

    hi scott, sorry could not find a button to send you an email. just a question, read something about the xc connect sharefolder system. have you ever tried it out? i was looking for an summary if you finally suggest or not on your page but never found it.

    best from berlin. andrea

  4. slowe’s avatar

    Andrea,

    Sorry, thought I posted a follow-up on XC Connect. I ended up not using it because the server-side software was just too buggy. It kept crashing repeatedly, taking down the entire OS with it when it crashed. Had the server-side software been more reliable, I probably would have purchased the full version and continued using it; it worked pretty well when it was running.

    Hope this helps!

  5. Adam’s avatar

    Hi,

    I would like to know whether I can enable 802.1X in a switch command using MAC Address of the PC, instead of using port number. This is because I am unable to locate which port number is connected to a PC. What I know is only the PC’s MAC Address. Thanks.

  6. slowe’s avatar

    Adam,

    As far as I know, you’ll need to know the port to which the PC is connected. There may be a way to search the switch’s MAC address table to find which port that is, but in the end you’ll still need to know the port number.

  7. stas’s avatar

    How would I authenticate into corporate wireless network using certificate stored on a virtual Windows XP guest machine?

  8. slowe’s avatar

    Stas,

    As far as I know, you can’t use port-level 802.1x authentication with virtualization because multiple virtual machines share the same physical port–authorizing one virtual machine could potentially authorize all virtual machines on that same port.

  9. Dav e’s avatar

    Scott, have you been able to get a linux host connect to the MS 802.1x wireless network? I am guessing that if you can get the Mac client to connect, it is possible with linux?

  10. slowe’s avatar

    Dave,

    Honestly, I’ve never tried. I would imagine that it is possible, but as to the difficulty I have no idea. If you manage to make it work, let me know!

  11. Mike’s avatar

    Man… After 4 hours of fighting with AAA and IAS I finally have it working! I’m using a 2950 and a Windows 2003 server. All the configs I read seem to miss the part about enabling reverse password encryption in AD!!!

    I wanted to comment about connecting with virtual machines. I’m studying for my CCNP BCMSN exam and there is an option that someone might find useful in the book.

    switch(config-if)#dot1x host-mode mutli-host

    This allows more than 1 host to be connected on a single switchport. 1 Host authenticates and the others are then allowed to work. Not exactly how I expected it to work but maybe someone will use it.

    As an example I have my Macbook Pro plugged into FA0/9 of my 2950 switch. I have 802.1x enabled and it authenticates me.

    Now I fire up XP in vmware with shared networking and its able to communicate without any kind of dot1x authentication.

    I tested the reverse and it works which I thought was cool.

    Boot up the Mac and don’t set it to authenticate, port stays orange. Then boot up XP and setup dot1x authentication. It will authenticate the switchport and then the mac side networking will start working.

    Have fun!

  12. Edward’s avatar

    I would like to share my experience for implementing 802.1x on win-XP.
    Before 802.1x authenticate the applicant(PC), win-XP can not communicate with DC due to switch port was in un-authenticated status. Therefore, user can not be authenticated by AD. I found “Cisco secure service client” provide the function that enable win-XP authenticate by 802.1x then send the login credential to AD for windows authentication. This solve the problem between chicken and egg :=).

  13. capcorne’s avatar

    Hi all,

    I deployed this in our network. I used IAS, EAP-PEAP and AD integration as well with XP SP3 client. Pay attention, the configuration of XP SP3 for 802.1x is completely diffrent from SP2. I writed all the steps here

    Have fun !

  14. Andrew’s avatar

    Hi Scott:
    Like Jose, I’m trying to get Macs to authenticate wirelessly at startup. Everything I’ve found to date indicates that it should work. So far I can get it to work by logging on to the local admin account, connecting to the wireless network, then logging off. All bets are off if the laptops (aluminum MacBooks running 10.5.7) are restarted. Has anything changed to allow the supplicant to run at startup?

    Andrew

  15. nelson’s avatar

    Hi,

    I have a doubt on how 802.1x works, let´s say your radius server is dead or become offline, is it possible to bypass and used normal authentication without 802.1x at switch level, something like if radius server alive then 802.1x else use standard. Otherwise your network become off line (assuming there is no backup for radius)