I’m attempting to setup 802.1x authentication on switch ports so that when a 
user connects into a specific port on a Cisco Switch it will authenticate via 
packetfence’s local radius database.  I’ve followed the guide which is rather 
confusing because there are multiple methods listed.  I’ve attached my switch 
and packetfence configs.  I’ve also attached some log file grabs.  So, my 
presumption on how this is suppose to work is that a user plugs into the 
network port, the user is prompted for a username and password.  They enter 
their credentials and if a user exists in the database, based upon the role it 
applies the correct vlan.  I’m also to believe that packetfence also associates 
the mac address of your device with the user in the database for future 
connections which would be Mac Address Bypass?  So, the issue I seem to have is 
the username is passed to packetfence, but it never does the association to 
pass the correct vlan based upon role back to the switch.  If I manually 
through the packetfence gui associate the mac address of my device to my test 
username it works fine.  If I don’t perform that manual bypass it always puts 
me in the unregistered vlan.

My username in the database is koonstest and has a role of Engineering which 
should pass down VLAN 112.  

**NOTE: I removed all tacacs/radius keys …
I also have a separate server currently provide tacacs auth for ssh/telnet 
access to the switch.

2960 config:

aaa new-model
!
!
aaa group server radius packetfence
 server 10.0.38.18 auth-port 1812 acct-port 1813
!
aaa authentication login telnet group tacacs+ line
aaa authentication dot1x default group packetfence
aaa authorization exec default if-authenticated none 
aaa authorization commands 1 default group tacacs+ if-authenticated 
aaa authorization commands 5 default group tacacs+ if-authenticated 
aaa authorization commands 15 default group tacacs+ if-authenticated 
aaa authorization network default group packetfence 
aaa accounting update newinfo
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 0 default start-stop group tacacs+
aaa accounting commands 1 default start-stop group tacacs+
aaa accounting commands 15 default start-stop group tacacs+
!
aaa server radius dynamic-author
 client 10.0.38.18 server-key 7 mysecretkey
 port 3799
 !
 aaa session-id common
 !
dot1x system-auth-control
!
!
interface GigabitEthernet0/2
 description Test 802.1x port
 switchport mode access
 authentication order dot1x
 authentication priority dot1x
 authentication port-control auto
 authentication periodic
 authentication timer restart 10800
 authentication timer reauthenticate 10800
 authentication violation replace
 no snmp trap link-status
 dot1x pae authenticator
 dot1x timeout quiet-period 2
 dot1x timeout tx-period 3
 no cdp enable
 !
 tacacs-server host 10.0.12.35
tacacs-server directed-request
tacacs-server key 7 mytacacskey
radius-server host 10.0.38.18 auth-port 1812 acct-port 1813 key 7 mysecretkey
radius-server key 7 mysecretkey
radius-server vsa send authentication
!!

——Packetfence configs and logs———

switch config
[10.0.38.40]
description=Test 2960
group=SECTV2960
controllerIp=10.0.38.40
mode=production

[group SECTV2960]
description=Default 2960 Values
registrationVlan=154
guestVlan=154
ExternalPortalEnforcement=Y
defaultVlan=4094
deauthMethod=RADIUS
EngineeringVlan=112
type=Cisco::Catalyst_2960G
radiusSecret=mysecretkey
coaPort=3799
disconnectPort=3799
SNMPCommunityRead=1two3
SNMPVersion=2c
RoleMap=N
inlineVlan=4094
macDetectionVlan=4094
isolationVlan=4094
voiceVlan=4094


Packetfence radius.log
Tue Mar  7 10:39:02 2017 : Auth: (8)   Login OK: [koonstest] (from client 
10.0.38.40 port 50002 cli a8:20:66:33:7b:22 via TLS tunnel)
Tue Mar  7 10:39:02 2017 : [mac:a8:20:66:33:7b:22] Accepted user:  and returned 
VLAN 154
Tue Mar  7 10:39:02 2017 : Auth: (9) Login OK: [koonstest] (from client 
10.0.38.40 port 50002 cli a8:20:66:33:7b:22)

packetfence.log
Mar 07 10:39:02 httpd.aaa(13880) INFO: [mac:a8:20:66:33:7b:22] handling radius 
autz request: from switch_ip => (10.0.38.40), connection_type => 
Ethernet-EAP,switch_mac => (00:1c:0f:4b:bd:82), mac => [a8:20:66:33:7b:22], 
port => 10102, username => "koonstest" (pf::radius::authorize)
Mar 07 10:39:02 httpd.aaa(13880) INFO: [mac:a8:20:66:33:7b:22] Instantiate 
profile default (pf::Portal::ProfileFactory::_from_profile)
Mar 07 10:39:02 httpd.aaa(13880) INFO: [mac:a8:20:66:33:7b:22] is of status 
unreg; belongs into registration VLAN (pf::role::getRegistrationRole)
Mar 07 10:39:02 httpd.aaa(13880) INFO: [mac:a8:20:66:33:7b:22] (10.0.38.40) 
Added VLAN 154 to the returned RADIUS Access-Accept 
(pf::Switch::returnRadiusAccessAccept)

Eric Koons
Sr. Network Engineer | CCNA: Routing and Switching
Service Electric Cable TV and Communications | www.sectv.com 
<http://www.sectv.com/>
[email protected] <mailto:[email protected]>
Office: 610-841-8355
Mobile: 610-533-6834
Fax: 610-797-2445

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to