The following example shows the Cisco IOS Ethernet switch commands that demonstrate and optimize an environment needed for IP Telephony and video.
Connecting to the Ethernet switch
Ports 1 through 10 are assigned to the voice VLAN and this configuration is suitable for stand-alone IP phones and video devices that connect to the Ethernet switch.
Switch> enable change from user to privilege mode
Switch # configure terminal change to global config mode
Switch(config)# vlan 20 name v20 create vlan 20 for voice traffic
Switch(config)# int range fa 0/1 - 10 context for ports 1 through 10
Switch(config)# des “IP phones with no
PCs attached” Description of ports’ use
Switch(config)# switchport access vlan 20 change native/port vlan from data (vlan-1) to voice (vlan-20)
Switch(config)# no cdp enable disable CDP for ports 11-20 (remove proprietary protocols)
Switch(config)# spanning-tree portfast place ports in forwarding mode immediately
Switch(config)# spanning-tree bpduguard
enable enable bpdu guard in case of a layer-2 loop
Attaching a PC
Ports 12 through 20 are assigned to the voice vlan and this config is suitable for IP phones and video devices that have a PC attached to them..
Switch(config)# int range fa 0/11 – 20 context for ports 11 through 20
Switch(config)# des “IP phones with PCs
attached” description of ports’ use
Switch(config)# speed 100 lock port speed to 100-Mbps (optional setting to Auto-Neg)
Switch(config)# duplex Full lock port duplex to Full (optional setting to Auto-Neg)
Switch(config)# switchport voice vlan 20 config implicit trunk for IP phones or video endpoints
Switch(config)# no cdp enable disable CDP for ports 11 through 20
Switch(config)# spanning-tree portfast place ports in forwarding mode immediately
Switch(config)# spanning-tree bpduguard enable enable bpdu guard in case of a layer-2 loop
Taking traffic to a router
These commands create a trunk (more than one vlan) to take voice and data traffic to a router.
Switch(config)# int fa 0/48 context for port 48
Switch(config-if)# des “Uplink trunk to
router R1” description of port usage
Switch(config-if)# switchport trunk encap
dot1q define port 48 as a data trunk using 802.1Q
Switch(config-if)# switchport mode trunk enable trunking mode
Switch(config-if)# switchport nonegotiate trunk port 48 will not negotiate a trunk status with the
other end of the link
Switch(config-if)# switchport trunk allowed
vlan remove 2-19,21-4094 remove unneeded vlans