Sub-mode of vswitch Configuration:
1. line configuration mode [host name (config-line) #]: line parameters configured by the switch
2. Interface Configuration Mode [host name (config-if) #]: interface parameters configured by the switch
You can use the Enter key to display all data, and the Space key is displayed on the entire page. For a device with no vswitch configuration by default, you must set some names, passwords, and remote connections to facilitate future maintenance.
- Set the switch name: switch (config) # hostname switch
- Set ip address: switch (config) # ip address 192.168.0.1 255.255.0
- Set the default gateway of the vswitch: switch (config) # ip default-gateway 192.168.0.1
- Set password: switch (config) # enable password level 1 cisco
Note that when designing a topology, you must set a vswitch name that is easily recognized by the Administrator. The password is case sensitive. Level 1 indicates the logon password level 15 indicates the global mode. After completing some basic settings, you can use
View vswitch information using the Show command for vswitch Configuration
- Show version/* view system hardware configurations and software version numbers.
- Show running-config/* view the currently running configuration information
- Show interfaces/* view the configuration information of all ports
- Show interfaces [port number]/* view the configuration information of a specific port number
- Show interfaces status/* view the status information of all ports
- Show interfaces [port number] switchport/* shows the status of the L2 port, which can be used to determine whether the port is a L2 or L3 Port
- Show ip/* view the IP address of the vswitch
S0/1: It is the Serail interface, that is, the LAN interface on the switch, representing the 1st serial ports of the 1st modules.
- Router#conf t
-
- Router(config)#int fa0/1.1
-
- Router(config-subif)#encapsulation dot1q 10
-
- Router(config-subif)#ip address 192.168.1.1 255.255.255.0
-
- Router(config-subif)#int fa0/1.2
-
- Router(config-subif)#encapsulation dot1q 20
-
- Router(config-subif)#ip address 192.168.2.1 255.255.255.0
-
- Router(config-subif)#int fa0/1
-
- Router(config-if)#no shut Router(config-if)#no shu
Vswitch configuration commands
# The preceding command prompt, Router # is the privileged mode, Router (config) # Is the global configuration mode, and Router (config-subif) # Is the subinterface mode. The following describes each command:
Conf t enters the global configuration mode.
Int fa0/1.1 is the sub-interface configuration for fa0/1.1
Encap dot1q 10 is a data frame that encapsulates VLAN10 data as 802.1q.
Ip address 192.168.1.1 255.255.255.0 is to configure the sub-interface IP address as 192.168.1.1/24. The following two statements are the same as above.
Int fa0/1: Enter the fa0/1 Interface Configuration Mode
No shut is used to activate this interface
When you enter a command in IOS, the system will not be confused as long as the abbreviation is used. You can use the abbreviation when using the switch configuration command. For example, Switch> enable: in user mode, only enable is available for commands starting with en. Therefore, Switch> en can be abbreviated as Switch> enable. You can also use the TAB key to automatically complete the command, such as Switch> en. Press the TAB on the keyboard to automatically complete Switch> enable.
A small Summary of Switch configuration is presented to you. This is some basic knowledge of CCNA certification. I hope you can master and understand it.