Exemple de configuration de Cisco

Dernière mise à jour : Mar 19, 2025 |
Informations sur le prologue
L'exemple suivant illustre les commandes de commutateur Ethernet Cisco IOS qui démontrent et optimisent un environnement nécessaire à la téléphonie IP et à la vidéo.

Connexion au commutateur Ethernet

Les ports 1 à 10 sont attribués au VLAN vocal et cette configuration convient aux téléphones IP autonomes et aux dispositifs vidéo qui se connectent au commutateur Ethernet.
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

Fixation d'un PC

Les ports 12 à 20 sont attribués au VLAN vocal et cette configuration convient aux téléphones IP et aux périphériques vidéo auxquels un PC est relié.
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

Acheminement du trafic vers un routeur

Ces commandes créent un tronc (plus d’un VLAN) pour acheminer le trafic vocal et de données vers un routeur.
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