Many radios and routers and firmwares support Dynamic VLAN Assignment, It allows for the use of additional functionality, like NAC Software.
I have had sucess flashing mikrotik with openWRT to get the dynamicVLAN Assignment function, but it would be nice if mikrotik just included it
in their factory firmware... Their hardware already supports it..
Currently, VLAN assignment is performed using several different techniques.... These techniques are compatible one to another but not on the same switch port. This means that you can use the more secure and modern techniques for your latest switches and another technique on the old switches that doesn't support latest techniques. As it's name implies, VLAN assignment means that 3rd Party NAC Software is the server that assigns the VLAN to a device. This VLAN can be one of your VLANs or it can be a special VLAN where 3rd Party NAC Software acts as a DHCP/DNS/HTTP server where it runs the captive portal.
Compared to 3rd Party NAC Software legacy modes of operation (ARP and DHCP) VLAN assignment effectively isolate your hosts at the OSI Layer2 meaning that it is the trickiest method to bypass and is the one which adapts best to your environment since it glues into your current VLAN assignment methodology.
Using SNMP Traps
All switch ports (on which VLAN isolation should be done) must be configured to send SNMP traps to the 3rd Party NAC Software host. On 3rd Party NAC Software, we use snmptrapd as the SNMP trap receiver. As it receives traps, it reformats and writes them into a flat file: /usr/local/pf/logs/snmptrapd.log. The multithreaded pfsetvlan daemon reads these traps from the flat file and responds to them by setting the switch port to the correct VLAN. Depending on your switches capabilities, pfsetvlan will act on different types of SNMP traps. You need to create a registration VLAN (with a DHCP server, but no routing to other VLANs) in which 3rd Party NAC Software will put unregistered devices. If you want to isolate computers which have open violations in a separate VLAN, an isolation VLAN needs also to be created.
Link Change Traps
This is the most basic setup and it needs a third VLAN: the MAC detection VLAN. There should be nothing in this VLAN (no DHCP server) and it should not be routed anywhere; it is just an empty VLAN.When a host connects to a switch port, the switch sends a linkUp trap to 3rd Party NAC Software. Since it takes some time before the switch learns the MAC address of the newly connected device, 3rd Party NAC Software immediately puts the port in the MAC detection VLAN in which the device will send DHCP requests (with no answer) in order for the switch to learn its MAC address. Then pfsetvlan will send periodical SNMP queries to the switch until the switch learns the MAC of the device. When the MAC address is known, pfsetvlan checks its status (existing ? registered ? any violations ?) in the database and puts the port in the appropriate VLAN.
When a device is unplugged, the switch sends a 'linkDown' trap to 3rd Party NAC Software which puts the port into the MAC detection VLAN.When a computer boots, the initialization of the NIC generates several link status changes. And every time the switch sends a linkUp and a linkDown trap to 3rd Party NAC Software. Since 3rd Party NAC Software has to act on each of these traps, this generates unfortunately some unnecessary load on pfsetvlan. In order to optimize the trap treatment, 3rd Party NAC Software stops every thread for a 'linkUp trap' when it receives a 'linkDown' trap on the same port. But using only linkUp/linkDown traps is not the most scalable option. For example in case of power failure, if hundreds of computers boot at the same time, 3rd Party NAC Software would receive a lot of traps almost instantly and this could result in network connection latency…
MAC notification traps
If your switches support MAC notification traps (MAC learnt, MAC removed), we suggest that you activate them in addition to the linkUp/linkDown traps. This way, pfsetvlan does not need, after a linkUp trap, to query the switch continuously until the MAC has finally been learned. When it receives a linkUp trap for a port on which MAC notification traps are also enabled, it only needs to pot the port in the MAC detection VLAN and can than free the thread. When the switch learns the MAC address of the device it sends a MAC learnt trap (containing the MAC address) to 3rd Party NAC Software.
Port Security Traps
In its most basic form, the Port Security feature remembers the MAC address connected to the switch port and allows only that MAC address to communicate on that port. If any other MAC address tries to communicate through the port, port security will not allow it and send a port-security trap.
If your switches support this feature, we strongly recommend to use it rather than linkUp/linkDown and/or MAC notifications. Why ? Because as long as a MAC address is authorized on a port and is the only one connected, the switch will send no trap whether the device reboots, plugs in or unplugs. This drastically reduces the SNMP interactions between the switches and 3rd Party NAC Software.
When you enable port security traps you should not enable linkUp/linkDown nor MAC notification traps.
Wired: 802.1X + MAC Authentication Bypass (MAB)
802.1X provides port-based authentication, which involves communications between a supplicant, authenticator (known as NAS), and authentication server (known as AAA). The supplicant is often software on a client device, such as a laptop, the authenticator is a wired Ethernet switch or wireless access point, and the authentication server is generally a RADIUS database.
The supplicant (i.e., client device) is not allowed access through the authenticator to the network until the supplicant’s identity is authorized. With 802.1X port-based authentication, the supplicant provides credentials, such as user name / password or digital certificate, to the authenticator, and the authenticator forwards the credentials to the authentication server for verification. If the credentials are valid (in the authentication server database), the supplicant (client device) is allowed to access the network. The protocol for authentication is called Extensible Authentication Protocol (EAP) which have many variants. Both supplicant and authentication servers need to speak the same EAP protocol. Among popular ones are EAP-MD5, PEAP-MsCHAPv2 (used by Windows for authentication against Active Directory) or EAP-TLS.
In this context, 3rd Party NAC Software runs the authentication server (a FreeRADIUS instance) and will return the appropriate VLAN to the switch. A module that integrates in FreeRADIUS does a remote call to the 3rd Party NAC Software server to obtain that information. More and more devices have 802.1X supplicant which makes this approach more and more popular.
MAC authentication bypass (MAB) is a new mechanism introduced by some switch vendor to handle the cases where a 802.1X supplicant does not exist. After a timeout period, the switch will stop trying to perform 802.1X and will fallback to MAB. It has the advantage of using the same approach as 802.1X except that the MAC address is sent instead of the user name and that there is no end-to-end EAP conversation (no strong authentication). Using MAB, devices like network printer or non-802.1X capable IP Telephones (IPT) can still gain access to the network and the right VLAN.
Right now this integration is not pleasant as it could be involving manual modification of our FreeRADIUS module but our latest unreleased code already handles 802.1X + MAB built into the 3rd Party NAC Software main configuration. If you are adventurous feel free to try it out.
Introduction to Wireless Integration
Wireless 802.1X works pretty much like wired 802.1X and MAC authentication is like MAB. Where things change is that the 802.1X is used to setup the security keys for encrypted communication (WPA2-Enterprise) while MAC authentication is only used to authorize allow or disallow a MAC on the wireless network.
3rd Party NAC Software integrates very well with wireless networks. As for its wired counterpart, the switch, a wireless Access Points (AP) needs to implement some specific features in order for the integration to work perfectly. In particular, the AP needs to support
several SSIDs with several VLANs inside each SSID
authentication against a RADIUS server
dynamic VLAN assignment (through RADIUS attributes)
SNMP deauthentication traps
the deauthentication of an associated station
We can then configure two SSIDs on the AP, the first one reserved for visitors and unregistered clients. In this SSID, communications will not be encrypted and users will connect either to the registration VLAN or the guest VLAN (depending on their registration status). Users can register and get assistance to configure their access to the secure SSID using the captive portal which requires authentication and runs over HTTPS. The second SSID will allow encrypted communications for registered users.