vlankdcommand
IT AND COMPUTER Networking

Basic Networking commands used to create VLAN

Spread the love

VLAN (Virtual LANs)

VLANs are the logical grouping of devices in the same broadcast domain. VLANs are usually configured on switches by placing some interfaces into one broadcast domain and some interfaces into another. VLANs can be spread across multiple switches.A VLAN acts like a physical LAN, but it allows hosts to be grouped together in the same broadcast domain even if they are not connected to the same switch.

 

Let us talk about basic commands used to create VLAN.

Command

Description

VTP (VLAN Trunking Protocol Used by Cisco switch to exchange VLAN information. You can synchronize VLAN
information (eg. VLAN ID or VLAN name ) with switches inside the same VTP domain.
Trunk A trunk is a communication line to carry multiple signals simultaneously to provide network access between two points. Trunks typically connect switching centers in a communication system. The signals can convey any type of communication data. A trunk can consist of multiple wires, cables or fiber optics strands bundled together to maximize the available bandwidth in a single physical cable.
SW(config)#vtp mode server Configure the switch as VTP server
SW(config)#vtp mode client Configure switch as VTP client
SW(config)#vtp mode transparent Configure switch as VTP transparent
SW(config)#no vtp mode configure Switch to default VTP Server mode
SW(config)#vtp domain domain-name Set VTP domain name
SW(config)#vtp password password Set CTP password. Password is case sensitive
SW#show vtp  status Display VTP status including general information
SW#show vtp  counters Show VTP counters of switch
SW(config-if)#switchport mode trunk Change interface mode in trunk
SW(config)#vlan 10 Create VLAN and associate number ID with it
SW(config-vlan)#name Sales Assign name to VLAN
SW(config-vlan)#exit Return in Global configuration mode from VLAN configuration mode
SW(config)#interface fastethernet 0/1 Enter in Interface Configuration Mode
SW(config-if)#switchport mode access Set interface link type to access link
SW(config-if)#switchport access vlan 10 Assign this interface to VLAN 10
SW#show vlan Display VLAN information
SW#Show vlan brief Display VLAN information in short
SW#Show vlan id 10 Display VLAN information in VLAN ID 10 only
SW#Show vlan name HR Display VLAN information about VLAN named HR only
Show(config)#interface fastethernet 0/8 Enter in Interface Configuration Mode
SW(config-if)#no switchport access vlan 10 Removes the interface from VLAN 10 and reassign it to default VLAN(VLAN 1)
SW(config-if)#exit Move back to global configuration mode
SW(config)#no vlan 10 Delete VLAN 10 from VLAN database
SW#copy running-config startup-config Saves the running configuration in NVRAM

Leave a Reply

Your email address will not be published.