2013年11月6日星期三

Cisco Catalyst 2960 switch configuration commands

Enable password (enbale secret), the password to cipher text display
Model Switch.> / user prompt straight
The Switch.>enable / * enter privilege mode
Switch.# / privileged mode (input ciphertext before entry)
Switch.#config terminal / * enter global configuration mode
Switch. (config) # / configuration mode prompt
Switch. (config hostname Pconline) # / * set the host name Pconline
Pconline (config) enable password cisco3560 # / * set the enable password for pconline
Pconline (config) enable secret cisco3560 # / set enable password for network
Pconline (config) line vty 015 # / set the virtual terminal lines
Pconline (config-line) login / # landing verification
Pconline (config-line password cisco3560) # / set the virtual terminal password
Two, VLAN switch setting
Model Switch.> / user prompt straight
The Switch.>enable / * enter privilege mode
Switch#vlan database into the VLAN settings;
Switch (VLAN) # VLAN 2; VLAN 2
Switch (VLAN) #no VLAN 2 + VLAN 2;
Switch (config) #int f0/1; into the network port 1
Switch (config) #int giga0/1; into the sink Gigabit port 1
Switch (config-if) duplex {auto full half} # | | set port --- automatic / full duplex or half duplex
Switch (config-if) #switchport mode trunk; the port is set to sink mouth
Switch (config-if) #switchport mode access; the port settings for the access mode
Switch (config-if) #switchport trunk allowed VLAN 1, 2; group VLAN set 1,2 export permit
Switch (config-if) #switchport trunk VLAN 2; 1 is set in VLAN allowed
Switch (config-if) #switchport access VLAN 2; the current port into VLAN 2
Switch (config-if) #switchport trunk encap dot1q; set the VLAN relay
In Cisco network, there are four main types of switches in the LAN interface in the final steady state:
Access/ trunk/ multi/ dot1q-tunnel.
1, access: is mainly used to access terminal equipment, such as PC, server, print server.
2, trunk: is mainly used in connection with other switches, to support multiple VLAN in line.
Multiple VLAN bearing 3, multi: in a line, but unlike trunk, it does not carry data tagging. Mainly used for access to support multiple VLAN servers or network analysis apparatus. Now don'tuse this kind of interface, in the Cisco network equipment, also does not support this type ofinterface.
4, dot1q-tunnel: is used in the Q-in-Q tunnel configuration.
Switch (config) #vtp domain; set the VTP domain name
Switch (config) #vtp password; set the VTP password
Switch (config) #vtp mode server set up the VTP model;
Switch (config) #vtp mode client set up the VTP model;
Three. Set the IP address switch
Switch (config) #interface VLAN 1 to VLAN 1
Switch (config-if) #ip address 132.37.48.3 255.255.255.0; set the switch management IP
Switch (config) #ip default-gateway 132.37.48.1; set the switch the default gateway
Switch (config) #end; exit current mode
Switch#conf t enter privilege mode
Switch (config interface fa0/5) #
Switch (config-if) # shutdown closed port
Switch (config-if no shutdown) # open ports
The four switch show commands.
Privileged mode:
Save the configuration information of switch#write;
Switch#show VTP; see the VTP configuration information
Switch#show run; see the current configuration information
Switch#show VTP; see VTP switch information
Switch#show VLAN; see the VLAN configuration information
Switch#show interface view port information;
Switch#show interfaces FastEthernet 0/1 switchport; two layer display port state, can be used to determine whether the port is two or three layers of export.
Switch#show int f0/0; look at the specified port information
Sw1924_b#show IP; see the setting
Sw1924_b#show versi; check the switch version information
Sw1924_b#show running-config; check the switch current running configuration information
Sw1924_b#show int e0/1; first port information view switch
MAC address binding ports based on
Switch#config terminal enter configuration mode
Switch (config Interface FastEthernet) # 0/1 into the specific interface configuration mode
Switch (config-if) #Switchport port-secruity configure port security mode
Switch (config-if) switchport port-security mac-address MAC (address MAC)
To configure the port to bind the host MAC address
Switch (config-if) no switchport port-security mac-address MAC (address MAC)

Delete the MAC address of the host.
Cisco router: Cisco 2921 router more information on 3anetwork.com.

没有评论:

发表评论