-
2020-03-18 19:28:28
sh pri //查看权限等级
sh run //显示配置信息
sh ip interface brief //查看所有接口状态、地址信息
sh ip route //查看路由表
sh run | s rip 查看rip的配置
sh ip route rip //通过rip学习到的路由
sh run int f0/0 查看f0/0接口的配置
sh vtp status //查看vtp参数
sh vtp pass //查看vtp密码
sh ip nat tr//查看nat转换
sh ip access-list//查看访问控制列表
sh controllers s0/0/0 //查看接口信息
Router#sh ip eigrp neighbors//查看邻居信息
Router#sh ip eigrp topology all-links//去往目的网络的所有信息
sh run | s eigrp //查看eigrp
sh ip eig int //哪些接口宣告进eigrp
clear ip eigrp neighbors//清除eigrp邻居关系
sh ip route 10.1.18.0 255.255.254,0 //查看某条路由的具体信息
Router(config)#no ip domain lookup//防止卡住
Router#sh ip os ne //查看ospf邻居
Router#sh ip os int bri
sh ip os database//查看数据库
sh ip os virtual//查看ospf虚拟链路
erase startup-config//清空所有配置
sh ip os int f1/0//查看接口ospf相关信息
sh ip bgp sum //查看bgp邻居
no logging console 关闭日志提示
sh ip bgp //bgp 转发表
clear ip bgp * soft //软清bgp
clear ip bgp *//强制清除bgp,工作环境中禁止使用
clear ip bgp * 邻居地址//清楚邻居
sh int tr //查看trunk口
sh spanning-tree//查看生 成树
sh etherchannel sum//查看链路捆绑之后的信息
sh vrrp
sh vrrp bri
sh ip pim rp 查看rp
sh ipv6 route 查看ipv6路由表
sh bgp ipv6 unicast sum 查看ipv6bgp邻居
sh cry isa sa 查看阶段一
sh cry ipsec sa 检查阶段二
sh cry engine connections active 检查加解密
ip domain lookup 开启域名查找功能
sh cry isa policy 查看定义策略
sh bgp vpnv4 unicast all su //检查vpnv4邻居建立
sh ip cef cef表查看
sh ip router vrf xxx 查看vrf路由
sh tcp bri 查看tcp链接
sh mpls ip binding
sh mpls forwarding-table FIB转发表
sh ip cef vrf A 1.1.1.1 255.255.255.255
logg con 打开提示信息
sh ip os int br 查cost值
do sh hist 查看历史输入
更多相关内容 -
思科CISCO常用命令汇总
2021-02-19 08:44:314.reload命令 router#reload / 重新启动路由器 (热启动)冷启动就是关闭路由器再打开电源开关 5.show 命令 特权模式下:router#show ip route /查看当前的路由表router#cleariproute*/清楚当前的路由表 router#...视图模式介绍
1.普通视图router>
2.特权视图router# / 在普通模式下输入enable
3.全局视图router(config)#/ 在特权模式下输入configt
4.接口视图router(config-if)#/在全局模式下输入int 接口名称例如int s0 或 int e0
5.路由协议视图router ( config-route ) #/ 在全局模式下输入router 动态路由协议名称
1基本配置:
1. router>enable / 进入特权模式
2. router#conft / 进入全局配置模式
3. router(config)#hostname xxx
/设置设备名称就好像给我们的计算机起个名字
4. router(config)#enable password xxx /设置特权口令
5. router(config)#no ip domain lookup
/不允许路由器缺省使用DNS解析命令
6. router(config)#Service password-encryption
/对所有在路由器上输入的口令进行暗文加密
7. router(config)#line vty 0 4 /进入设置telnet服务模式
router(config-line)#password xxx /设置 telnet 的密码
router(config-line)#login /使能可以登陆
8. router(config)#line con 0 /进入控制口的服务模式
router(config-line)#password xxx /要设置 console 的密码 router(config-line)#login /使能可以登陆
2接口配置
1. router(config)# int s0
/ 进入接口配置模式serial 0 端口配置 (如果是模块化的路由器前面加上槽 位编号,例如serial0/0 代表这个路由器的0 槽位上的第一个接口)
2.router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
/ 添加 ip 地址和掩码
3.router(config-if)#enca hdlc
/ppp捆绑链路协议hdlc 或者 ppp 思科缺省串口封装的链路层协议 是 HDLC 所以在 show run 配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp 或者 enca fr 4.router(config)#int loopback
/建立环回口(逻辑接口 )模拟不同的本机网段
router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
/ 添加ip 地址和掩码给环回口在物理接口 上配置了ip 地址后用no shut 启用这个物理接口反之可以用shutdown 管理性的关闭接口
3路由配置
1.静态路由
router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一跳或自己的接口
2.缺省路由
router(config)#ip route 0.0.0.0 0.0.0.0 s0添加缺省路由
3.动态路由rip 协议
router(config)#router rip /启动 rip 协议
router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#version 2 /转 换为 rip2 版本
router(config-router)#noauto-summary
/关闭自动汇总功能,ripV2才有作用
router(config-router)#passive-in 接 口 名
/ 启 动 本 路 由 器 的 那 个 接 口 为 被 动 接 口
router(config-router)#neixxx.xxx.xxx.xxx/广播转单播报文,指定邻居的接 ip
4.动态路由eigrp 协议
router(config)#router eigrp xxx /启动 eigrp 协议
router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段
router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡eigrp 协议
router(config-router)#noauto-summary /关闭自动汇总功能ospf 协议
5.动态路由ospf协议
router(config)router ospf xxx /启动协议
router(config-router)network xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx(反掩码)area xxx
/ 宣告自己的接口 或网段在ospf 的区域中可以把不同接口宣告在不同区域中
4保存当前修改/运行的配置:
1.router#write
/将 RAM 中的当前配置存储到NVRAM 中,下次路由器启动就是执行保存的配置
2.router#Copy running-config startup-config
/命令与write 效果一样
5一般常用命令
1.exit命令
router(config-if)#exit
router(config)# router
(config-router)#exit
router(config)#
router(config-line)#exit
router(config)# router
(config)#exit
router#
exit 命令 / 从接口、协议、line 等视图模式下退回到全局配置模式,或从全局配置模式退回到特权模式
2.end命令
router(config-if)#end
router(config-router)#end
router(config-line)#end
router#
end 命令 / 从任何视图直接回到特权模式
3.logout
router#Logout
/ 退出当前路由器登陆模式相对与windows 的注销
4.reload命令
router#reload
/ 重新启动路由器 (热启动)冷启动就是关闭路由器再打开电源开关
5.show 命令
特权模式下:router#show ip route
/查看当前的路由表router#cleariproute*/清楚当前的路由表
router#show ip protocol
/查看当前路由器运行的动态路由协议情况
router#show ip int brief
/查看 当前的路由器的接口ip地址启用情况
router#show running-config
/查看当前运行配置
router#show startup-config
/查看启动配置
router#debug ip pack
/ 打开 ip 报文的调试
router#terminal monitor
/ 输出到终端上显示调试信息
router#show ip eigrp neighbors
/查看 eigrp 协议的邻居表
router#show ip eigrp topology
/查看 eigrp 协议 的拓朴表
router#show ip eigrp interface
/查 看当然路由器运行eigrp协议的 接口情况
router#show ip ospf neighbor
/查看当前路由器的ospf 协议的邻居表
router#show ip ospf interface
/查看当然路由器运行ospf协议的接口情况
router#clear ip ospf process
/ 清楚当然路由器ospf 协议的进程
router#Show interfaces
/ 显示设置在路由器和访问服务器上所有接口的统计信息. 显示路由器 上配置的所有接口的状态
router#Show interfaces serial
/ 显示关于一个串口的信息
router#Show ip interface
/列出一个接口的IP 信息和状态的小结,列出接口的状态和全局参数
-
cisco各类设备查看信息命令归纳.docx
2020-01-01 17:50:268、打开RIP协议调试命令 Router #debug ip rip 9、检测PPP连接状态和协商过程 Router #debug ppp packet 10、查OSPF邻居列表 Router #show ip ospf neighbor (detail)详细 11、查链路状态数据库 Router #show ... -
Cisco思科光纤交换机配置说明及常用命令
2020-10-01 13:12:46Cisco思科光纤交换机怎么配置呢?相信很多网友还是不太了解,下面就为大家收集的Cisco思科光纤交换机配置说明教程,一起来看看了解下 -
CISCO 路由器 常用巡检命令
2018-12-26 17:00:44CISCO 路由器 常用巡检命令 -
CISCO命令全集-思科命令汇总.md
2021-06-28 11:56:41CISCO命令全集-思科命令汇总.md -
思科设备命令大全
2021-12-14 21:12:48模式转换命令 用户模式----特权模式,使用命令"enable" 特权模式----全局配置模式,使用命令"config t" 全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,...模式转换命令
-
用户模式----特权模式,使用命令"
enable
" -
特权模式----全局配置模式,使用命令"
config t
" -
全局配置模式----接口模式,使用命令"
interface+接口类型+接口号
" -
全局配置模式----线控模式,使用命令"
line+接口类型+接口号
"
注:
-
用户模式:查看初始化的信息.
-
特权模式:查看所有信息、调试、保存配置信息
-
全局模式:配置所有信息、针对整个路由器或交换机的所有接口
-
接口模式:针对某一个接口的配置
-
线控模式:对路由器进行控制的接口配置
基本配置命令
命令 描述 enable 从用户模式进入特权模式 configure terminal 进入配置模式 interface g0/0 进入千兆以太网接口模式 ip address 172.16.0.1 255.255.0.0 配置接口的ip 地址 no shutdown 打开接口 line vty 0 4 进入虚拟终端vty 0 - vty 4 password CISCO 配置密码 login 用户要进入路由器,需要先进行登录 exit 退回到上一级模式 enable password CISCO 配置进入特权模式的密码,密码不加密 end 直接回到特权模式 show int g0/0 显示g0/0 接口的信息 hostname Terminal-Server 配置路由器的主机名 enable secret ccielab 配置进入特权模式的密码,密码加密 no ip domain-lookup 路由器不使用DNS 服务器解析主机的IP 地址 logging synchronous 路由器上的提示信息进行同步,防止信息干扰我们输入命令 no ip routing 关闭路由器的路由功能 ip default-gateway 10.1.14.254 配置路由器访问其他网段时所需的网关 show line 显示各线路的状态 line 33 48 进入33-48 线路模式 transport input all 允许所有协议进入线路 int loopback0 进入loopback0 接口 ip host R1 2033 1.1.1.1 为1.1.1.1 主机起一个主机名 alias exec cr1 clear line 33 为命令起一个别名 privilege exec level 0 clear line 把命令clear line 的等级改为0,在用户模式下也可以执行它 banner motd 设置用户登录路由器时的提示信 clock set 设置路由器的时间 show clock 显示路由器的时间 show history 显示历史命令 terminal no editing 关闭CLI 的编辑功能 terminal editing 打开CLI 的编辑功能 terminal history size 50 修改历史命令缓冲区的大小 copy running-config startup-config 把内存中的配置文件保存到NVRAM 中 clock rate 128000 配置串口上的时钟(DCE 端) show version 显示路由器的IOS 版本等信息 show running-config 显示内存中的配置文件 show startup-config 显示NVRAM 中的配置文件 show interface s0/0/0 显示接口的信息 show flash 显示flash 的有关信息 show controllers s0/0/0 显示s0/0/0 的控制器信息 show ip arp 显示路由器中的arp 表 copy running-config tftp 把内存中的配置文件拷贝到tftp 服务器上 copy tftp running-config 把tftp 服务器上的配置文件拷贝到内存中 copy flash:c2800nm-adventerprisek9-mz.124-11.T1.bin tftp 把flash 中的IOS 拷贝到tftp 服务器上 confreg 0x2142 在rommon 模式下修改配置寄存器值 i 在rommon 模式下重启路由器 copy startup-config running-config 把NVRAM 中的配置文件拷贝到内存中 config-register 0x2102 修改配置寄存器值 reload 重启路由器 delete flash:c2800nm-adventerprisek9-mz.124-11.T1.bin 删除flash 中的IOS copy tftp flash 从tftp 服务器上拷贝IOS 到flash 中 tftpdnld rommon 模式下,从tftp 服务器下载IOS show cdp 显示CDP 运行信息 show cdp interface 显示CDP 在各接口的运行情况 show cdp neighbors 显示CDP 邻居信息 show cdp entry R2 显示CDP 邻居R2 的详细信息 clear cdp table 清除CDP 邻居表 no cdp enable 接口下关闭CDP no cdp run/ cdp run 关闭/打开整个路由器的CDP cdp timer 30 CDP 每30 秒发送一次 cdp holdtime 120 让邻居为本设备发送的CDP 消息保持120 秒 静态路由相关配置
命令 描述 ip route X.X.X.X 掩码 接口或者下一条ip地址 配置静态路由 show ip route 查看路由表 ip classless/ no ip classless 打开/关闭有类路由功能 ping 2.2.2.2 source loopback 0 指定源端口进行ping 测试 RIP命令汇总
命令 描述 show ip route 查看路由表 show ip protocols 查看IP 路由协议配置和统计信息 show ip rip database 查看RIP 数据库 debug ip rip 动态查看RIP 的更新过程 clear ip route * 清除路由表 router rip 启动RIP 进程 network 通告网络 version 定义RIP 的版本 no auto-summary 关闭自动汇总 ip rip send version 配置RIP 发送的版本 ip rip receive version 配置RIP 接收的版本 passive-interface 配置被动接口 neighbor 配置单播更新的目标 ip summary-address rip 配置RIP 手工汇总 key chain 定义钥匙链 key key-id 配置Key ID key-string 配置Key ID 的密匙 ip rip triggered 配置触发更新 ip rip authentication mode 配置认证模式 ip rip authentication key-chain 配置认证使用的钥匙链 timers basic 配置更新的计时器 maximum-paths 配置等价路径的最大值 ip default-network 向网络中注入默认路由 EIGRP相关配置命令
命令 描述 show ip eigrp neighbors 查看EIGRP 邻居表 show ip eigrp topology 查看EIGRP 拓扑结构数据库 show ip eigrp interface 查看运行EIGRP 路由协议的接口的状况 show ip eigrp traffic 查看EIGRP 发送和接收到的数据包的统计情况 debug eigrp neighbors 查看EIGRP 动态建立邻居关系的情况 debug eigrp packets 显示发送和接收的EIGRP 数据包 ip hello-interval eigrp 配置EIGRP 的HELLO 发送周期 ip hold-time eigrp 配置EIGRP 的HELLO hold 时间 router eigrp XX 启动EIGRP 路由进程 no auto-summary 关闭自动汇总 ip authentication mode eigrp 配置EIGRP 的认证模式 ip authentication key-chain eigrp 在接口上调用钥匙链 variance 配置非等价负载均衡 delay 配置接口下的延迟 bandwidth 配置接口下的带宽 ip summary-address eigrp 手工路由汇总 OSPF相关配置命令
命令 描述 show ip route 查看路由表 show ip ospf neighbor 查看OSPF 邻居的基本信息 show ip ospf database 查看OSPF 拓扑结构数据库 show ip ospf interface 查看OSPF 路由器接口的信息 show ip ospf 查看OSPF 进程及其细节 debug ip ospf adj 显示OSPF 邻接关系创建或中断的过程 debug ip ospf events 显示OSPF 发生的事件 debug ip ospf packet 显示路由器收到的所有的OSPF 数据包 router ospf 启动OSPF路由进程 router-id 配置路由器ID network 通告网络及网络所在的区域 ip ospf network 配置接口网络类型 ip ospf cost 配置接口cost 值 ip ospf hello-interval 配置hello 间隔 ip ospf dead-interval 配置OSPF 邻居的死亡时间 ip ospf priority 配置接口优先级 auto-cost reference-bandwidth 配置参考带宽 clear ip ospf process 清除OSPF 进程 area area-id authentication 启动区域简单口令认证 ip ospf authentication-key cisco 配置认证密码 area area-id authentication message-digest 启动区域MD5 认证 area area-id range 区域间路由汇总 area area-id stub 把某区域配置成末节区域 area area-id stub no-summary 把某区域配置成完全末节区域 area area-id nssa 把某区域配置成NSSA 区域 area area-id virtual-link 配置虚链路 ip ospf message-digest-key key-id md5 key 配置key ID 及密匙 ip ospf authentication 启用链路简单口令认证 ip ospf authentication message-digest 启用链路MD5 认证 default-information originate 向OSPF 区域注入默认路由 show ip route 查看路由表 show ip ospf neighbor 查看OSPF 邻居的基本信息 show ip ospf database 查看OSPF 拓扑结构数据库 show ip ospf interface 查看OSPF 路由器接口的信息 show ip ospf 查看OSPF 进程及其细节 show ip ospf database router 查看类型1 的LSA 的全部信息 redistribute 路由协议重分布 summary-address 外部路由汇总 encapsulation frame-relay 接口封装帧中继 no frame-relay inverse-arp 关闭帧中继逆向ARP 解析 frame-relay interface-dlci 帧中继映射 frame-relay map ip 帧中继映射 IS-IS基本配置命令
命令 描述 show clns neighbors 查看CLNS 邻居 show clns protocols 查看CLNS 路由协议相关的信息 show clns interface 查看CLNS 接口状态的信息 show clns route 查看CLNS L2 路由 clear clns route 清除CLNS 路由表 clear isis * 清除IS-IS 链路状态数据库 show clns traffic 查看CLNS 协议的统计信息 show isis hostname 查看主机名和系统ID 的动态对应关系 show isis database 查看IS-IS 链路状态数据库 show isis topology 查看IS-IS 拓扑结构信息 show isis route 查看CLNS L1 的路由表 show frame-relay map 查看帧中继映射 show ip protocols 查看和IP 路由协议相关的信息 router isis 启动IS-IS 路由进程 net 配置NET 地址 ip router isis 接口下启用IS-IS is-type 配置IS-IS 路由器类型 area-password 配置区域认证 isis password 配置邻居认证 domain-password domain 配置域认证 default-information originate 向IS-IS 网络注入默认路由 summary-address 配置区域间路由汇总 isis circuit-type 配置接口电路类型 frame-relay map clns 配置CLNS 映射 BGP基本配置命令
命令 描述 show tcp brief 查看TCP 连接信息摘要 show ip bgp neighbors 查看邻居的TCP 和BGP 连接的详细信息 show ip bgp summary 查看BGP 连接的摘要信 show ip bgp 查看BGP 表的信息 show ip bgp community 查看BGP 团体属性 clear ip bgp * 重置BGP 连接 router bgp 启动BGP 进程 no synchronization 关闭同步 synchronization 打开同步 bgp router-id 配置BGP 路由器ID neighbor ip-address remote-as 配置邻居路由器及所在的AS neighbor ip-address update-source 指定更新源 neighbor ip-address next-hop-self 配置下一跳自我 route-reflector-client 配置RR 客户端 network 通告网络 aggregate-address 配置地址聚合 ip prefix-list 配置前缀列表 set origin egp 设置起源代码为EGP set as-path prepend 配置追加AS-PATH set local-preference 设置本地优先级属性值 bgp default local-preference 设置默认本地优先级属性值 bgp confederation identifier 配置联邦ID bgp confederation peers 配置联邦EBGP 对等的成员 set community local-AS 设置团体属性 neighbor ip-address send-community 开启发送团体属性的能力 二层链路封装
命令 描述 encapsulation hdlc 把接口的封装改为hdlc encapsulation ppp 把接口的封装改为ppp ppp pap sent-username R1 password 123456 pap 认证时,向对方发送用户名R1 和密码123456 ppp authentication pap PPP 的认证方式为pap username R1 password 123456 为对方创建用户R1,密码为123456 debug ppp authentication 打开ppp 的认证调试过程 ppp authentication chap PPP 的认证方式为chap 帧中继相关配置命令
命令 描述 frame-relay switching 把路由器当成帧中继交换机 encapsulation frame-relay 接口封装成帧中继 frame-relay lmi-type cisco 配置LMI 的类型 frame-relay intf-type dce 配置接口是帧中继的DCE 还是DTE frame-relay route 配置帧中继交换表 show frame-relay route 显示帧中继交换表 show frame pvc 显示帧中继PVC 状态 show frame lmi 显示帧中继LMI 信息 show frame-relay map 查看帧中继映射 no frame-relay inverse-arp 关闭帧中继自动映射 ip split-horizon 打开水平分割 int s0/0/0.1 multipoint 创建点到多点子接口 int s0/0/0.3 point-to-point 创建点到点子接口 frame-relay interface-dlci 104 在点到点子接口上配置DLCI ACL 相关配置命令
命令 描述 show ip access-lists 查看所定义的IP 访问控制列表 clear access-list counters 将访问控制列表计数器清零 access-list 定义ACL ip access-group 在接口下应用ACL access-class 在vty 下应用ACL ip access-list 定义命名的ACL time-range time 定义时间范围 username username password password 建立本地数据库 autocommand 定义自动执行的命令 DHCP 相关配置命令
命令 描述 show ip dhcp pool 查看DHCP 地址池的信息 show ip dhcp binding 查看DHCP 的地址绑定情况 show ip dhcp database 查看DHCP 数据库 show ip interface 查看接口信息 debug ip dhcp server events 动态查看DHCP 服务器的事件 service dhcp 开启DHCP 服务 no ip dhcp conflict logging 关闭DHCP 冲突日志 ip dhcp pool 配置DHCP 分配的地址池 network DHCP 服务器要分配的网络和掩码 default-router 默认网关 domain-name 域名 netbios-name-server WINS 服务器 dns-server 域名服务器 option 150 ip FTP 服务器 lease 配置租期 ip dhcp excluded-address 排除地址段 ip helper-address 配置DHCP 中继的地址 NAT 相关配置命令
命令 描述 clear ip nat translation * 清除动态NAT 表 show ip nat translation 查看NAT 表 show ip nat statistics 查看NAT 转换的统计信息 debug ip nat 动态查看NAT 转换过程 ip nat inside source static 配置静态NAT ip nat inside 配置NAT 内部接口 ip nat outside 配置NAT 外部接口 ip nat pool 配置动态NAT 地址池 ip nat inside source list access-list-number pool name 配置动态NAT ip nat inside source list access-list-number pool name overload 配置PAT 交换机基本配置命令
命令 描述 duplex { full | half | auto } 配置以太口的双工属性 speed { 10 | 100 | 1000 | auto } 配置以太口的速率 ip default-gateway 172.16.0.254 配置缺省网关 switch mode access 把端口改为访问模式 switch port-securitiy 打开交换机的端口安全功能 switch port-securitiy maximum 1 允许该端口下的MAC 条目最大数量为1 switch port-securitiy violation{ protect | shutdown | restrict } 配置交换机端口安全 switchport port-security mac-address 0019.5535.b828 允许MAC 为0019.5535.b828 的设备接入本接口show mac-address-table 显示MAC 地址表 mac-address 12.12.12 改变接口的MAC 地址 rename flash:config.text flash:config.old 把flash 中的文件改名 copy xmodem:flash:c2950-i6q4l2-mz.121-22.EA5a.bin 通过Xmodem 模式把文件拷贝到flash 中 boot 重启交换机 VLAN与VTP配置命令
命令 描述 vlan database 进入到vlan database 配置模式 vlan 2 name VLAN2 创建vlan 2 switch access vlan 2 把端口划分到VLAN 2 中 interface range f0/2 - 3 批量配置接口的属性 show vlan 查看VLAN 的信息 switchport trunk encanpsulation 配置trunk 链路的封装类型 switch mode trunk 把接口配置为trunk show interface f0/13 trunk 查看交换机端口的trunk 状态 switchport nonegotiate Trunk 链路上不发送trunk 协商包 vtp mode server 配置交换机为VTP server vtp domain VTP-TEST 配置VTP 域名 vtp password cisco 配置VTP 的密码 vtp mode client 配置交换机为VTP client vtp transparent 配置交换机为VTP transparent show vtp status 显示vtp 的状态 vtp pruning 启用VTP 修剪 vtp version 2 VTP 版本为2 interface port-channel 1 创建以太通道 channel-group 1 mode on 把接口加入到以太网通道中,并指明以太通道模式 port-channel load-balance dst-mac 配置etherChannel 的负载平衡方式 show etherchannel summary 查看etherchannel 的简要信息 生成树STP配置命令
命令 描述 show spanning-tree 查看STP 树信息 spanning-tree vlan 1 priority 4096 配置VLAN1 的桥优先级 spanning-tree portfast 配置接口为portfast,当有设备接入时立即进入转发状态 spanning-tree uplinkfast 配置uplinkfast 特性 spanning-tree backbonefast 配置backbonefast 特性 spanning-tree mode rapid-pvst 把STP 的运行模式设为RSTP+PVST spanning-tree link-type point-to-point 把接口的链路类型改为点对点 spanning-tree mode mst 把生成树的模式改为MST spanning-tree mst configuration 进入MST 的配置模式 name TEST-MST 命名MST 的名字 revision 1 配置MST 的revision 号 instance 1 vlan 1-2 把VLAN 1 和VLAN 2 的生成树映射到实例1 spanning-tree guard root 在接口上配置root guard 特性 spanning-tree bpduguard enable 在接口上配置bpduguard 特性 trunk基本配置
命令 描述 int g0/0.1 创建子接口 encapture dot1q 1 native 指明子接口承载哪个VLAN 的流量以及封装类型,同时该VLAN 是native vlan ip routing 打开路由功能 no switchport 接口不作为交换机接口 ip cef 开启CEF 功能 HSRP 基本配置命令
命令 描述 standby 1 ip 192.168.13.254 启用 HSRP 功能,并设置虚拟IP 地址 standby 1 priority 120 配置本路由器的HSRP 优先级 standby 1 preempt 配置HSRP 抢占 standby 1 timers 3 10 设置HSRP 的HELLO time 和HOLD time standby 1 authentication md5 key-string cisco 配置HSRP 认证密码,认证方式为MD5 show standby brief 查看HSRP 的简要情况 standby 1 track Serial0/0/0 30 跟踪s0/0/0 接口,当接口故障时,HSRP 优先级降低30 vrrp 1 ip 192.168.13.254 启用 VRRP 功能,并设置虚拟IP 地址 vrrp 1 priority 120 配置本路由器的VRRP 优先级 vrrp 1 preempt 配置VRRP 抢占 vrrp 1 authentication md5 key-string cisco 配置VRRP 认证密码,认证方式为MD5 track 100 interface Serial0/0/0 定义一个跟踪目标号,被跟踪对象为s0/0/0 line-protocol 接口 vrrp 1 track 100 decrement 30 跟踪目标100,当目标故障时,优先级降低30 show vrrp brief 查看VRRP 的简要情况 glbp 1 ip 192.168.1.254 启用 GLBP 功能,并设置虚拟IP 地址 glbp 1 priority 200 配置本路由器的GLBP 优先级 glbp 1 preempt 配置GLBP 抢占 glbp 1 authentication md5 key-string cisco 配置GLBP 认证密码,认证方式为MD5 show glbp 查看GLBP 情况 重分布
命令 描述 show ip route 查看路由表 show ip protocols 查看和路由协议相关的信息 redistribute 配置路由协议重分布 default-metric 配置默认种子度量值 ip prefix-list 定义前缀列表 distance eigrp 配置EIGRP 默认管理距离 router-map 基本配置命令 show ip policy 查看策略路由及作用的接口 show route-map 查看定义的所有路由策略及路由策略匹配的情况 debug ip policy 动态查看策略路由的匹配情况 passive-interface 配置被动接口 distribute-list 配置分布控制列表 route-map 定义路由策略 match 定义匹配的条件 set 定义对符合匹配条件的语句采取的行为 ip policy route-map 应用路由策略 ip local policy route-map 本地应用路由策略 IPv6基本配置命令
命令 描述 show ipv6 route 查看IPv6 路由表 show ipv6 interface 查看IPv6 接口信息 show ipv6 protocols 查看和IPv6 路由协议相关的信息 show ipv6 rip next-hops 查看RIPng 的下一跳地址 show ipv6 rip database 查看RIPng 的数据库 show ipv6 ospf neighbor 查看OSPFv3 邻居的基本信息 show ipv6 ospf interface 查看OSPFv3 路由器接口的信息 show ipv6 ospf database 查看OSPFv3 拓扑结构数据库 show ipv6 ospf 查看OSPFv3 进程及其细节 show ipv6 route eigrp 查看IPv6 EIGRP 的路由 show ipv6 eigrp topology 查看IPv6 EIGRP 的拓扑结构信息 show ipv6 eigrp neighbors 查看IPv6 EIGRP 的邻居 debug ipv6 rip 动态查看RIPng 的更新 ipv6 unicast-routing 启动IPv6 流量转发 ipv6 address 在接口下配置IPv6 地址 ipv6 route 配置IPv6 静态路由 ipv6 router rip 启动IPv6 RIPng 进程 split-horizon 启用水平分割 poison-reverse 启用毒化反转 ipv6 rip tag enable 在接口上启用RIPng ipv6 rip tag default-information originate 向IPv6 RIPng 区域注入一条默认路由 ipv6 router ospf 启动OSPFv3 路由进程 router-id 配置路由器ID default-information originate 向OSPFv3 网络注入一条默认路由 ipv6 ospf process-id area area-id 接口上启用OSPFv3,并声明接口所在区域 ipv6 router eigrp 配置IPv6 EIGRP 路由协议 ipv6 eigrp 接口下启用IPv6 EIGRP maximum-paths 配置能支持的等价路径的条数 组播相关命令
命令 描述 ip multicast-routing 启用组播路由功能 ip pim dense 在接口上运行pim dense 协议 ip igmp join-group 237.0.0.1 该接口加入到237.0.0.1 组中 show ip pim neighbor 显示了pim 邻居 show ip mroute 显示组播路由表 show ip igmp groups 显示组成员 ip igmp snooping 在交换机上配置IGMP Snopping 功能 show ip igmp snooping 显示交换机上的IGMP Snooping 运行情况 show ip igmp snooping groups 交换机上显示各组的成员在什么接口上 ip pim sparse-dense 在接口上运行pim sparse-dense 协议 ip pim spt-threshold infinity 静止从基于RP 的树切换到基于源的树 ip pim send-rp-discovery loopback 0scope 255 把路由器设为映射代理,其Loopback0 为代理地址 ip pim send-rp-announce Loopback0 scope255 把路由器设为候选RP,其Loopback0 为RP地址 QOS相关命令
命令 描述 priority-list 1 protocol ip high tcp telnet 创建优先级队列,标号为1。把telnet 流量放在高优先级队列中 priority-list 1 queue-limit 20 30 40 50 定义优先级队列高、中、普通、低队列中的长度 priority-group 1 把定义好的优先级队列应用接口上 show queueing priority 查看优先级队列情况 debug priority 调试优先级队列 queue-list 1 protocol ip 1 tcp telnet 创建自定义队列,标号为1。把telnet 流量放在队列1 中 queue-list 1 queue 1 limit 40 定义队列1 的深度为40, custom-queue-list 1 把定义好的自定义队列应用接口上 fair-queue 512 1024 10 在接口上启用WFQ,512 是丢弃值,1024 是最大的会话数,10 是RSVP 可预留队列 class-map match-any CLASS-MAP1 定义class-map,名为CLASS-MAP1 match protocol http 匹配http 协议 bandwidth 10 配置CLASS-MAP 流量的带宽为60K service-policy output MY-POLICY 把定义好的策略应用在接口的output 方向上 show class-map 显示class-map 信息 show policy-map 显示policy-map 信息 show policy-map interface s0/0/0 显示接口s0/0/0 上的policy-map 配置 priority 15 配置LLQ,带宽为15k random-detect 在接口上启用WRED random-detect precedence 0 18 42 12 配置WRED,对于IP 优先级为0 的队列,最低阀值为18,最大阀值为42,按照1/12 的最大比例丢弃数据包 show queueing random-detect 显示WRED 的配置情况 show interfaces rate-limit 显示各接口上CAR 的情况 drop 丢弃数据包 variance 配置IPv6 EIGRP 非等价负载均衡 本文授权转自微信公众号:网络技术干货圈(id: wljsghq)
禁止二次转载,请联系作者授权
-
-
思科路由器命令大全.zip
2021-08-09 09:14:02思科路由器命令大全 -
思科防火墙命令详解
2018-07-02 11:51:23本文介绍了PIX防火墙的所有常用配置命令,推荐大家学习. -
思科交换机配置命令大全.pdf
2020-08-21 11:38:04思科交换机配置命令大全switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名hostname... -
Cisco 思科模拟器命令
2021-10-15 12:35:32文章目录基本配置**文件操作****启动配置****接口配置****路由****EIGRP****OSPF****ACL****DHCP****HDLC****PPP****FR****ARP(默认启用)****ISDN****IS-IS****BGP****路由优化****异步连接**...R# show history 查看文章目录
基本配置
R> enable 从用户模式进入特权模式 R# disable 从特权模式退到用户模式 R# logout (或exit) 退出Cisco设备 R# show history 查看先前输入的命令(默认10个) R# terminal history size #_of_commands 改变历史缓存的大小(最大256) R# terminal no editing 禁用编辑特性(移去no参数为启用) R# configure terminal 进入配置模式(退出配置模式 CTRL-Z) R(config)# hostname name 改变路由器的名称 R(config)# banner motd delimiting_character banner_character delimiting_character 设置登录横幅 R(config-line)# exec-timeout minutes_# seconds_# 更改休止超时(默认10分钟) R# show hosts 查看路由器解析表中的静态和动态DNS条目 R> show version 查看路由器综合信息 R# show line 验证线路的配置 R# show processes 查看设备的各个进程的CPU使用率 R# show users 查看登录到这台设备上的所有用户 R# show sessions 查看当前挂起的已经打开的telnet会话 R# term ip netmask-format bit-count|decimal|hexadecimal 改变子网掩码显示方式(在当前登录会话期间有效,在子线路模式下即可保存) R(config)# ip host name_of_host [TCP_port_#] IP_address […] 创建主机静态解析表(可指定多达8个IP地址) R(config)# ip name-server IP_address_of_DNS_server […] 配置通过访问DNS服务器动态解析主机(可指定多达6个DNS服务器) R(config)# no ip domain-lookup 禁用DNS查询 R> ping destination_IP_address_or_host_name 查看与目的主机的连通性 R> traceroute destination_IP_address_or_host_name 查看与目的主机间的路由器 R# [telnet|connect] name_of_the_destination|destination_IP_address 打开telnet会话 R# resume connection_# 恢复一个特定的会话 R# disconnect connection_# 结束一已挂起的telnet会话无须恢复它并随后从中退出 R# clear line line_# 结束某人的会话 R# no debug all (或undebug all) 禁用debug R(config)# service timestamps debug datetime msec 在debug输出中显示时间戳 R# terminal monitor 从VTY或辅助线路端口登录执行,路由器将在屏幕上显示报告消息 R(config-line)# logging synchronous在该线路上报告信息后路由器在新提示符后重新显示未打完的命令
文件操作
R# show running-config 查看正在运行(当前)的配置文件 R# show startup-config 查看NVRAM中的配置文件 R# copy running-config|startup-config tftp 将配置备份到TFTP服务器 R# copy tftp startup-config|running-config 从TFTP服务器将配置恢复到路由器 R# copy startup-config running-config 从NVRAM中将配置恢复到RAM中 R# copy running-config startup-config 将RAM中的配置文件保存到NVRAM R# erase startup-config 删除NVRAM中的配置文件 R# copy flash tftp 备份IOS镜像到TFTP服务器 R# show flash 查看闪存中的文件
启动配置
R# setup 运行系统配置会话 R(config)# boot system flash name_of_IOS_file_in_flash 启动时加载闪存中的指定IOS文件 R(config)# boot system tftp IOS_image_name IP_address_of_server 启动时加载TFTP服务器里的IOS文件 R(config)# boot system rom 启动时加载ROM中的迷你IOS文件(启动与这三个命令的顺序有关) R(config)# config-register 0x hexadecimal_value 改变寄存器的值 rommon 5> confreg 0x2142 2600、3600系列启动后按CTRL-BREAK进入ROMMON模式,改变寄存器的值 R> o/r 0x2142 其他系列路由器改变寄存器的值的方法 **密码设置** R(config)# line console 0 进入控制台接口配置模式 R(config-line)# password console_password 配置控制台口令 R(config)# line vty 0 4 进入虚拟终端线路配置模式(根据路由器及IOS最少5个直到很多) R(config-line)# login 接上条命令,允许进行Telnet访问 R(config-line)# password telnet_password 接上条命令,配置Telnet口令 R(config)# line aux 0 进入辅助端口配置模式 R(config-line)# password console_password 接上条命令,配置辅助端口口令 R(config)# enable password privileged_password 配置特权EXEC口令(不加密) R(config)# enable secret privileged_password 配置特权EXEC口令(加密)
接口配置
R(config)# interface type [slot_#/] port_# 进入接口子配置模式 R(config-if)# description interface_description 添加接口描述 R(config-if)# no shutdown 启用该接口 R(config)# interface loopback port_# 创建环回接口 R(config-if)# media-type aui|10baset|100baset|mii 指定该接口连接的介质类型 R(config-if)# speed 10|100|auto 指定该接口速率 R(config-if)# [no] half-duplex 指定该接口双工模式 R(config-if)# clock rate rate_in_bits_per_second 指定该DCE串行接口速率 R> show controller serial [slot_#/] port_# 验证该接口是DCE还是DTE,注意空格 R(config-if)# bandwidth rate_in_Kbps 改变该接口的带宽值 R(config-if)# ip address IP_address subnet_mask 配置该接口IP地址 R(config)# ip subnet-zero IOS12.0前默认禁用0子网,此命令为启用 R(config-if)# ip directed-broadcast IOS12.0后默认禁用定向广播,此命令为启用 R# show interfaces [type [slot_#/] port_#] 验证接口配置 R# show ip interfaces [type [slot_#/] port_#] [brief] 验证接口IP配置 **CDP** R(config)# [no] cdp run 启用/禁用CDP R(config-if)# [no] cdp enable 基于接口启用/禁用CDP R# show cdp 查看CDP状态 R# show cdp interface 查看基于接口的CDP配置 R# show cdp neighbors [detail] 查看与用户Cisco设备相连的CDP邻居的摘要/详细清单 R# show cdp entry neighbor's_name 查看一个指定邻居的详细信息 R# show cdp traffic 查看CDP通信量的统计信息
路由
R(config)# ip route destination_network_# [subnet_mask] IP_address_of_next_hop_neighbor|interface_to_exit [administrative_distance] [permanent] 配置IP静态路由 R(config)# ip route 0.0.0.0 0.0.0.0 IP_address_of_next_hop_neighbor|interface_to_exit [administrative_distance] [permanent] 配置默认路由 R(config)# ip classless 使有类协议接受非一致性子网掩码或不连续子网 R(config)# interface type [slot_#/] port_#. subinterface_# [point-to-point|multipoint] 创建子接口 R(config-subif)# encapsulation isl|dotlq VLAN_# 指定子接口中继类型和相关的VLAN R(config)# router name_of_the_IP_routing_protocol 进入路由选择协议的配置模式 R# show ip route 查看IP路由表 **RIP** R(config)# router rip 配置IP RIP R(config-router)# network IP_network_# 指定哪些接口参与路由选择进程 R(config-router)# version 1|2 只接受和发送RIP版本1或2(默认只产生RIPv1更新,而两个版本的更新都接收) R(config-router)# ip rip send|receive version 1 | version 2 | version 1 2 在特定接口上控制在发送或接收RIP更新时使用哪个版本的RIP R# show ip protocols 查看在路由器上已配置并运行的所有IP路由选择协议 R# show ip route [name_of_the_IP_routing_protocol] 查看路由选择表 R# debug ip rip 帮助进行故障排除 **IGRP** R(config)# router igrp AS_# 配置IP IGRP R(config-router)# network IP_network_# 通告网络号 R(config-router)# neighbor IP_address_of_neighbor 配置单播更新 R(config-router)# passive-interface type [slot_#/] port_# 允许该接口在IGRP中通告但它不监听或发送IGRP更新 R(config-router)# traffic-share min across-interfaces 使路由器只使用最佳路径但又在路由选择表中放入替代路径 R(config-router)# timers basic update_# invalid_# holddown_# flush_# [sleeptime_#] 调整定时器(默认时,update=90,invalid=270,holddown=280,flush=630) R(config-router)# no metric holddown 关闭压制定时器(默认) R(config-router)# distance administrative_distance_# 调整管理距离(取值范围是1-255,默认为100) R(config-router)# default-metric bandwidth_# delay_# reliability_# load_# MTU_# 调整度量值 R(config-router)# metric weights tos_# K1_# K2_# K3_# K4_# K5_# 调整度量权重值(默认时,K1(带宽)=K3(可靠性)=1,K2(延迟)=K4(负载)=K5(MTU)=0) R(config-router)# variance multiplier_# 启用IGRP非同等成本路径(变化因子值1-128默认为1) R(config-router)# traffic-share balanced 配置负载均衡 R(config-router)# maximum-paths paths_# 配置负载均衡的路径条数(取值范围是1-6) R# debug ip igrp events 提供路由器和邻居间发生的每一步操作信息 R# debug ip igrp transactions 提供有关包含在路由更新中路由的详细信息
EIGRP
R(config)# router eigrp AS_# 配置EIGRP R(config-router)# network IP_network_# 通告网络号 R(config-if)# ip bandwidth-percent eigrp AS_# percent_# 设置pacing(调速)占给定接口带宽的百分数(默认为50%) R(config-router)# distance administrative_distance_# 调整管理距离(取值范围是1-255,默认对于内部路由是90而外部是170) R(config-router)# default-metric bandwidth_# delay_# reliability_# load_# MTU_# 调整度量值 R(config-router)# metric weights tos_# K1_# K2_# K3_# K4_# K5_# 调整度量权重值(默认时,K1(带宽)=K3(可靠性)=1,K2(延迟)=K4(负载)=K5(MTU)=0) R(config-if)# ip hello-interval eigrp AS_# seconds_# 在给定接口上设置Hello间隔(默认对于低速的NBMA网络是60秒,其他是5秒) R(config-if)# ip hold-time eigrp AS_# seconds_# 在给定接口上设置Hello保持定时器(默认是3倍的Hello间隔) R(config-router)# passive-interface type [slot_#/] port_# 允许该接口在EIGRP中通告但它不监听或发送EIGRP更新 R(config-router)# no auto-summary 取消对路由的自动汇总 R(config-if)# ip summary-address eigrp AS_# network_address network_mask 创建不在有类边界上的汇总地址 R(config)# eigrp log-neighbor-changes 记录在某个邻居上发生的变化 R# show ip route eigrp 查看被EIGRP学习到的路由 R# show ip route network_address 查看指定目的地的路由信息 R# show ip eigrp topology 查看EIGRP的拓扑表 R# show ip eigrp interfaces 查看加入到EIGRP路由器所有接口的概述 R# show ip eigrp neighbor [detail] 显示和本路由器已形成邻居关系的所有路由器 R# show ip eigrp traffic 显示每个包类型的发出和接收的数量 R# show ip eigrp events 查看每个EIGRP事件的日志 R# debug ip eigrp 提供路由器和它的邻居之间发生的每一步操作 R# debug eigrp packets 查看在该路由器和它的邻居之间发送的数据包类型 R# debug eigrp neighbors 查看邻居的信息
OSPF
R(config)# router ospf process_ID 配置OSPF R(config-router)# network IP_address wildcard_mask area area_# 指定接口进入OSPF区域 R(config-if)# ip ospf cost cost_value 给接口指定成本(取值范围是1-65535) R(config-router)# neighbor IP_address_of_neighbor 手动配置邻居 R(config-router)# neighbor IP_address_of_neighbor priority value 指定邻居的优先级(取值范围是0-255,255为DR,0为不可能成为DR) R(config-if)# ip ospf network non-broadcast 手工配置非广播网络类型 R(config-router)# area area_id stub 允许创建存根区域 R(config-router)# area area_id stub no-summary 允许创建完全存根区域 R(config-router)# area area_id nssa 允许创建次存根区域 R(config-router)# area area_id virtual-link router_id 连接不连续区域为骨干区域0 R(config-router)# area area_id range network_address network_mask 在区域边界路由器上汇总在给定区域中的路由器使用的IP地址空间到其他的区域 R(config-router)# summary-address network_address network_mask 在自治系统边界路由器上汇总外部路由 R# show ip ospf 概述所有OSPF相关的信息 R# show ip ospf process-id 与上相同,而不仅仅是指定的进程 R# show ip ospf border-routers 显示在此自治系统中所有ABR和ASBR的路由器ID R# show ip ospf database 显示链路状态数据库 R# show ip ospf interface 显示接口的OSPF参数和其他的指定到此接口上的OSPF信息 R# show ip ospf neighbor [detail] 显示每个OSPF邻居和邻接状态 R# debug ip ospf adj 报告路由器建立到其他路由器的邻接关系进程 R# debug ip ospf events 报告路由器上的OSPF事件 R# debug ip ospf packet 报告OSPF LSA分组的内容
ACL
R(config)# access-list 1-99|1300-1999 permit|deny source_IP_address [wildcard_mask] [log] 创建标准编号IP ACL R(config-if)# ip access-group ACL_# in|out 在指定接口上启动ACL R(config-line)# access-class standard_ACL_# in|out 在指定若干线路上启动ACL以限制对路由器的Telnet访问 R(config)# access-list 100-199|2000-2699 permit|deny IP_protocol source_address source_wildcard_mask [protocol_information] destination_address destination_wildcard_mask [protocol_information] [log] 创建扩展编号IP ACL R(config)# ip access-list standard ACL_name 创建标准命名ACL(从IOS11.2开始支持) R(config-std-acl)# permit|deny source_IP_address [wildcard_mask] 输入标准ACL命令 R(config)# ip access-list extended ACL_name 创建扩展命名ACL(从IOS11.2开始支持) R(config-ext-acl)# permit|deny IP_protocol source_IP_address wildcard_mask [protocol_information] destination_IP_address wildcard_mask [protocol_information] [log] 输入扩展ACL命令 R(config-if)# ip access_group ACL_name in|out 启动命名ACL R# show ip interfaces 验证访问列表 R# show access-lists [ACL_#_or_name] 显示ACL中的语句 R# show ip access-list [ACL_#_or_name] 显示IP ACL中的语句 R# clear access-list counters [ACL_#_or_name] 对指定ACL中的匹配计数器清零 载分发 R(config)# ip nat inside source static inside_local_source_IP_address inside_global_source_IP_address 定义NAT静态转换 R(config)# ip nat outside source static outside_global_destination_IP_address outside_local_destination_IP_address 定义NAT静态转换 R(config-if)# ip nat inside|outside 指定路由器上哪些接口在内部,哪些在外部 R(config)# ip nat outside source list standard_IP_ACL_# pool NAT_pool_name 为重叠地址转换配置NAT R(config)# ip nat inside source list standard_IP_ACL_# pool NAT_pool_name 定义动态NAT,指定转换哪些内部设备的源地址 R(config)# ip nat pool NAT_pool_name beginning_inside_global_IP_address ending_inside_global_IP_address netmask subnet_mask_of_addresses|prefix-length length 创建源内部全局IP地址池 R(config)# ip nat inside source list standard_IP_ACL_# pool NAT_pool_name overload 定义PAT,指定哪台内部设备会转换其源地址 R(config)# ip nat pool pool_name beginning_inside_local_IP_address ending_inside_local_IP_address prefix-length subnet_mask_bits type rotary 指定提供服务的设备上配置的内部IP地址 R(config)# ip nat inside destination list standard_ACL_# pool pool_name 指定外部设备用来访问内部资源的全局IP地址 R# show ip nat translations [verbose] 查看路由器上的(详细)地址转换信息 R# show ip nat statistics 查看路由器上的地址转换的统计信息 R# clear ip nat translation * 清除所有NAT表项 R# clear ip nat translation inside|outside global_IP_address|local_IP_address 清除转换表中的指定动态条目 R# clear ip nat translation protocol inside global_IP_address global_port local_IP_address local_port 清除转换表中的指定动态条目 R# debug ip nat 提供IOS对每个已转换分组所做的转换
DHCP
R(config)# [no] service dhcp 启用/禁用DHCP(默认启用) R(config)# ip dhcp pool pool_name 创建地址池 R(config-dhcp)# network network_number [subnet_mask|/prefix_length] 指定分配给客户的IP地址范围 R(config-dhcp)# domain-name domain_name 向客户分配域名 R(config-dhcp)# dns-server IP_address […] 指定最多8台DNS服务器分配给客户 R(config-dhcp)# netbios-name-server IP_address […] 指定最多8台WINS服务器分配给客户 R(config-dhcp)# netbios-node-type node_type 向微软客户分配节点类型 R(config-dhcp)# default-router IP_address […] 指定最多8条默认路由给客户用于该地址范围 R(config-dhcp)# lease days [hours] [minutes] |infinite 指定租约的期限(默认一天) R(config)# ip dhcp ping timeout milliseconds 指定测试服务器地址池中的可用地址是否正在使用时服务器应等待时间 R(config)# ip dhcp excluded-address beginning_IP_address [ending_IP_address] 排除一些地址 R(config-if)# ip address dhcp 在路由器上建立DHCP客户 R# show ip dhcp binding [client_address] 查看分配给客户的地址 R# clear ip dhcp binding client_address|* 清除分配给客户的指定/所有地址 R# debug ip dhcp server events|packet|linkage 查看DHCP服务器相关信息
HDLC
R(config-if)# encapsulation hdlc 封装同步串行接口为HDLC(默认)
PPP
R(config-if)# encapsulation ppp 在WAN接口上使用PPP R(config-if)# ppp pap sent-username your_hostname password password 指定PAP用于认证并且提供在服务端用于执行认证的用户名和口令(此为客户端配置) R(config)# hostname your_router's_hostname 为路由器指定惟一主机名(以下三个为服务端配置) R(config)# username remote_hostname password matching_password 指定认证路由器时所使用的远端主机名称和口令 R(config-if)# ppp authentication pap 指定PAP认证 R(config-if)# ppp authentication chap|pap|chap pap|pap chap 批定PPP认证类型 R# debug ppp negotiation 查看LCP协商时的信息 R# debug ppp authentication 查看PPP认证情况
FR
R(config-if)# encapsulation frame-relay [cisco|ietf] 指定封装类型为帧中继(默认cisco) R(config-if)# frame-relay lmi-type ansi|cisco|q933a 给该串行接口指定LMI类型 R# show frame-relay lmi 查看详细的LMI统计信息 R# debug frame-relay lmi 报告路由器正在发送与接收的实际LMI信息 R(config-if)# frame-relay map protocol_name destination_address local_dlci_# [broadcast] [ietf|cisco] 将远端第3层地址手动映射到本地DLCI号 R(config-if)# [no] frame-relay inverse-arp [protocol_name] [DLCI_#] 启用/禁用逆向
ARP(默认启用)
R(config-if) clear frame-relay-inarp 清除逆向ARP解析表 R# show frame-relay traffic 查看逆向ARP统计 R# show frame-relay pvc [DLCI_#] 查看终止于路由器的所有(指定)帧中继PVC及其统计信息 R# show frame-relay map 查看将第3层地址映射成本地DLCI号的虚电路解析表 R(config)# interface type [slot_#/] port_#. subinterface_# [point-to-point|multipoint] 创建子接口 R(config-subif)# frame-relay interface-dlci local_DLCI_# 配置子接口的帧中继
ISDN
R(config[-if])# isdn switch-type ISDN_switch_type 在全局或接口配置模式下配置交换机类型 R(config-if)# isdn spid1 spid_#__for_1st_BRI local_dial_# 为第一个B信道配置SPID R(config-if)# isdn spid2 spid_#__for_2st_BRI local_dial_# 为第二个B信道配置SPID R(config)# controller t1|e1 [slot_#/] port_# 以下6个命令为控制卡配置 R(config-controller)# framing esf|sf|crc4|nocrc4 在T1或E1上使用物理成帧 R(config-controller)# linecode ami|b8zs|hdb3 线路编码,定义1与0如何在线路上物理表示 R(config-controller)# clock source line primary|secondary|internal 定义路由器如何获得其时钟以用于同步数字连接 R(config-controller)# pri-group timeslots [1-24|1-31] 指定路由器哪个或哪些时隙用于ISDN连接 R(config-controller)# [no] shutdown 启用/禁用控制器 R# show controllers t1|e1 [slot_#/port_#] 验证控制器卡配置 R(config)# interface serial [slot_#/] port_#:23 设置逻辑串口(T1使用) R(config)# interface serial [slot_#/] port_#:15 设置逻辑串口(E1使用) R# show interface bri [slot_#/] port_#[:1|2|1 2] 验证ISDN连接的状态(查看B信道) R# show isdn status 查看ISDN详细的物理层和数据链路层信息 R# debug isdn q921 报告ISDN数据链路层详细信息 R(config)# ip route IP_network_# subnet_mask remote_router's_IP_address|router_interface [administrative_distance] 配置静态路由。以下7个命令配置传统DDR R(config)# dialer-list list_# protocol protocol_name permit|deny [access-list ACL_#] 定义敏感流量 R(config-if)# dialer-group dialer_list_# 激活拨号列表 R(config-if)# dialer map protocol_name address_of_destination_router [name remote_router_name] [speed 56|64] [broadcast] destination_phone_number 表明利用传统DDR进行电话呼叫 R(config-if)# dialer idle-timeout #_of_seconds 定义空闲超时周期 R(config-if)# dialer fast-idle #_of_seconds 定义快速空闲计时器 R(config-if)# dialer load-threshold load either|inbound|outbound 通过BRI的两条B信道执行负载均衡(分配带宽) R# show dialer 查看哪个DDR接口进行了电话呼叫及其状态 R# show isdn active 查看激活的ISDN呼叫 R# show isdn history 查看路由器发出的呼叫或以前接收的呼叫 R# debug dialer 显示建立或拆除一个连接的DDR过程 R# debug isdn q931 显示ISDN电话连接建立及挂断的详细信息 R(config)# interface dialer port_# 创建逻辑拨号接口。以下全为配置拨号配置文件。以下8个为拨号接口配置 R(config-if)# encapsulation ppp 指定封装类型 R(config-if)# ppp authentication pap|chap|chap pap|pap chap 指定认证类型 R(config-if)# ip address IP_address subnet_mask 指定接口IP地址 R(config-if)# dialer remote-name name 指定远端路由器的名称 R(config-if)# dialer string phone_# [class map_name] 指定映射类名称 R(config-if)# dialer pool pool_# 指定拨号接口能使用哪组物理接口 R(config-if)# dialer-group dialer_list_# 激活拨号列表 R(config-if)# dialer pool-member pool_# [priority priority_#] [min-link #_of_B_channels] [max-link #_of_B_channels] 指定哪些拨号接能使用物理接口 R(config)# map-class dialer map_name 进入映射子配置模式。以下4个为创建映射类 R(config-map)# dialer isdn speed 56 指定ISDN中的B信道的速度(默认64kbps) R(config-map)# dialer idle-timeout #_of_seconds 定义空闲超时周期 R(config-map)# dialer fast-idle #_of_seconds 定义快速空闲计时器 R# show dialer interface bri|{serial:23|15} [slot_#/]port_# 显示与拨号接口关联的物理接口的进入和离开呼叫的DDR统计信息
IS-IS
R(config)# router isis 启动IS-IS R(config-router)# net areaID.systemID.SEL 配置NET R(config-router)# is-type level_of_router 配置路由器的层次 R(config-if)# ip router isis 在接口上启动IS-IS R(config-if)# isis priority value level-1|level-2 手动配置第一层或第二层路由器的优先级 R(config-if)# clns router isis 为无连接网络服务启动IS-IS R# show ip route isis 查看通过IS-IS学习到的路由 R# show isis database [detail level_of_router] 查看IS-IS链路状态数据库中的所有(某层)LSP信息 R# show clns protocol 显示IS-IS详细配置信息 R# show clns interface 显示配置为IS-IS接口的相关信息 R# show clns is-neighbors 查看路由器的邻居 R# show isis spf-log 查看SPF计算情况 R# debug isis adj-packets 查看路由器发送和接收Hello PDU的情况 R# debug isis update-packets 提供路由器发送和接收的所有LSP详细内容及SNP信息 R# debug isis spf-events 查看写入路由表的IS-IS路由 R# debug isis spf-triggers 查看触发SPF计算的原因 R# debug isis spf-statistics 查看执行SPF计算所用的时间
BGP
R(config)# router bgp AS_# 启动BGP R(config-router)# neighbor IP_address_remote_device remote-as AS_#_remote_device 指定远端路由器作为对等体 R(config-router)# no synchronization 关闭BGP与IGP同步(默认启用) R(config-router)# neighbor IP_address_remote_device update-source loopback # 使用环回接口作为对等体 R(config-router)# neighbor IP_address_remote_device ebgp-multihop [ttl] 配置eBGP多跳(允许BGP邻居可以不在直连网络上) R(config-router)# neighbor IP_address_remote_device route-reflector-client 配置邻居为路由反射器客户 R(config-router)# network network_address mask subnet_mask 向对等体通告路由(手动向BGP注入路由) R(config-router)# redistribute protocol process_ID 将路由重新分配到BGP R(config-router)# redistribute connected 将直连接口地址重新分配到BGP R(config-router)# bgp cluster-id cluster_ID 分配簇ID R(config-router)# bgp confederation identifier confederation_ID 配置联邦ID R(config-router)# bgp confederation peers AS_# 配置联邦的对等自治系统成员 R(config-router)# neighbor IP_address_remote_device distribute-list access_list_# [in|out] 过滤到或来自邻居的更新信息 R(config)# ip prefix-list list_name [seq seq_value] permit|deny network_address/length [ge ge_value] [le le_value] 配置前缀列表 R(config-router)# neighbor IP_address_remote_device prefix-list list_name [in|out] 应用从邻居输入的前缀列表 R(config)# route-map route_map_name permit|deny [sequence_number] 创建路由映射序列 R(config-route-map)# match as-path AS_path_accesslist_# 匹配BGP自治系统路径访问列表 R(config-route-map)# match community-list community_list_# 匹配BGP团体 R(config-route-map)# match interface type [slot_#/] port_# 发布任何下一跳是指定接口的路由 R(config-route-map)# match ip address access_list_#|prefix_list_name 匹配任何目的网络地址被指定的标准访问列表、扩展访问列表或前缀列表允许的路由 R(config-route-map)# match ip next-hop access_list_#|prefix_list_name 匹配任何下一跳地址被指定的标准访问列表、扩展访问列表或前缀列表允许的路由 R(config-route-map)# match ip route-source access_list_#|prefix_list_name 匹配任何由被指定的标准访问列表、扩展访问列表或前缀列表允许的地址通告的路由 R(config-route-map)# match metric value 匹配任何具有指定的度量值的路由 R(config-route-map)# match route-type type_of_route 匹配任何具有指定类型的路由 R(config-route-map)# match tag value 匹配任何具有指定标识的路由 R(config-route-map)# set as-path prepend AS_# 向AS_PATH属性添加自治系统号 R(config-route-map)# set as-path tag 设置作为AS_PATH属性的标记 R(config-route-map)# set automatic-tag 自动计算标记值 R(config-route-map)# set community number|aa:nn|additive|local-as|no-advertise|no-export|none 设置BGP COMMUNITIES属性 R(config-route-map)# set dampening half_life start_reusing start_suppressing duration_to_suppress 设置BGP路由冷落参数 R(config-route-map)# set default interface type [slot_#/] port_# 设置默认的输出接口 R(config-route-map)# set interface type [slot_#/] port_# 设置输出接口 R(config-route-map)# set ip default next-hop IP_address 设置路径的默认下一跳地址 R(config-route-map)# set ip next-hop IP_address 设置下一跳地址 R(config-route-map)# set ip precedence [precedence] 设置“IP Precedence”字段 R(config-route-map)# set ip tos type_of_service 设置“IP服务类型”字段 R(config-route-map)# set level level 设置导入路由的位置 R(config-route-map)# set local-preference value 设置BGP LOCAL_PREF路径属性 R(config-route-map)# set metric value 设置目标路由协议的度量值 R(config-route-map)# set metric-type type_of_route 设置目标路由协议的度量类型 R(config-route-map)# set origin origin_code 设置BGP源代码 R(config-route-map)# set tag value 设置目标路由协议的标记值 R(config-route-map)# set weight value 设置路由表的BGP权重 R(config-router)# neighbor IP_address_remote_device route-map route_map_name [in|out] 应用从邻居输入的路由映射 R(config-router)# neighbor IP_address_remote_device send-community 向该邻居发送COMMUNITY属性 R(config)# ip community-list community_list_# [permit|deny] community_list_# 创建团体列表 R(config-router)# neighbor peer_group_name peer-group 创建对等组 R(config-router)# neighbor peer_group_name option_to_use_in_update_policy 给对等组分配选项 R(config-router)# neighbor IP_address_remote_device peer-group peer_group_name 给对等组分配对等体 R(config-router)# no auto-summary 取消BGP的自动路由汇总功能 R(config-router)# aggregate-address IP_address mask [summary-only] 创建汇聚地址(禁止通告其他特定路由) R(config-router)# aggregate-address IP_address mask as-set 创建汇聚地址,在AS_PATH中添加AS_SET类型 R# clear ip bgp peer_address 重设特定BGP对等会话 R# clear ip bgp AS_# 重设指定自治系统的所有对等体的BGP会话 R# clear ip bgp * 重设路由器上所有BGP会话 R# show ip bgp 查看路由器从BGP学习到的所有路由 R# show ip bgp summary 提供和路由器具有对等关系的所有路由器汇总 R# show ip bgp neighbors 查看对等体连接详细信息 R# debug ip bgp 查看在本地路由器与试图和其建立对等关系的路由器之间所发送和接收的OPEN信息 R# debug ip bgp updates 提供路由器发送和接收所有UPDATE消息的信息 R# debug ip bgp peer_address upadtes 提供关于BGP对等体之间发送的UPDATE消息 R# debug ip bgp dampening 显示关于被冷落路由的信息 R# debug ip bgp events 提供关于尝试成为BGP对等体的路由器的状态转换信息 R# debug ip bgp keepalives 提供关于路由器发送和接收KEEPALIVE消息的信息
路由优化
R(config-router)# distribute-list ACL_#|prefix prefix_list_name in|out [type [slot_#/] port_#] 配置分配列表 R(config-if)# ip policy route-map map_tag 识别一个接口上基于策略的路由选择使用的路由映射 R# show ip policy 列出所有配置为基于策略的路由选择的接口及它们相关的路由映射 R# show route-map 查看所有路由映射 R# debug ip policy 提供在该路由器上执行的路由策略的信息 R(config-router)# default-information originate 重新分配默认路由到OSPF和IS-IS R(config-router)# default-information originate always 引起一个默认路由到OSPF不管路由表中是否有一个默认路由 R(config-router)# redistribute protocol [process-ID] level-1|level-1-2|level-2 [metric metric_value] [metric-type type_value] [match internal|external 1|external 2] [tag tag_value] [route-map map_tag] [weight weight_value] [subnets] 重新分配路由选择信息从一个路由选择域到另一个路由选择域 R(config-router)# summary-address network_address network_mask [level-1|level-1-2|level-2] 为起源于和重新分配到IS-IS的路由创建一个汇总地址
异步连接
R# line number 进入线路配置模式 R(config-line)# login 允许一个连接 R(config-line)# password password 提供线路上使用的口令 R(config-line)# flowcontrol hardware|software 选择硬件流控制或软件流控制 R(config-line)# speed number 指定调制解调器和访问服务器或路由器之间使用的最大速度(单位:bps) R(config-line)# transport input lat|mop|nasi|pad|rlogin|telnet|v120|all 定义反向Telnet连接使用的协议 R(config-line)# stopbits 1|1.5|2 定义每个字节的结束 R(config-line)# modem autoconfigure type modem_type 指示路由器使用modemcap数据库中的命令按照指定的类型对连接到一个端口上的调制解调器进行自动配置 R# show modemcap 显示modemcap数据库 R(config-line)# modem edit modem_profile_name 向modemcap数据库增加条目 R(config-line)# modemcap edit new_profile_name template existing_profile_name 创建名为new_profile_name的条目并从existing_profile_name中拷贝所有的配置 R(config-line)# modem autoconfigure discovery 发现和自动配置连接到一个端口上的调制解调器
QoS
R(config-if)# standby ip IP_address 配置HSRP R(config-if)# standby preempt 配置占先操作 R(config-if)# standby track type_of_interface 配置接口跟踪 R# show standby 查看HSRP组的动态信息 R(config-if)# glbp group_number ip [IP_address [secondary]] 配置GLBP R(config-if)# glbp group_number priority priority_number 配置优先级
-
华为思科命令转换工具
2020-12-07 14:39:25可以转换华为和思科的命令,相互转换十分强大 -
CISCO 思科路由器交换机常用巡检命令及解释.doc
2018-04-21 22:31:28个人日常工作整理的,非常齐全实用的CISCO 思科路由器交换机常用巡检命令及解释, -
思科Cisco路由器access-list访问控制列表命令详解
2020-10-01 23:00:56CISCO路由器中的access-list(访问列表)最基本的有两种,分别是标准访问列表和扩展访问列表,二者的区别主要是前者是基于目标地址的数据包过滤,而后者是基于目标地址、源地址和网络协议及其端口的数据包过滤 -
思科交换机查看配置及日常维护命令
2014-09-12 08:47:20思科交换机查看配置及日常维护命令,方便日常维护查询 -
思科交换机N7K常用命令.docx
2020-01-01 17:55:41、备份配置 copy running-config startup-config 2、清楚启动文件 write erase ...3、查看系统相关信息 show version 4、查看硬件相关信息 show module 5、查看相关特性 show feature -
思科命令,中文思科命令
2018-11-09 19:14:24思科命令,中文思科命令,中英文对照,适合于网络初学者! -
华为命令和思科命令对比
2016-02-14 17:05:35华为命令和思科命令对比,主要为常见查询命令。包括设备端口、板卡、CPU和log等相关命令对比; -
思科交换机配置命令大全.docx
2021-08-09 08:52:10思科交换机配置命令大全 -
Cisco(思科)命令大全
2018-04-25 10:21:11Cisco,网络,路由,命令大全,包含switch配置命令、路由器配置命令等 -
Cisco lightWeight AP常用的查看命令
2020-09-30 16:48:28查看当前获取的IP AP94D4.69FA.1030#sh cap ip config IP Address : 10.249.100.2 IP netmask : 255.255.255.0 Default Gateway : 10.249.100.254 查看注册信息 AP94D4.69FA.1030#sh capwap client rcb AdminState -
思科基本命令
2017-08-12 21:08:31思科基本命令 非常实用 -
思科Cisco路由器access-list访问控制列表命令详解终稿.pdf
2022-02-26 14:22:09思科Cisco路由器access-list访问控制列表命令详解终稿.pdf -
cisco 巡检命令详解
2012-07-02 22:50:47CISCO巡检命令详解,做巡检的工程师可以看看、 -
思科防火墙命令介绍
2019-08-19 19:45:031.1CISCO防火墙产品家族: PIX已经停产 ASA(Cisco AdaptiveSecurity Appliance )主流:CiscoASA产品线ASA5500系列 Cisco ASA 5510、5520、and 5540 ASA5512X系列 1.2防火墙的厂商: CISCO防火墙。... -
思科(Cisco)路由器常用命令总结
2021-10-02 09:27:53FILE=c2600.bin 指定下载的文件 rommon>tftpdnld 从tftp下载 rommon>dir flash: 查看闪存内容 rommon>boot 引导IOS 4,静态路由: ip route 命令格式 router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 静态路由... -
思科Cisco路由器access-list访问控制列表命令详解.docx
2021-10-25 00:40:05思科Cisco路由器access-list访问控制列表命令详解.docx -
CISCO路由器配置命令详解及实例
2017-05-29 20:58:49CISCO路由器配置命令详解及实例,非常实用的文档 -
H3C与Cisco命令对比手册
2018-04-10 16:40:55H3C与Cisco命令对比手册.ppt H3C与Cisco命令对比手册.ppt -
思科命令解析
2018-12-17 10:00:11思科命令interface show 命令产生的数据中 ,各种数据的含义