Cisco Packet Tracer简单命令使用

# 交换机操作模式:
  1.用户模式
    Swtich>
  2.特权模式
    Swtich#
  3.全局配置模式
    Swtich(config)#
  4.端口模式
    Swtich(config-if)#

# 交换机顶层命令
connect 打开终端连接
disable 关闭特权命令
disconnect 断开现有的网络连接
enable 进入特权模式
exit 退出执行
logout 退出执行
ping 发送回应消息
resume 恢复活动的网络连接
show 显示运行系统信息
telnet 打开telnet连接
terminal 设置终端线路参数
traceroute 跟踪到达目的地的路由

# enable 进入特权模式
clear 复位功能
clock 管理系统时钟
configure 进入配置模式
connect 打开终端连接
copy Copy from one file to another
debug Debugging functions (see also 'undebug')
delete Delete a file
dir List files on a filesystem
disable 关闭特权命令
disconnect 断开现有的网络连接
enable 打开特权命令
erase 删除一个文件系统
exit 退出执行
logout 退出执行
more 显示文件的内容
no 禁用调试信息
ping 发送回应消息
reload 停止并执行冷重启
resume 恢复活动的网络连接
setup 运行安装命令工具
show 显示运行系统信息
ssh Open a secure shell client connection
telnet Open a telnet connection
terminal Set terminal line parameters
traceroute Trace route to destination
undebug Disable debugging functions (see also 'debug')
vlan Configure VLAN parameters
write Write running configuration to memory, network, or terminal


# configure terminal 进入全局配置模式
access-list 添加访问列表项
banner 定义登录横幅
boot 启动命令
cdp Global CDP configuration subcommands
clock Configure time-of-day clock
crypto Encryption module
do To run exec commands in config mode
enable Modify enable password parameters
end 退出配置模式
exit 退出配置模式
hostname 设置系统的网络名
interface 选择要配置的接口
Ethernet IEEE 802.3
FastEthernet IEEE 802.3快速以太网 0/1==槽位/该槽位下的端口
GigabitEthernet GigabitEthernet IEEE 802.3z
Port-channel 接口以太网通道
Vlan Catalyst Vlans
range 接口范围命令

ip 全局IP配置的子命令
line 配置终端线路
access-class 基于IP访问列表的筛选器连接
databits 设置每个字符的数据位数
exec-timeout 设置执行超时
exit 退出行配置模式
flowcontrol 设置流程控制
history 启用和控制命令历史函数
ipv6 IPv6选项
logging 修改消息记录设施
login 启用密码检查
motd-banner 使旗帜的公告显示
no 否定命令或设置默认值
parity 设置终端平价
password 设置一个密码
privilege 更改行的权限级别
speed 设置发送和接收速度
stopbits 设置异步线停止位
transport 定义线路传输协议

logging 修改消息记录设施
mac Mac配置
mac-address-table 配置MAC地址表
mls mls global commands
no Negate a command or set its defaults
port-channel EtherChannel configuration
privilege 特权命令参数
service Modify use of network based services
snmp-server Modify SNMP engine parameters
spanning-tree Spanning Tree Subsystem
username Establish User Name Authentication
vlan VLAN的命令
vtp Configure global VTP state

# 端口模式命令
cdp 全球CDP配置分区
channel-group 以太通道/端口捆绑配置
channel-protocol 选择频道(LACP协议,PAgP)
description 具体描述接口
duplex 配置双工操作。
exit 退出接口配置模式
ip 接口因特网协议配置命令
mdix 设置与媒体相关的交叉接口
mls MLS接口命令
no 否定命令或设置默认值
shutdown 关闭选定的接口
spanning-tree 树跨越计算机子系统
speed 配置速度操作
storm-control 风暴的配置
switchport 设置开关模式特性
tx-ring-limit 配置PA级传输环限制

# 常用命令整理
## enable 进入特权模式
### configure terminal 进入全局配置模式

# enable password 123456 设置进入特权模式的密码

# 进入端口配置模式
#### interface fastEthernet 0/1 配置快速以太网端口

# 配置交换机的IP地址
#### interface Vlan 1 配置Vlan相关信息
##### ip address 192.168.1.1 255.255.255.0
##### no shutdown 开启Vlan 1开启状态

# line vty <0-15> <1-5> 配置虚拟终端
### password admin 设置进入虚拟终端的密码
### login 启动密码检测

# 虚拟局域网(同在一个虚拟局域网中才能访问)
enable 进入特权模式
configure terminal 进入全局配置模式
vlan 2 激活2号虚拟局域网
interface fastEthernet 0/1 进入交换机一号端口
switchport access vlan 2 将一号端口分配到2号虚拟局域网中

原文地址:https://www.cnblogs.com/zhanghuizong/p/7588341.html