Creating VLANs and Assigning Ports
Nerd Cafe
Last updated
Nerd Cafe
Last updated
Creating VLANs and assigning ports is a foundational skill in networking, especially when configuring switches for efficient network segmentation. Here's a step-by-step guide with a practical scenario and topology:
You are tasked with configuring a Cisco switch for a small company. The company has three departments:
HR Department
Engineering Department
Sales Department
You need to create three VLANs, one for each department, and assign specific switch ports to each VLAN. We will use a Cisco switch for this example and assume you are connected to it via the console port.
Switch (e.g., Cisco 2960)
HR Department: Ports 1-10
Engineering Department: Ports 11-20
Sales Department: Ports 21-30
We'll also use two devices connected to each port to simulate the network clients.
First, you need to access the switch via console. Use a terminal emulator like PuTTY or Tera Term and connect to the switch.
Use the vlan
command to create VLANs for each department. The VLAN IDs are assigned as follows:
HR = VLAN 10
Engineering = VLAN 20
Sales = VLAN 30
Now, assign the ports to their respective VLANs. For example:
Ports Ethernet0/1-3 go to VLAN 10 (HR)
Ports Ethernet1/1-3 go to VLAN 20 (Engineering)
Ports Ethernet2/1-3 go to VLAN 30 (Sales)
To verify the VLANs that have been created, use the show vlan brief
command. This will display all VLANs and the ports associated with them.
Testing Connectivity: To verify that the devices in different VLANs cannot communicate, connect a computer to port e0/0 (HR) and another to port e1/0 (Engineering). They should not be able to communicate unless you configure routing (which we'll cover later).
VLAN, switch
, Cisco
, ports
, VLAN IDs
, network segmentation
, access mode
, interface range
, HR department
, Engineering department
, Sales department
, configuration
, broadcast domain
, VLAN 10
, VLAN 20
, VLAN 30
, VLAN assignment
, switchport
, Layer 3
, routing
, security
, سیسکو