一、视图介绍
用户视图》》系统视图》》》接口视图》》协议视图
二、 常用查看指令
指令 | 介绍 | 缩写 |
display current-configuration | 查看当前配置 | dis cu |
display hotkey | 查看快捷键使用 | |
display version | 查看版本、硬件信息 | dis ver |
display interface g0/0/0 | 查看接口 | dis int g0/0/0 |
display users | 查看用户 | dis users |
display ip interface brief | 查看当前ip接口 | |
dis mac-address | 查看mac地址 | |
display vlan | 查看vlan | |
display port vlan | 查看vlan 接口情况 | |
display arp all | 查看arp 表 | |
display stp | 查看stp | |
display stp brief | 查看stp端口状态 | |
display ip routing-table | 查看路由表 | dis ip rou |
display fit | 查看转发表 | |
三、常用指令:
1.添加一个接口地址
<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.1.1 24
2.移除接口地址 undo 开头
[R1-GigabitEthernet0/0/0] undo ip add 10.1.1.1 24
3.创建一个vlan和多个vlan
创建一个vlan 是vlan 10
[R1]vlan 10
[R1-vlan10]q
[R1]dis vlan
* : management-vlan
---------------------
The total number of vlans is : 2
VLAN ID Type Status MAC Learning Broadcast/Multicast/Unicast Property
--------------------------------------------------------------------------------
1 common enable enable forward forward forward default
10 common enable enable forward forward forward default
4.创建多个vlan需要加batch
创建多个vlan 是vlan batch 20 30 40
[R1]vlan batch 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[R1]dis vlan
* : management-vlan
---------------------
The total number of vlans is : 5
VLAN ID Type Status MAC Learning Broadcast/Multicast/Unicast Property
--------------------------------------------------------------------------------
1 common enable enable forward forward forward default
10 common enable enable forward forward forward default
20 common enable enable forward forward forward default
30 common enable enable forward forward forward default
40 common enable enable forward forward forward default
5.移除多个接口
undo vlan batch 30 40
[R1]undo vlan batch 30 40
Warning: The configurations of the VLAN will be deleted. Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.
[R1]dis vlan
* : management-vlan
---------------------
The total number of vlans is : 3
VLAN ID Type Status MAC Learning Broadcast/Multicast/Unicast Property
--------------------------------------------------------------------------------
1 common enable enable forward forward forward default
10 common enable enable forward forward forward default
20 common enable enable forward forward forward default