Configuration de Vlan sur switch Cisco
Table of Contents
Introduction
This tutorial provides a comprehensive guide on configuring VLANs on a Cisco switch. Understanding VLANs is crucial for network segmentation, improving security, and managing network traffic efficiently. Following this guide will help you assign VLANs to switch ports effectively.
Step 1: Access the Switch Command Line Interface
- Connect to your Cisco switch using a console cable and terminal software (like PuTTY).
- Enter your credentials to log into the device.
- Access the privileged EXEC mode by typing:
enable
Step 2: Enter Global Configuration Mode
- From the privileged EXEC mode, enter global configuration mode by typing:
configure terminal
Step 3: Create VLANs
- To create a VLAN, use the following command, replacing
VLAN_ID
with your desired VLAN number:vlan VLAN_ID
- You can also name the VLAN for easier identification. For example:
name VLAN_NAME
- Repeat the above steps for each VLAN you want to create.
Step 4: Assign VLANs to Ports
-
Identify the interface you want to configure. Enter the interface configuration mode:
interface INTERFACE_ID
Replace
INTERFACE_ID
with the actual port (e.g.,GigabitEthernet0/1
). -
Assign the port to a specific VLAN using the following command:
switchport mode access switchport access vlan VLAN_ID
Replace
VLAN_ID
with the VLAN number you want to assign. -
If configuring multiple ports, repeat the above commands for each interface.
Step 5: Verify VLAN Configuration
- To check the VLANs configured on your switch, use:
show vlan brief
- To confirm that a specific port is assigned to the correct VLAN, use:
This will display the configuration for the specified interface.show running-config interface INTERFACE_ID
Practical Tips
- Make sure to use VLAN IDs that do not conflict with existing VLANs.
- Document your VLAN configuration for future reference and troubleshooting.
- Remember that VLANs can only communicate with each other through a router or a Layer 3 switch.
Common Pitfalls to Avoid
- Forgetting to set the switch port mode to access before assigning a VLAN.
- Not saving the configuration after making changes. Always use:
orwrite memory
copy running-config startup-config
Conclusion
You have now successfully configured VLANs on your Cisco switch and assigned them to specific ports. This setup enhances your network's efficiency and security. Next steps may include configuring inter-VLAN routing or implementing additional network features. Always remember to monitor and maintain your VLAN configurations as your network evolves.