彭小盛

又一个WordPress站点

CCIE命令大全,值得转发收藏!-Cisco思科CCIE俱乐部

CCIE命令大全,值得转发收藏!-Cisco思科CCIE俱乐部
表1-1 本章命令汇总命令作用
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------设置用户登录路由器时的提示信
表2-3本章命令汇总命令作用
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服务器上的配置文件拷贝到内存中
copyflash: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------重启路由器
deleteflash: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秒
表3-2本章命令汇总命令作用
ip route------配置静态路由
show ip route------查看路由表
ip classless/ no ip classless------打开/关闭有类路由功能
ping 2.2.2.2 source loopback 0------指定源端口进行ping测试
4、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------向网络中注入默认路由
5、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------启动EIGRP路由进程
no auto-summary------关闭自动汇总
ip authentication mode eigrp------配置EIGRP的认证模式
ip authentication key-chain eigrp ------在接口上调用钥匙链 variance ------ 配置非等价负载均衡
delay------配置接口下的延迟
bandwidth------配置接口下的带宽
ip summary-address eigrp------手工路由汇总
6、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-keycisco ------配置认证密码
area area-id authentication message-digest ------启动区域MD5认证
ip ospf message-digest-key key-id md5 key------配置key ID及密匙
ip ospf authentication启------用链路简单口令认证
ip ospf authentication message-digest ------启用链路MD5认证
default-information originate------向OSPF区域注入默认路由
7-1、广域网汇总命令作用
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
8-1、帧中继汇总命令作用
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
它可以实现如下的功能:
1. 拒绝或允许流入(或流出)的数据流通过特定的接口;
2. 为DDR应用定义感兴趣的数据流;
3. 过滤路由更新的内容;
4. 控制对虚拟终端的访问;
5. 提供流量控制。
【技术要点】
(1)ACL定义好,可以在很多地方应用,接口上应用只是其中之一,其它的常用应用
包括在route map 中的 match应用(21 章介绍)和在vty下用“access-class”命令调用, 来控制telnet 的访问;
(2)访问控制列表表项的检查按自上而下的顺序进行,并且从第一个表项开始,所以必须考虑在访问控制列表中定义语句的次序;
(3)路由器不对自身产生的IP 数据包进行过滤;
(4)访问控制列表最后一条是隐含的拒绝所有;
(5)每一个路由器接口的每一个方向,每一种协议只能创建一个ACL;
(6)“access-class”命令只对标准ACL有效。
(1)参数“log”会生成相应的日志信息,用来记录经过ACL入口的数据包的情况;
(2)尽量考虑将扩展的访问控制列表放在靠近过滤源的位置上玄武开传,这样创建的过滤器就 不会反过来影响其它接口上的数据流。另外日菁 ,尽量使标准的访问控制列表靠近目的,由于标准访问控制列表只使用源地址,如果将其靠近源会阻止数据包流向其他端口。
4.实验调试
分别在 PC2上访问路由器R2的TELNET和WWW服务,然后查看访问控制列表100:
9.8、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-rangetime------定义时间范围
username username password password ------建立本地数据库
autocommand------定义自动执行的命令
10.4、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中继的地址
11.5、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
12-1、switch汇总命令作用
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-address0019.5535.b828
允许MAC为0019.5535.b828的设备接入本接口
show mac-address-table显示MAC地址表
mac-address 12.12.12------改变接口的MAC地址
rename flash:config.textflash:config.old------把flash中的文件改名
copy xmodem:
flash:c2950-i6q4l2-mz.121-22.EA5a.bin ------通过Xmodem模式把文件拷贝到flash 中
boot------重启交换机
13-4 switch、汇总命令作用
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 -----配置交换机为VTPclient
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的简要信息
14-1、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特性
15-1、switch汇总命令作用
int g0/0.1------创建子接口
encapturedot1q1 native------指明子接口承载哪个VLAN的流量以及封装类型丑女皇后,同时该VLAN是native vlan
ip routing------打开路由功能
no switchport------接口不作为交换机接口
ip cef------开启CEF功能
表16-1、本章命令汇总命令作用
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-stringcisco ------配置 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-stringcisco ------配置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-stringcisco ------配置GLBP认证密码,认证方式为MD5
show glbp------查看GLBP情况
表17-1、本章命令汇总命令作用
show ip route------查看路由表
how ip ospf interface------查看运行OSPF的接口的相关信息
show ip ospf neighbor detail------查看OSPF邻居路由器的详细信息
ip ospf network------配置OSPF网络类型
encapsulation frame-relay------接口封装帧中继
no frame-relay inverse-arp------关闭帧中继逆向ARP解析
frame-relay interface-dlci ------帧中继映射
frame-relay map ip------帧中继映射
18.5、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------路由协议重分布
area area-id range------区域间路由汇总
summary-address------外部路由汇总
area area-id stub------把某区域配置成末节区域
area area-id stub no-summary------把某区域配置成完全末节区域
area area-id nssa------把某区域配置成NSSA区域
area area-id virtual-link------配置虚链路
表19-1、本章命令汇总命令作用
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映射
表20-2、本章命令汇总命令作用
show ip route------查看路由表
show ip protocols------查看和路由协议相关的信息
redistribute------配置路由协议重分布
default-metric------配置默认种子度量值
ip prefix-list------定义前缀列表
distance eigrp------配置EIGRP默认管理距离
表21-2、本章命令汇总命令作用
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------本地应用路由策略
表22-1、本章命令汇总命令作用
show ipv6 route------查看IPv6路由表
show ipv6 interface------查看IPv6接口信息
show ipv6 protocols------查看和IPv6路由协议相关的信息
show ipv6 rip next-hops debug ipv6 rip------查看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 ------配置能支持的等价路径的条数
23-1、组播汇总命令作用
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 地址
24-1、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------配置下一跳自我 neighbor ip-address
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------开启发送团体属性的能力
25-1、本章命令汇总
命令作用
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的配置情况
set-prec-transmit 3 exceed-action set-prec-transmit 0
------在接口上启用CAR碾子山吧 ,限制符合ACL101的流量
show interfaces rate-limit------显示各接口上CAR的情况
drop 丢弃数据包
variance 配置IPv6 EIGRP非等价负载均衡
报班考证请扫我
联系我们微信:SPOTO123456QQ群:693862129

为了方便广大网络爱好学习者,特开设QQ群-思科华为资料库二群658708720(一群已满),里面已经上传大量网络学习资料,欢迎广大网络工程师进群学习!