当前位置:文档之家› 思科命令整理

思科命令整理

路由器
1.hostname 修改主机名
2.no ip domain-lookup 关闭域名解析
3.line console 0 进入console端口配置(password密码可配置console密码)
4.exec-timeout 分钟秒数设置超时退出时间
5.int 端口进入端口
6.no shutdown 开启端口(思科路由器端口默认关闭状态)
7.ip address IP地址配置端口IP
8.password 密码配置密码生效
9.login密码生效
10.line vty 0 4 进入vty虚拟链路
11.enable secret 密码配置特权模式密码
ername 名字privilege 几个用户password密码
创建名为()密码为()且权限为()的用户,最高权限为15
13.login local 使用用户认证
14.ip domain-name 域名配置主机域
15.crypto key generate rsa 生成rsa密钥对
16.How many bits in the modulus [512]:1024 秘钥长度,建议1024以上
17.ip ssh version 2(2是版本)选择SSH版本
18.ip ssh time-out 时间SSH登录超时时间
19.transport input ssh 设置允许SSH的流量(默认是不允许)
20.show ip interface brief 查看端口简要信息
21.show running-config 查看运行配置文件
22.show port-security address ? 查看绑定的mac地址
23.write 保存配置
24.reload 重启路由器
交换机
1.interface vlan进入vlan配置
2.ip address IP地址配置端口IP和子网掩码
3.interface 端口进入端口
4.switchport mode access 修改端口模式为access
5.switchport port-security 开启端口安全
6.switchport port-security maximum 1 允许绑定的Mac数量最多为1
7.switchport port-security mac-address sticky 与当前连接的mac地址进行绑定
8.switchport port-security violation shutdown 检测到其他mac地址,端口会关闭(管理手动开启以后才能用)。

相关主题