① 華為交換機命令大全
aaa 解釋AAA
acl 解釋 Specify ACL configuration information
alarm解釋 Enter the alarm view
anti-attack 解釋 Specify anti-attack configurations
application-apperceive 解釋 Set application-apperceive information
arp 解釋 ARP mole
arp-miss 解釋 Specify ARP MISS configuration information
arp-suppress 解釋 Specify arp suppress configuration information, default is disabled
authentication 解釋 Authentication
autoconfig 解釋 AutoConfig configuration information
bfd 解釋 Specify BFD(Bidirectional Forwarding Detection)configuration information
bgp 解釋 Border Gateway Protocol(BGP)
bootrom 解釋 BootRom
bp 解釋 BPDU message
btv 解釋 Btv view
bulk-file 解釋 Specify the file name of bulk statistics
bulk-stat 解釋 Set bulk statistics
capture-packet 解釋 Capture-packet
ccc 解釋 Circuit cross connection
cfm 解釋 Connectivity fault management
clear 解釋 Cancel current configuration
cluster 解釋 Specify the information for cluster configuration
command-privilege 解釋 Specify the command level
cp-car 解釋 Cpu car setting
cpu-defend 解釋 Configure CPU defend policy
cpu-defend-policy 解釋 Configure CPU defend policy
cpu-usage 解釋 Set cpu usage configuration
dhcp 解釋 Dynamic host configure protocol
dhcp-snooping 解釋 DHCP snooping
dhcpv6 解釋 DHCPv6
diffserv 解釋 Specify diffserv parameters
display 解釋 Display priority information
dldp 解釋 Device link detection protocol
dns 解釋 Specify domain name system
domain 解釋 Default domain
dot1x 解釋 802.1x configuration information
drop 解釋 Discard attribute
drop-profile 解釋 Drop profile
dsa 解釋 Specify DSA mole configurations
e-trunk 解釋 E-Trunk
ecmp 解釋 ECMP
efm 解釋 EFM mole
erps 解釋 Ethernet ring protection switching
error-down 解釋 The interface was shut down because of an error event
event 解釋 Enter the event view
execute 解釋 Batch command
fib 解釋 FIB status and configuration information
file 解釋 Specify file system configuration information
ftp 解釋 Set the FTP server attributes
garp 解釋 Generic Attribute Registration Protocol
gtsm 解釋 The generalized TTL security mechanism
gvrp 解釋 Generic VLAN Registration Protocol
header 解釋 Define the login banner
hwtacacs 解釋
hwtacacs-server 解釋
icmp 解釋 Specify ICMP configuration information
icmp-reply 解釋 Enable ICMP reply fast
igmp 解釋 Specify IGMP configuration information
igmp-snooping 解釋 Specify parameters for IGMP-Snooping
info-center 解釋 Specify message output configuration information
interface 解釋 Specify the interface configuration view
ip 解釋 Specify IP configurations for the system
ipv4 解釋 Configure ip packet
ipv6 解釋 Enable IPv6 functionality
isis 解釋 Intermediate System to Intermediate System (ISIS) routes
keychain 解釋 Keychain authentication
l2-topology 解釋 Layer 2 topology
l2protocol-tunnel 解釋 Layer 2 protocol tunnel
lacp 解釋 Link aggregation control protocol
lldp 解釋 Link Layer Discovery Protocol
load-balance 解釋 Specify load balance mode
loopback-detect 解釋 Loopback detect function
lspv 解釋 Lsp verification
mac-address 解釋 Mac address
mac-authen 解釋 MAC authenticate configure information
mac-forced-forwarding 解釋 Mac-Forced Forwarding
mac-learning 解釋 MAC learning
mac-spoofing-defend 解釋 MAC spoofing defend
matched 解釋 Is Command can be matched by upper template
mip解釋 Configure a rule used to create MIP
mld-snooping 解釋 Specify parameters for MLD-Snooping
monitor-link 解釋 Monitor link configuration information
mpls 解釋 Specify MPLS(Multiprotocol Label Switching) configuration information
mpls-qos 解釋 MPLS QoS
msdp 解釋 Specify MSDP(Multicast Source Discovery Protocol) configuration information
mtrace 解釋 Trace route to multicast source
multicast 解釋 Multicast information
nap 解釋 NAP protocol
nd 解釋 Neighbor discovery
ndp 解釋 Neighbor discovery protocol
nqa 解釋 Network Quality Analysis(NQA)
nqa-jitter 解釋 Switch NQA jitter version
nqa-server 解釋 Specify NQA echo server
ntdp 解釋 Network topology discovery protocol
ntp-service 解釋 Specify NTP (Network Time Protocol) configuration information
oam-mgr 解釋 Oam-mgr view
observe-port 解釋 Configure observe port feature
ospf 解釋 Open Shortest Path First (OSPF)
ospfv3解釋 OSPF version 3 for IPv6
pim 解釋 Specify PIM(Protocol Independent Multicast) configuration information
ping 解釋 Ping function
policy-based-route 解釋 Specify a policy for policy based routing
port-group 解釋 Port-group
port-isolate 解釋 Port isolate
port-mirroring 解釋 Mirror port
portal 解釋 Configure Portal local server
portswitch 解釋 Switch port between router and switch mode
pppoe 解釋 PPPOE
pw-template 解釋 Specify PW template configuration
qos 解釋 QoS configuration
quit 解釋 Exit from current command view
radius-server 解釋 Add or delete RADIUS server template
refresh 解釋 Refresh routes to I/O board
reset 解釋 Reset operation
return 解釋 Exit to user view
rip 解釋 RIP (Routing Information Protocol)
ripng 解釋 RIPng (Routing information next generation protocol)
rmon 解釋 Specify RMON configuration
rmon2 解釋 Specify RMON2 configuration
route 解釋 Routing Mole
route-policy 解釋 Route-policy
route-policy-change 解釋 Specify route policy change parameter
router 解釋 Configure router information
rrpp 解釋 Rapid ring protection protocol
rsa 解釋 Specify RSA mole configuration information
scp 解釋 Set SCP server
screen-width 解釋 Set screen width
script-string 解釋 Define a modem script-string
sep 解釋 Smart ethernet protection
service 解釋 Toggle service mode. By default it is off
set 解釋 Set
sftp 解釋 Set SFTP service attribute
smart-link 解釋 Smart link configuration information
snmp-agent 解釋 Specify SNMP (Simple Network Management Protocol) configuration information
ssh 解釋 Set the SSH (secure shell) configuration attribute
stack 解釋 Stack
static-lsp 解釋 Static LSP configuration
stelnet 解釋 Set Stelnet service attribute
stp 解釋 Specify Spanning Tree Protocol (STP) configuration information
super 解釋 Modify super password parameters
sysname 解釋 Specify the host name
tcp 解釋 Specify TCP(Transmission Control Protocol) configuration information
telnet 解釋 Set the status of the Telnet service
temperature 解釋 Device temperature
test-aaa 解釋 Accounts test
test-packet 解釋 Set the test packet
tftp 解釋 Establish a TFTP connection
tftp-server 解釋 TFTP server
time-range 解釋 Specify time-range configuration information
trace 解釋 Trace route (switch) to host on Data Link Layer
tracert 解釋 Trace route to host
traffic 解釋 Specify traffic configuration information
traffic-delete 解釋 Delete sacl
traffic-filter 解釋 Filter packets based on acl
traffic-limit 解釋 Limit the rate of the packets based on acl
traffic-mirror 解釋 Mirror packets based on acl
traffic-policy 解釋 Apply specific traffic policy
traffic-redirect 解釋 Redirect packets based on acl
traffic-remark 解釋 Remark packets based on acl
traffic-statistic 解釋 Count packets based on acl
trunk 解釋 Trunk interface
ttl 解釋 Time to live
tunnel-selector 解釋 Tunnel-policy selector
udp-helper 解釋 UDP Helper
undo 解釋 Cancel current configuration
unknown-unicast 解釋 Unknown unicast
upgrade 解釋 Upgrade software online
user-bind 解釋 User bind
user-group 解釋 User group
user-interface 解釋 Configure the user terminal interface
vlan 解釋 Virtual LAN
voice-vlan 解釋 Voice VLAN
vrrp 解釋 Specify configuration information about VRRP
web-auth-server 解釋 Portal authentication server
② 思科交換機常用命令及配置
1.設置主機名/系統名 switch(config)# hostname 「hostname」 switch(enable) set system name name-string
2.設置登錄口令 switch(config)# enable password level 1 password switch(enable) set password
switch(enable) set enalbepass
3.設置遠程訪問 switch(config)# inte***ce vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-address
switch(enable) set inte***ce sc0 vlan
switch(enable) set ip route default gateway
4.啟用和瀏覽CDP信息 switch(config-if)# cdp enable
switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} mole/port
5、給交換機配置使能密碼,進入特權模式時需要輸入密碼才能進入,避免設備可以被其他人員使用。cisco-sw1(config)#enable secret ciscoswitchps:secret表示密碼用的密文
6、交換機配置VLAN,並給將埠加入到該VLAN:cisco-sw1(config)#vlan 2cisco-sw1(config-vlan)#name testcisco-sw1(config-vlan)#exitcisco-sw1(config)#interface fastEthernet 0/1cisco-sw1(config-if)#switchport mode accesscisco-sw1(config-if)#switchport access vlan 2
7、進入交換機某一埠switch enableswitch#configure terminalswitch(conf)# interface fastehernet 0/1switch(conf-if)#
8、show:查看命令,交換機的所有配置和其它相關信息都需要通過show命令查看。switch enableswitch# show version 察看系統中的所有版本信息switch#show vlan id 1 查看交換機有關vlan配置信息switch#show running-configure 查看交換機當前起作用的配置信息switch#show interface fastethernet 0/1 察看交換機1 介面具體配置和統計信息switch#show mac-address-table 查看mac地址轉發表
9、交換機恢復出廠switch enableswitch# erase startup-configureswitch# reload
10、telnet 遠程登錄設置:switchenswitch#configure terminalswich(conf)#enable password cisco 以cisco 為特權模式密碼swich(conf)#interface vlan 1 以vlan 1埠作為遠程登錄的介面,其他埠亦可swich(conf-if)#ip address 192.168.1.1 255.255.255.0swich(conf-if)#no shutswich(conf-if)#exitswich(conf)line vty 0 4 設置0-4 個用戶可以telnet 遠程登陸swich(conf-line)#password 123456swich(conf-line)#login
11、SSH遠程登錄設置:Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname cisco-sw1
交換機重新命名cisco-sw1(config)#ip domain-name cisco.com
配置域名cisco-sw1(config)#line vty 0 4cisco-sw1(config-line)#transport input ssh
登錄方式為SSHcisco-sw1(config-line)#exitcisco-sw1(config)#crypto key generate rsa
配置秘鑰The name for the keys will be: cisco-sw1.cisco.comChoose the size of the key molus in the range of 360 to 2048 for yourGeneral Purpose Keys. Choosing a key molus greater than 512 may takea few minutes.How many bits in the molus [512]: 1024
思科推薦使用1024% Generating 1024 bit RSA keys, keys will be non-exportable