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:
- Enable 802.1x authentication on the switch (global configuration).
- Configure the RADIUS server(s) to which the switch will communicate for authentication requests.
- 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:
- From the File menu, choose “New 802.1X Connection…â€.
- Specify a description and choose the appropriate network port (typically “Built-in Ethernetâ€).
- Specify a username and password.
- For authentication types, click to enable MD5 and move it to the top of the list. Uncheck all other authentication types.
- 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: Cisco, IOS, Macintosh, Networking, Security


12 comments
Comments feed for this article
Trackback link
http://blog.scottlowe.org/2006/12/07/8021x-integration-with-active-directory/trackback/
Thursday, December 7, 2006 at 5:31 pm
Pingback from Configure 802.1x with Active Directory for a Mac « Scotsman on a Horse
Tuesday, March 20, 2007 at 4:10 pm
jose
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?
Tuesday, March 20, 2007 at 8:48 pm
slowe
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!
Monday, March 26, 2007 at 4:57 am
andrea
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
Monday, March 26, 2007 at 8:09 am
slowe
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!
Friday, August 17, 2007 at 4:15 am
Adam
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.
Tuesday, August 21, 2007 at 11:59 am
slowe
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.
Wednesday, November 21, 2007 at 11:49 am
stas
How would I authenticate into corporate wireless network using certificate stored on a virtual Windows XP guest machine?
Wednesday, November 21, 2007 at 12:03 pm
slowe
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.
Tuesday, January 29, 2008 at 6:18 pm
Dav e
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?
Tuesday, January 29, 2008 at 7:57 pm
slowe
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!
Monday, February 18, 2008 at 2:25 am
Mike
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!