Vswitch configuration command Basics
User Mode hostname #;
Privileged mode hostname (config )#;
Global configuration mode hostname (config-if )#;
Vswitch password settings:
- Switch> enable; enter privileged Mode
- Switch # config terminal; enter global configuration mode
- Switch (config) # hostname csico; set the vswitch Host Name
- Switch (config) # enable secret csico1; set the privileged encryption Password
- Switch (config) # enable password csico8; set a privileged non-password
- Switch (config) # line console 0; enter the console Port
- Switch (config-line) # line vty 0 4; enter the virtual terminal
- Switch (config-line) # login; virtual terminal allows login
- Switch (config-line) # password csico6; set the virtual terminal logon password csico6
- Switch # exit; return command
Basic vswitch Configuration
Including VLAN creation, deletion, port attribute settings, configure the trunk port, add a port to the vlan, and configure VTP:
- Switch # vlan database; go to VLAN settings
- Switch (vlan) # vlan 2; Create VLAN 2
- Switch (vlan) # vlan 3 name vlan3; Create VLAN 3 and name it vlan3
- Switch (vlan) # no vlan 2; Delete vlan 2
- Switch (config) # int f0/1; enter port 1
- Switch (config) # speed? View the subcommands of the speed command
- Switch (config) # speed 100 sets the port speed to 100 mb/s (10/auto)
- Switch (config) # duplex? View duplex sub-commands
- Switch (config) # duplex full set this port to full duplex (auto/half)
- Switch (config) # description TO_PC1. This port is described as TO_PC1.
- Switch (config-if) # switchport access vlan 2; Add vlan 2 to the current port
- Switch (config-if) # switchport mode trunk; set it to trunk mode (access mode)
- Switch (config-if) # switchport trunk allowed vlan 1 and 2; set the allowed vlan
- Switch (config-if) # switchport trunk encap dot1q; Set vlan Relay
- Switch (config) # vtp domain vtpserver; set the same vtp domain Name
- Switch (config) # vtp password; set the vtp password
- Switch (config) # vtp server; Set vtp server mode
- Switch (config) # vtp client; Set vtp client Mode
Basic vswitch settings
Including setting IP addresses, default gateways, domain names, domain name servers, configuring and viewing MAC address tables:
- Switch (config) # interface vlan 1; enter vlan 1
- Switch (config-if) # ip address 192.168.1.1 255.255.255.0; set the ip address
- Switch (config) # ip default-gateway 192.168.1.6; set the default gateway
- Switch (config) # ip domain-name cisco.com
- Switch (config) # ip name-server 192.168.1.18
- Switch (config) # mac-address-table? View mac-address-table sub-commands
- Switch (config) # mac-address-table aging-time 100 set the timeout value to 100 ms
- Switch (config) # mac-address-table permanent restart c01.bbcc f0/3 add permanent address on port f0/3
- Switch (config) # mac-address-table restricted static multicast c02.bbcc f0/6 f0/7 add static address target port f0/6 Source Port f0/7
- Switch (config) # end
- Switch # show mac-address-table view the entire MAC address table
- Switch # clear mac-address-table restricted static clear restricted static address
Switch display command
- Switch # write; save configuration information
- Switch # show vtp; view vtp configuration information
- Switch # show run; view current configuration information
- Switch # show vlan; view vlan configuration information
- Switch # show interface; view port information
- Switch # show int f0/0; view the specified port information
- Switch # show int f0/0 status; view the status of the specified port
- Switch # dir flash:; view flash
The basic commands of vswitches are described in this article. The above knowledge points are required by beginners in learning or even Cisco certification. There are not many content. I hope you have understood them.