Security

 View Only
Expand all | Collapse all

Cisco Switch Voice Vlan

This thread has been viewed 32 times
  • 1.  Cisco Switch Voice Vlan

    Posted May 20, 2025 12:25 PM

    Dear Experts, 

    We are trying to implement 802.1x using cisco switch (C1000). Laptop is connected to ip phone (Dlink) and ip phone is connected to switchport. Below is the configuration on cisco switch. Please note that we want to dynamically assign the voice vlan. If port assignment is mandatory let me know

    interface FastEthernet0/1
    switchport mode access
    authentication host-mode multi-domain
    authentication order dot1x mab
    authentication priority dot1x mab
    authentication port-control auto
    authentication timer reauthenticate server
    mab
    dot1x pae authenticator
    dot1x timeout tx-period 10
    dot1x timeout supp-timeout 15
    dot1x max-reauth-req 1

    On successful mac authentication, we are sending this profile to switch

    Currently upon successful mac auth, the ip phone is not registering to pbx. The customer is already running LLDP/Voice vlan on other switches. This setup is for ClearPass PoC. 

    Can someone point out if its a configuration issue (clearpass or switch)?



    ------------------------------
    Owais101
    ------------------------------


  • 2.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 12:01 AM

    if you will push Cisco-AVPair = device-traffic-class=voice, the switch will search for Voice VLAN. 
    Your configuration does not contain a Voice VLAN.

    interface FastEthernet0/1
    switchport mode access
    switchport voice vlan 222
    authentication host-mode multi-domain
    authentication order dot1x mab
    authentication priority dot1x mab
    authentication port-control auto
    authentication timer reauthenticate server
    mab
    dot1x pae authenticator
    dot1x timeout tx-period 10
    dot1x timeout supp-timeout 15
    dot1x max-reauth-req 1

    So if y ou choose to go with AVPair device-traffic-class=voice, you will need to configure the Voice VLAN in the port. If you don't want the Voice VLAN on the Port, then all you need to do is remove the 6. Cisco-AVPair and thats it.

    Additionally, you are using IBNS 1.0 format. This is an old format of configuration in Cisco which will soon be deprecated. I would recommend to move to IBNS2.0 (if its Cisco 1000 it supports it). On IBNS 2.0 you would need to configure Policy Maps and then assign the Policy Map in the Port. One example:

    The port configuration:
    interface range GigabitEthernet1/0/1-23
     switchport access vlan <default untrusted vlan>
     switchport mode access
     switchport nonegotiate
     switchport voice vlan 222
     ip device tracking maximum <whatever number you need>
     authentication periodic
     authentication timer reauthenticate server
     access-session control-direction in
     access-session closed
     access-session port-control auto
     mab
     no macro auto processing
     dot1x pae authenticator
     dot1x timeout quiet-period 30
     dot1x timeout server-timeout 30
     dot1x timeout tx-period 7
     dot1x max-req 3
     dot1x max-reauth-req 3
     spanning-tree portfast edge
     service-policy type control subscriber CLEARPASS_POLICY_MAP
     ip dhcp snooping limit rate 20
    !

    The Policy Configuration:
    policy-map type control subscriber CLEARPASS_POLICY_MAP
     event session-started match-all
      10 class always do-until-failure
       10 authenticate using dot1x priority 10
       20 authenticate using mab priority 20
     event authentication-failure match-first
      5 class DOT1X_FAILED do-until-failure
       10 terminate dot1x
       20 authenticate using mab priority 20
      10 class DOT1X_FAILED do-until-failure
       10 terminate dot1x
      20 class MAB_FAILED do-until-failure
       10 terminate mab
       20 authenticate using dot1x priority 10
      30 class DOT1X_NO_RESP do-until-failure
       10 terminate dot1x
       20 authentication-restart 60
      40 class always do-until-failure
       10 terminate mab
       20 terminate dot1x
       30 authentication-restart 60
      60 class always do-until-failure
       10 terminate dot1x
       20 terminate mab
       30 authentication-restart 60
     event agent-found match-all
      10 class always do-until-failure
       10 terminate mab
       20 authenticate using dot1x priority 10
     event authentication-success match-all
      10 class always do-until-failure
       10 activate service-template DEFAULT_LINKSEC_POLICY_SHOULD_SECURE
     event aaa-available match-all
      10 class IN_CRITICAL_AUTH do-until-failure
       10 clear-session
      20 class NOT_IN_CRITICAL_AUTH do-until-failure
       10 resume reauthentication
     event inactivity-timeout match-all
      10 class always do-until-failure
       10 clear-session
     event violation match-all
      10 class always do-until-failure
       10 restrict
     event authorization-failure match-all
      10 class AUTHC_SUCCESS-AUTHZ_FAIL do-until-failure
       10 authentication-restart 60



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 3.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 12:20 AM
    Dear Shpat

    In my clearpass profile, i am sending vlan 222 with device class traffic voice. Wont it dynamically assign the voice vlan?






  • 4.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 12:27 AM

    Yes, it will assign dynamically the Voice VLAN, if there is a Voice VLAN configured in the Port.

    What you are doing with this configuration is that:
    You are pushing VLAN 222
    You are pushing device-traffic-class=voice (which means you are telling the switch that this device is for Voice purpose place it in Voice VLAN)
    However, on your configuration in the switch, the port has no Voice VLAN Configured, therefor it won't place it in the Voice VLAN.

    With Cisco 1000 (and i have implemented a lot of them) you either have to push a VLAN (without including device-traffic-class=voice) or you need to push just the line device-traffic-class=voice (without pushing the VLAN).
    In addition, there are devices which do not understand the Voice VLAN (old Yealink Phones, old Grandstream) which i faced a lot of issues, where i had to adapt different enforcements. In such cases we only push VLAN (and we do not push device-traffic-class=voice). This means that those devices do not understand voice devices as voice, but you need to put them as data device.



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 5.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:25 AM
    Dear Shpat, 

    So you mean to say that if i dont predefine the voice vlan on the interface, i cannot send the vlan dynamically from clearpass right? So basically my profile on clearpass is incorrect as i am defining the vlan and class voice in the same.

    I am asking this because its a POC, if customer asks us, is there anyway to define the voice vlan without configuring on the switch itself?






  • 6.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:34 AM

    From my experience with Cisco C1000 behavior, depending which type of phone they are using, there are two ways to do this:

    1. If you send device-traffic-class=voice, you need to have the command  switchport voice vlan <vlan id> in the port
    2. If you send Tunnel-Type = VLAN (13) & Tunnel-Medium-Type = IEEE-802 (6) & Tunnel-Private-Group-Id=22 , then you don't need to have the voice VLAN configured in the port



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 7.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:26 AM
    Also in your statement, 

    With Cisco 1000 (and i have implemented a lot of them) you either have to push a VLAN (without including device-traffic-class=voice) this will not be a voice vlan right? or you need to push just the line device-traffic-class=voice (without pushing the VLAN).








  • 8.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:36 AM

    Explaining it in a simple way, Voice-VLAN is like all other VLAN but with this you just have the tagging which enables QoS purposes and also you can make the switch put the Voice devices (if the switch can detect that it is a voice device) go through the voice vlan.
    If you want to create a Voice VLAN, lets say VLAN=1000, but you don't want to have the configuration on the port (switchport voice vlan 1000), then you need to send attributes Tunnel-Type = VLAN (13) & Tunnel-Medium-Type = IEEE-802 (6) & Tunnel-Private-Group-Id=1000, and you will make sure that VLAN1000 will be enforced only for Voice devices which are profiled/role mapped and enforced from Clearpass.



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 9.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:45 AM
    Dear Shpat, 

    I understand now and just wanted to make sure we are on the same page. 

    If i am using host-mode multi-domain, then there will be only 1 device in voice vlan and 1 device in data vlan. Since i have a laptop connected to ip phone, i cannot assign a data vlan to ip phone because then the laptop will not authenticate (1 device per domain). If i change the host-mode to multi-auth, i cannot assign different vlans to different devices connecting to data domain. I am not sure if its changed in C1000, but i was testing in my lab with 3560 and i found some documentation stating exactly that. 

    I also saw Herman's post suggesting using normal vlans instead of Voice Vlan, i liked the idea but then i am not able to assign different vlan to ip phone and different vlan to laptop if i am using host-mode multi-auth. 

    Best Regards
    Owais Iqbal
    CCIE#37956 | ACDX 
    Technical Consultant - Aruba Networks
    Mob/Whatsapp: +92-321-2960496






  • 10.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:50 AM

    In my environment, we have authentication host-mode multi-domain, and we implemented unmanaged switches behind the port (which is not recommended most of the cases) where we had two/three IP Phones, with PC connecting behind it (so total of 4-8 devices), and it worked without any issue.

    In the Cisco C1000 guidline it states that:
    - Multi-auth mode should be configured to allow devices behind a hub to obtain secured port access through individual authentication. Only one voice device can be authenticated in this mode if a voice VLAN is configured.
    -
    Multi-domain mode should be configured if data host is connected through an IP phone to the port. Multi-domain mode should be configured if the voice device needs to be authenticated.
    -  Multi-host mode also offers port access for multiple hosts behind a hub, but multi-host mode gives unrestricted port access to the devices after the first user gets authenticated.

    So in your case, try Multi-Auth and/or Multi-Domain because it depends what type of IP Phone you are using and how it behaves.



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 11.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:55 AM
    In your environment are you assigning different vlans to ip phones and different vlans to PC? like 1001 to ip phone and 200 to PC on the same port using multi-auth?







  • 12.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 12:59 PM

    We use different VLAN for different Service, for example
    Phone : VLAN 1100 
    PC: VLAN 1200

    We use multi-auth and/or multi-domain in most cases



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 13.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:56 AM
    Ok i got it, maybe the behavior is different in my lab. Let me try out your suggestions before spamming you with questions. 

    Thanks alot for your tips, 







  • 14.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:46 AM
    One more thing,

    You said if i dont configure the voice vlan on the interface, i need to send the normal vlan to switch and assign to voip devices using enforcement. Will it show as data vlan or voice vlan? 








  • 15.  RE: Cisco Switch Voice Vlan

    Posted May 21, 2025 01:57 AM

    It will show as Data VLAN. 



    ------------------------------
    Shpat | ACEP | ACMP | ACCP | ACDP
    Just an Aruba enthusiast and contributor by cases
    If you find my comment helpful, KUDOS are appreciated.
    ------------------------------



  • 16.  RE: Cisco Switch Voice Vlan

    Posted May 22, 2025 03:19 AM

    In addition if it is not necessary to authenticate the IP Phones you can use CDP bypass for them. In that case you configure the port as authentication mode single-host and specify the voice vlan on interface level. A connected IP Phone will not iniate authentication on ClearPass and will work automatically.