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. VoIP is a protocol used for the transmission of voice through packet-switched networks. VoIP transmits voice calls using a network connection instead of an analog phone line.
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. Not all IP phones support LLDP-MED, however.
![]() |
Note: Because this configuration without LLDP-MED requires you to set the port mode to trunk, 802.1X authentication cannot be enabled. |
This example describes how to configure VoIP on an EX-series switch without LLDP-MED and without 802.1X:
Requirements
This example uses the following hardware and software components:
- JUNOS Release 9.1 or later for EX-series switches.
- One EX 4200 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.
- A non-LLDP-MED IP phone.
Before you configure VoIP, be sure you have:
- Installed your EX-series switch. See Installing and Connecting an EX 3200 or EX 4200 Switch.
- Performed the initial switch configuration. See Connecting and Configuring an EX-series Switch (J-Web Procedure).
- 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.
- Configured interface ge-0/0/2 for Power over
Ethernet (PoE). See Configuring PoE (CLI Procedure).
Note: The PoE configuration is not necessary if the VoIP supplicant is using a power adapter.
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 also can power an IP telephone by connecting it to one of the Power over Ethernet (PoE) interfaces on the switch.
To configure VoIP on an EX-series switch to support an IP phone that does not support LLDP-MED, set the mode of the port (to which you want to connect the IP phone) to trunk, add the port as a member of the voice VLAN, and configure the data VLAN as the native VLAN on the EX-series switch. This configuration ensures that the voice traffic and data traffic do not affect each other.
In this example, the trunk interface ge-0/0/2 on the EX 4200 switch is connected to a non-LLDP-MED IP phone.
Configuration
To configure VoIP without LLDP-MED or 802.1X authentication:
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 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 VoIP:
- Configure the VLANs for data and voice:
[edit vlans]
user@switch# set data-vlan vlan-id 77
user@switch# set voice-vlan vlan-id 99 - Configure the VLAN data-vlan on the interface:
[edit vlans]
user@switch# set data-vlan interface ge-0/0/2.0
- Set the port mode to trunk:
[edit interfaces]
set ge-0/0/2 unit 0 family ethernet-switching port-mode trunk - Add the interface as a member of the voice VLAN:
[edit interfaces]
set ge-0/0/2 unit 0 family ethernet-switching vlan members voice-vlan - Configure data-vlan as native to this
trunk interface:
[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:
- [edit]
- user@switch# show configuration
- interfaces {
-
- ge-0/0/2 {
-
- unit 0 {
-
- family ethernet-switching {
- port-mode trunk;
-
- vlan {
- members voice-vlan;
- }
-
- native-vlan-id data-vlan;
- }
- }
- }
- }
- vlans {
-
- data-vlan {
- vlan-id 77;
-
- interface {
- ge-0/0/2.0;
- }
- }
-
- voice-vlan {
- vlan-id 99;
- }
- }
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 VLAN and voice-vlan VLAN. The State field shows that the interface is up.