1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| #特权模式
enable
#全局配置模式
configure terminal
#保存
write memory
#恢复出厂
erase startup-config
#重启
reload
#配置端口
interface GigabitEthernet1/0/1
no shutdown
shutdown
description xxx
#配置trunk
switchport mode trunk
switchport trunk allowed vlan 10,20
#配置access
switchport mode access
switchport access vlan 10
#创建/删除VLAN
vlan 10
name Sales
no vlan 10
#VLAN列表信息
show vlan brief
#查看端口状态
show ip interface brief
show interfaces GigabitEthernet1/0/1
#MAC地址表
show mac address-table
#查看运行配置
show running-config
#查看路由表
show ip route
|