Basic Cisco Switch Configuration Checklist 4: Vlans and Trunks
*********************************************************************************
Create Vlans
- Vlan 50
Name VLans
- name SALES
Assign Ports to Vlans
- int gi1/0/22
- switchport mode access
- switchport access vlan 50
Assign an ip address to vlan
- interface vlan 50
- ip address 10.10.10.10 255.255.255.0
- no shutdown
Note : to assign multiple ports interface range g1/0/10-20
to avoid switchport becoming trunk port switchport mode access
*********************************************************************************
- show vtp status
- vtp domain abc
- vtp mode server (transparent, client)
show run command does not display the vtp info if vtp is not in transparent mode, here is the reason:
…a VLAN database was introduced into Cisco IOS Software as a method to immediately save VTP updates for VTP clients and servers. In some versions of software, this VLAN database is in the form of a separate file in NVRAM, called the vlan.dat file. You can view VTP/VLAN information that is stored in the vlan.dat file for the VTP client or VTP server if you issue the show vtp status command.
VTP server/client mode switches do not save the entire VTP/VLAN configuration to the startup config file in the NVRAM when you issue the copy running-config startup-config command on these systems. It saves the configuration in the vlan.dat file. This does not apply to systems that run as VTP transparent. VTP transparent systems save the entire VTP/VLAN configuration to the startup config file in NVRAM when you issue the copy running-config startup-config command.
Configure a trunk port
- interface g1/0/23
- switchport trunk encapsulation dot1q (for older switches)
- switchport mode trunk
- switchport nonegeotiate
+++++++++++++++++++++++++++++++++++++++++++++++++++
To check Trunk or Vlan info
note: show cdp neighbors
Show interface trunk
show int g1/0/10 trunk
show run
show vlan
show interfaces g1/0/23 switchport (to check a interface status, trunk, etc)