Summary of the Issue:
In your Univention template, the LDAP attribute for the VLAN ID is written as univentionVlanId (with a lowercase “L”), but the FreeRADIUS server expects univentionVLanId (with an uppercase “L”).
This mismatch causes the LDAP query to fail to find the VLAN ID, even though the user (PC81$) is correctly a member of the vlan201 group. As a result, the Tunnel-Private-Group-ID is not included in the Access-Accept packet, and the switch does not know which VLAN to assign to the client.
Affected Code Lines:
In the post-auth section of your configuration (/etc/freeradius/3.0/sites-enabled/default), the following lines are affected:
Incorrect (with lowercase “L”):
if ("%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVlanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVlanId=*)(univentionNetworkAccess=1))}") {
update reply {
Reply-Message := "DEBUG: Assigning VLAN-ID from user / computer object"
Tunnel-Type := VLAN
Tunnel-Medium-Type := IEEE-802
Tunnel-Private-Group-ID := "%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVlanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVlanId=*)(univentionNetworkAccess=1))}"
}
}
Correct (with uppercase “L”):
if ("%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVLanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVLanId=*)(univentionNetworkAccess=1))}") {
update reply {
Reply-Message := "DEBUG: Assigning VLAN-ID from user / computer object"
Tunnel-Type := VLAN
Tunnel-Medium-Type := IEEE-802
Tunnel-Private-Group-ID := "%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVLanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVLanId=*)(univentionNetworkAccess=1))}"
}
}
Summary of the Issue:
In your Univention template, the LDAP attribute for the VLAN ID is written as univentionVlanId (with a lowercase “L”), but the FreeRADIUS server expects univentionVLanId (with an uppercase “L”).
This mismatch causes the LDAP query to fail to find the VLAN ID, even though the user (PC81$) is correctly a member of the vlan201 group. As a result, the Tunnel-Private-Group-ID is not included in the Access-Accept packet, and the switch does not know which VLAN to assign to the client.
Affected Code Lines:
In the post-auth section of your configuration (/etc/freeradius/3.0/sites-enabled/default), the following lines are affected:
Incorrect (with lowercase “L”):
if ("%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVlanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVlanId=*)(univentionNetworkAccess=1))}") {
update reply {
Reply-Message := "DEBUG: Assigning VLAN-ID from user / computer object"
Tunnel-Type := VLAN
Tunnel-Medium-Type := IEEE-802
Tunnel-Private-Group-ID := "%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVlanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVlanId=*)(univentionNetworkAccess=1))}"
}
}
Correct (with uppercase “L”):
if ("%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVLanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVLanId=*)(univentionNetworkAccess=1))}") {
update reply {
Reply-Message := "DEBUG: Assigning VLAN-ID from user / computer object"
Tunnel-Type := VLAN
Tunnel-Medium-Type := IEEE-802
Tunnel-Private-Group-ID := "%{ldap:ldap:///dc=,my,dc=domain,dc=de?univentionVLanId?sub?(&(memberUid=%{User-Name})(univentionObjectType=groups/group)(univentionVLanId=*)(univentionNetworkAccess=1))}"
}
}
Why Is the VLAN Not Assigned?
- LDAP Query Fails:
- The query for
univentionVlanId(lowercase “L”) returns no results, even though thevlan201group exists and the userPC81$is a member. - In the logs, you can see that the VLAN ID is not included in the
Access-Acceptpacket:
(11) Sent Access-Accept Id 182 from 10.10.36.236:1812 to 10.10.37.30:1812 length 208
(11) User-Name = "host/pc81.my.domain.dc"
(11) Tunnel-Type := VLAN
The line for the VLAN ID is missing:
Tunnel-Private-Group-ID := 201
- Switch Does Not Receive VLAN ID:
- Without the
Tunnel-Private-Group-ID, the switch does not know which VLAN to assign to the client. - As a result, the client is authenticated (
Access-Accept) but not assigned to the correct VLAN.
- Some Requests Are Rejected (
Access-Reject):
(9) Sent Access-Reject Id 180 from IP:1812 to SWITCH_IP:1812 length 20
This can happen if authentication fails (e.g., due to incorrect credentials or missing LDAP attributes).
Summary:
- Problem: Incorrect spelling of the LDAP attribute (
univentionVlanIdinstead ofuniventionVLanId). - Result: The VLAN ID is not found and not included in the
Access-Acceptpacket.
This in one of the Problems.
I cant resolve the Problem now.
We need Help!
And Thank You!