Supported Platforms
Related Documentation
Example: Configuring VoIP on an EX Series Switch Without Including LLDP-MED Support
You can configure voice over IP (VoIP) on an EX Series switch to support IP telephones. The Link Layer Discovery Protocol–Media Endpoint Discovery (LLDP-MED) protocol is sometimes used with IP phones to forward VoIP parameters from the switch to the phone. However, not all IP phones support LLDP-MED.
This example describes how to configure VoIP on an EX Series switch without using LLDP-MED:
Requirements
This example uses the following hardware and software components:
- One EX4200 switch acting as an authenticator port access entity (PAE). The interfaces on the authenticator PAE form a control gate that blocks all traffic to and from supplicants until they are authenticated.
- An IP phone that does not support LLDP-MED.
- Junos OS Release 9.1 or later for EX Series switches.
Before you configure VoIP, be sure you have:
- Performed basic bridging and VLAN configuration on the switch. See Example: Setting Up Basic Bridging and a VLAN for an EX Series Switch.
- Configured the IP phone as a member of the voice VLAN.
- (Optional) Configured interface ge-0/0/2 for Power over Ethernet (PoE). The PoE configuration is not necessary if the VoIP supplicant is using a power adapter. See Configuring PoE (CLI Procedure).
Overview
Instead of using a regular telephone, you connect an IP telephone directly to the switch. An IP phone has all the hardware and software needed to handle VoIP. You can also power an IP telephone by connecting it to one of the Power over Ethernet (PoE) interfaces on the switch.
EX Series switches can accommodate an IP telephone and end host connected to a single switch port. In such a scenario, voice and data traffic must be separated into different broadcast domains, or VLANs. One method for accomplishing this is by configuring a voice VLAN, which enables access ports to accept untagged data traffic as well as tagged voice traffic from IP phones, and associate each type of traffic with separate and distinct VLANs. Voice traffic (tagged) can then be treated differently, generally with a higher priority than data traffic (untagged).
The voice VLAN delivers the greatest benefit when used with IP phones that support LLDP-MED, but it is flexible enough that IP phones that do not support LLDP-MED can also use it effectively. However, in the absence of LLDP-MED, the voice VLAN ID must be set manually on the IP phone because LLDP-MED is not available to accomplish this dynamically. For information about setting up a voice VLAN for IP phones that support LLDP-MED, see Example: Setting Up VoIP with 802.1X and LLDP-MED on an EX Series Switch.
Another method to separate voice (tagged) and data (untagged) traffic into different VLANs is to use a trunk port with the native VLAN ID option. The trunk port is added as a member of the voice VLAN, and processes only tagged voice traffic from that VLAN. The trunk port must also be configured with the native VLAN ID for the data VLAN so that it can process untagged data traffic from the data VLAN. This configuration also requires that the voice VLAN ID be set manually on the IP phone.
This example illustrates both methods. In this example, the interface ge-0/0/2 on the EX4200 switch is connected to a non-LLDP-MED IP phone.
![]() | Note: The implementation of a voice VLAN on an IP telephone is vendor-specific. Consult the documentation that came with your IP telephone for instructions on configuring a voice VLAN. For example, on an Avaya phone, you can ensure that the phone gets the correct VoIP VLAN ID even in the absence of LLDP-MED by enabling DHCP option 176. |
Configuring VoIP Without LLDP-MED by Using a Voice VLAN on an Access Port
CLI Quick Configuration
To quickly configure VoIP, copy the following commands and paste them into the switch terminal window:
[edit]
set vlans data-vlan vlan-id 77
set vlans voice-vlan vlan-id 99
set vlans data-vlan interface ge-0/0/2.0
set interfaces ge-0/0/2 unit 0 family ethernet-switching
port-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching
vlan members data-vlan
set ethernet-switching-options voip interface
ge-0/0/2.0 vlan voice-vlan
set ethernet-switching-options voip interface
ge-0/0/2.0 forwarding-class assured-forwarding
Step-by-Step Procedure
- Configure two VLANs: one for data traffic and one for
voice traffic:
[edit vlans]
user@switch# set data-vlan vlan-id 77
user@switch# set voice-vlan vlan-id 99Note: The voice VLAN ID must be set manually on the IP phone.
- Configure the VLAN data-vlan on the interface
ge-0/0/2:
[edit vlans]
user@switch# set data-vlan interface ge-0/0/2.0 - Configure the interface ge-0/0/2 as an access port belonging
to the data VLAN:
[edit interfaces]
user@switch# set ge-0/0/2 unit 0 family ethernet-switching port-mode access
user@switch# set ge-0/0/2 unit 0 family ethernet-switching vlan member data-vlan - Configure VoIP on the interface ge-0/0/2 and add this
interface to the voice VLAN:
[edit ethernet-switching-options]
user@switch# set voip interface ge-0/0/2.0 vlan voice-vlan - Specify the assured-forwarding forwarding class to provide
the most dependable class of service:
[edit ethernet-switching-options]
user@switch# set voip interface ge-0/0/2.0 forwarding-class assured-forwarding
Results
Display the results of the configuration:
Configuring VoIP Without LLDP-MED by Using a Trunk Port with Native VLAN Option
CLI Quick Configuration
To quickly configure VoIP, copy the following commands and paste them into the switch terminal window:
[edit]
set vlans data-vlan vlan-id 77
set vlans voice-vlan vlan-id 99
set interfaces ge-0/0/2 unit 0 family ethernet-switching
port-mode trunk
set interfaces ge-0/0/2 unit
0 family ethernet-switching vlan members voice-vlan
set interfaces ge-0/0/2 unit 0 family ethernet-switching
native-vlan-id data-vlan
Step-by-Step Procedure
- Configure two VLANs: one for data traffic and one for
voice traffic:
[edit vlans]
user@switch# set data-vlan vlan-id 77
user@switch# set voice-vlan vlan-id 99Note: The voice VLAN ID must be set manually on the IP phone.
- Configure interface ge-0/0/2 as a trunk port that includes
only the voice VLAN:
[edit interfaces]
user@switch# set ge-0/0/2 unit 0 family ethernet-switching port-mode trunk
user@switch# set ge-0/0/2 unit 0 family ethernet-switching vlan member voice-vlan - Configure the native VLAN ID for the data VLAN on the
trunk port:
[edit interfaces]
user@switch# set ge-0/0/2 unit 0 family ethernet-switching native-vlan-id data-vlan
Results
Display the results of the configuration:
Verification
To confirm that the configuration is working properly, perform the following task:
Verifying the VLAN Association With the Interface
Purpose
Display the interface state and VLAN membership.
Action
user@switch> show ethernet-switching interfaces
Ethernet-switching table: 0 entries, 0 learned user@switch> show ethernet-switching interfaces Interface State VLAN members Blocking ge-0/0/0.0 down default unblocked ge-0/0/1.0 down employee-vlan unblocked ge-0/0/5.0 down employee-vlan unblocked ge-0/0/3.0 down employee-vlan unblocked ge-0/0/8.0 down employee-vlan unblocked ge-0/0/10.0 down default unblocked ge-0/0/11.0 down employee-vlan unblocked ge-0/0/23.0 down default unblocked ge-0/0/2.0 up voice-vlan unblocked data-vlan unblocked
Meaning
The field VLAN members shows that the ge-0/0/2.0 interface supports both the data VLAN, data-vlan, and the voice VLAN, voice-vlan. The State field shows that the interface is up.