<<

NAME

pf::floatingdevice - module to manage the floating network devices.

DESCRIPTION

pf::floatingdevice contains the functions necessary to manage the floating network devices. A floating network device is a device that PacketFence does not manage as a regular device.

This code was originally added to support mobile Access Points. When an AP is plugged, PacketFence should:

- let/allow all the MAC addresses that will be connected to the AP (disable mac-notifications and port-security traps)
- configure the port as multi-vlan (trunk) and set PVID and tagged VLANs on the port

When an AP is unplugged, PacketFence should reconfigure the port like before the AP was plugged

In order to simplify things at first, we decided that FLOATING NETWORK DEVICES SHOULD ONLY BE PLUGGED IN PORT CONFIGURED WITH PORT_SECURITY!

Here is how it works:

- floating network devices have to be identified using their MAC address (in conf/floating_network_device.conf)
- linkup/linkdown traps are not enabled on the switches, only port-security traps are.
- when PF receives a port-security violation trap, it checks if the device is a floating network device. if so, PF changes the port configuration so that:
- it disables port-security
- it sets the PVID
- it eventually sets the port as multi-vlan (trunk) and sets the tagged Vlans
- it enables linkdown traps
- when PF receives a linkdown trap, it checks if the last device plugged is a floating network device. If so, PF changes the port configuration so that:
- it enables port-security
- it disables linkdown traps

CONFIGURATION AND ENVIRONMENT

Read pf.conf and floating_network_device.conf configuration files.

SUBROUTINES

new

Get an instance of the pf::floatingdevice object

enablePortConfig

Change port configuration to disable port-security, set PVID and set port as multi-vlan if necessary

disablePortConfig

Reset port configuration to enable port-security and remove multi-vlan settings (if there are some)

disableMABFloating

Removes the MAB floating device mode on the switchport

enableMABFloating

Puts the switchport in MAB floating device mode

portHasFloatingDevice

Verifies if there is a floating device plugged into the switchport in the locationlog

disconnectCurrentDevices

Disconnects the active locationlog macs on the port so they reauthenticate to be controlled by the floating flow

AUTHOR

Inverse inc. <info@inverse.ca>

COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

<<