(完整版)CCNA命令大全

合集下载

CCNA基本命令手册

CCNA基本命令手册

思科认证网络工程师CCNA (640-801)中文实验手册爱科-新世界2005年3月一、IOS基础1、用户EXEC模式Router> 用户模式Router> enable输入命令enable,此时进入特权模式2、特权EXEC模式Router#Router# disable退出特权模式Router> 返回到用户模式3、退出设备Router# logout退出设备Router# exit退出设备4、命令的简写Router>en进入特权模式虽然设备支持简写,但我们不建议,因为考试时模拟器不支持,而很有可能因为这样,你会面临再一次的考试。

Router#sho5、上下文敏感帮助Router>? 当你在一个模式下面,你想知道可执行哪些命令,你可以通过?来帮助你Exec commands:show Show running system information enable Turn on privileged commandsexit Exit from the EXEChelp Description of the interactive help system disable Turn off privileged commandsdisconnect Disconnect an existing network connection logout Exit from the EXECping Send echo messages………..Router# 如果你只记得命令的第一个开头字母,而忘记了其后面的字母,也可以通过?来进行帮助,它会告诉你以e开头的命令有哪几个Router#e?erase elog exit6、通过?实现配置的一个实例第一步Router#config terminal 从终端开始配置Enter configuration commands, one per line. End with CNTL/Z.第二步Router(config)#interface ser? 对广域网口进行配置Serial第三步Router(config)#interface serial ?查看有几个广域网口<0-2>第四步Router(config)#interface serial 0进入广域网0口进行配置第五步Router(config-if)#?查看当前模式下的合法命令ip Interface Internet Protocol config commandsinterface Select an interface to configure encapsulation Set encapsulation type for an interface第六步Router(config-if)#ip adderss 192.168.0.1 ?配置IP地址A.b.c.d IP subnet mask第七步Router(config-if)#ip adderss 192.168.0.1 255.255.255.0 ?配置子网掩码<cr>7、一般错误命令的提示%Invalid input detected at ‘^’表示你输入的命令有误,^符号表示出错的位置。

CCNA考试实验命令总结

CCNA考试实验命令总结

CCNA(Cisco Certified Network Associate)考试是计算机网络领域中最受欢迎的认证之一。

考取CCNA证书是网络工程师必备的证书之一。

考生需要熟练掌握实验命令,才能在考试中得到高分。

本文将对CCNA考试中一些实验命令进行总结和讲解,帮助考生在备考过程中更好地掌握这些命令。

一、基础实验命令1.show running-config使用show running-config命令可以查看路由器或交换机的当前运行配置。

这是一个非常强大的命令,可以帮助管理员查看设备的配置,识别任何可能存在的问题,并对设备进行任何必要的更改。

例如,如果需要更改路由器的IP地址,则可以使用show running-config 命令查看当前配置,然后使用相应的命令进行更改。

2.configure terminal使用configure terminal命令可以进入设备的全局配置模式。

全局配置模式是配置设备设置的本质,因为它允许管理员更改设备的全局配置信息。

在全局配置模式下,管理员可以使用众多的命令来更改路由表、口令、端口和其他路由器或交换机设置。

3.enableenable命令允许管理员进入特权模式(privileged mode)。

特权模式是设备上最高级别的管理模式。

只有当设备管理员具有适当的身份验证才能进入此模式。

在特权模式下,管理员可以对配置进行修改、更改密码、修改用户权限等。

4.clear interface使用clear interface命令可以重置接口并清除计数器。

在某些情况下,例如在网络故障排除期间,重新启动端口可能会解决网络问题。

使用这个命令可以清除所有的计数器,让管理员能够查看所有的错误计数器。

5.pingping命令用于测试设备之间的连通性。

管理员可以使用ping命令来测试计算机、路由器、服务器、交换机等之间的连通性。

如果ping命令失败,则表示设备无法访问其他设备。

管理员可以使用ping命令来确定网络上的问题所在,以便识别和修复故障。

CCNA show命令

CCNA show命令

show cdp neighbor 显示直连的相邻设备及其详细信息show cdp neighbor detail 显示IP地址和IOS版本和类型,并且包括show cdpshow cdp traffic 显示设备发送和接收的CDP分组数以及任何出错信息show controllers s 0 显示接口的DTE或DCE状态show flash 显示闪存中的文件show history 默认时显示最近输人的10个命令show hosts 显示主机表中的内容show int fO/26 (brief)显示0/26的统汁show interface So 显示接口serial上的统计信息show interface f0/24 switchport 显示trunk信息show ip 显示该交换机的IP配置show ip access-list 只显示IP访问列表show ip interface 显示哪些接口应用了IP访问列表show ip interface 显示在路由器上配置的路由选择协议及与每个路由选择协议相关的定时器show ip route 显示IP路由表show isdn active 显示呼叫的号码和呼叫是否在进行中show isdn status 显示SPID是否有效、是否己连接以及和提供商交换机的通信情况show mac-address-table 显示该交换机动态创建的过滤表show protocols 显示在每个接口上配置的被动路由协议和网络地址show run (show running-config 命令的缩写;)显示当前在该路由器上运行的配置show sessions 显示通过Telent到远程设备的连接show start( show startup-config的缩写)显示保存在NVRAM中的备份配置show terminal 显示配置的历史记录大、show version 给出该交换机的IOS信息以及正常运行时间和基本Ethernet地址show vlan 显示所有己配置的VLANshow vtp status显示一台交换机的VTP配置show vlan brief 显示vlan信息。

CCNA基本命令

CCNA基本命令

常用的配置模式有:配置向导配置模式和直接配置模式。

使用配置向导配置采用一问一答的方式配置,配置的东西冗长,不灵活,我们做为网络工程师通常使用直接配置方式即(命令配置方式),快,准确!如下图:3-2、路由器CAL模式介绍:路由器分为4种模式:用户模式、特权模式、全局模式(配置模式)、配置子模式(例:接口模式、OSPF路由进程模式等)3-2-1、用户模式:可以使用少量的命令对本路由器进行查询、测试等功能,如下图:3-2-2特权模式:在用户模式下输入enable可以进入特权模式。

该模式可以查询本路由器的所有信息和进行简单的配置(例:修改路由器的时间、删除路由器的配置信息、重启路由器、删除IOS、保存配置等)例:保存配置3-2-3全局模式:在特权模式下输入configure terminal可以进入全局模式。

在该模式下可以全权配置、修改、删除该路由器的所有参数,例:路由器命名、启动路由协议、配置虚接口、启动ACL防问表等等。

2-4配置子模式:例:接口模式、路由模式、策略模式等等、控制台接口模式等4、基础配置:4-1、基础配置案例:以下兰色斜体字部份为该模式的命令,后面括号为该命令解释。

黄底部份需值得注意,这是帮大家分晰故障的地方。

Router>enable (由用户模式切换到特权模式)Router#configure terminal (由特权模式切换到全局模式)Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname itaa (修改路由器名字)itaa(config)#line console 0(配置console接口)itaa(config-line)#logg synchronous(打开console接口输入信息同步)itaa(config-line)#exec-timeout 0 0(关闭该console接口配置超时)itaa(config-line)#password 123(配置console接口密码)注意:一定要加载,不然配置密码无效itaa(config-line)#login (加载密码配置)itaa(config-line)#exit (由console接口退到全局模式)itaa(config)#line vty 0 4(由全局模式进入VTY模式即远程登陆模式)itaa(config-line)#logg synchronousitaa(config-line)#exec-timeout 0 0(做试验时的配置)itaa(config-line)#password 456itaa(config-line)#loginitaa(config-line)#exititaa(config)#enable password itaa(配置路由器模式切换明文密码)itaa(config)#enable secret onetom(配置路由器模式切换密文密码)itaa(config)#service password-encryption (对路由器配置的明密码进行加密)itaa(config)#no ip domain lookup(关闭域名解晰)itaa(config)#exit (由全局模式退到特权模式)i taa#show ip interface brief (查看当前设备有那些类型接口及接口号)Interface IP-Address OK? Method Status ProtocolEthernet0/0 unassigned YES unset administratively down downSerial0/0 unassigned YES unset administratively down downSerial0/1 unassigned YES unset administratively down down当前设备有以太网接口一个为0/0,两个串口为0/1、0/1,其中对0/0、0/1进行以下解释:普通路由器和交换机的接口是固化在设备上的,其标识为E0或S0等。

路由器常用命令

路由器常用命令

CCNA、NP路由器常用命令大全一、基本命令介绍1、Router >:用户模式(简单的查看和测试)2、#:特权模式(所有的查看和测试,以及保存)3、Configure terminal :全局配置模式Enable:特权模式4、Hostname cisco(主机名):更改名字5、No hostname cisco :删除以前操作6、Disable:从特权模式恢复用户模式7、Exit(退出)Write(保存)Copy run start (保存)8、Reload:重启设备9、图标含意:* :预备缺省路由C:直连路由S:静态路由10、Pint -t 202.102.1.2 :一直Ping指定IP11、No logging console :关闭Console信息12、Terminal monitor :远程登录下显示日志信息13、Traceroute 5.5.5.0 :查看到达网络所经过的路径二、基本命令配置1、Hostname R1:修改主机2、No ip domain lookup :关闭域名查找3、Line console 0 :进入Console控制台4、exec-timeout 0 0 :设置超时时间(永不超时0 0)5、Logging synnchronous :日志同步(命令不尾随日志显示)三、查看配置命令1、Show ip route :查看路由表2、Show ip ospf database :查看OSPF链路状态信息3、Show ip protocols :查看动态路由协议4、Show ip eigrp neighbors :查看EIGRP的邻居表5、Show ip eigrp topology :查看EIGRP的拓扑表6、Show ip route eigrp :只查看EIGRP路由条目7、Show ip eigrp neighbor detail :查看EIGRP的详细邻居表9、Show ip interface brief :查看所有接口信息8、Show ip ospf neighbor :查看OSPF邻居表9、Show ip ospf database router :查看OSPF一类LSA10、Show ip ospf database summary :查看OSPF三类LSA11、Show ip ospf database asbr-summary :查看OSPF四类LSA12、Show ip ospf int f0/0 :查看OSPF接口信息13、Show ip route ospf :只查看OSPF路由条目14、Show mac-address-table :查看交机的MAC地址15、Show running-config :查看当前所有配置16、Show access-list :查看ACL定义条目17、Show run |s r e :只查看EIGRP配置18、Show run |s r r :只查看RIP配置19、Show run |s r o :只查看OSPF配置20、Show run |s access-list :只查看ACL配置21、Show ip nat translations :查看NAT转换条目22、Show privilege :查看登录用户优先级23、Show arp :查看ARP表24、Show ip route 0.0.0.0 :查看指定路由条目25、Show frame-relay route :查看帧中继的转换条目26、Show frame-relay map :查看帧中继的映射表27、Show clock :查看设备时间28、Show run int s1/0 :只查看接口信息29、Show ip bgp neighbor :查看BGP邻居表30、Show ip bgp summary :查看BGP的概要信息31、Show ip bgp :查看BGP32、Show ip bgp 5.5.5.0 :查看BGP的指定路由条目33、Show ip route bgp :只查看BGP消息34、Show ipv6 int brief :查看IPv6接口配置35、Show ipv6 int f0/0 :查看IPv6指定接口配置36、Show cdp neighbor :查看CDP相连邻居信息37、Show cdp neighbor detail :查看CDP相连邻居之间详细信息38、Show ipv6 routers :查看IPv6路由通告39、Show ipv6 neighbor :查看IPv6邻居信息40、Show ipv6 bgp ipv6 unicast :查看IPv6中的BGP表41、Show run int tunnel 2 :查看Tunnel遂道接口信息42、Clear ip bgp * :硬重置BGP邻居表43、Clear ip bgp * in :软重置(发送路由刷新报文)44、Clear ip bgp 12.1.1.2 :硬重置(只重置一个邻居)45、Clear ipv6 neighbor :清空IPv6邻居表46、Clear ip bgp ipv6 unicast 100 in :软重置IPv6中BGP的邻居47、Clear ip bgp ipv6 unicast :硬重置IPv6中BGP的邻居48、Clear ip ospf process :重置OSPF进程49、Clear ip route * :清空路由表50、Ping 2.2.2.2 repeat 1 :Ping指定目的IP一次51、Ping 4.4.4.4 size 555(字节)52、Ping 2.2.2.2(目的IP) source 1.1.1.1(源IP)四、动态调试配置命令1、Debug ip nat :动态调试NAT转换条目2、Debug ppp authentication :动态调试PPP认证消息3、Debug ip policy :动态调试策略4、Debug ip bgp out :动态调试BGP路由条目5、Debug ip bgp updates :动态调试BGP更新条目6、Debug ip packet :动态调试IP协议包7、Debug ip v6 packet :动态调试IPv6协议包8、Debug ip bgp events :动态调试BGP事件9、Debug ipv6 nd :动态调试IPv6状态信息10、Debug ip packet detail :动态调试IP协议包详细信息11、Debug ipv6 packet detail :动态调试IPv6协议包详细信息12、Undebug all :关闭所有动态调试信息。

CCNA命令大全

CCNA命令大全

CCNA配置命令大全RAM/DRAM-保存路由表,各种cache以及运行配置文件;其中共享RAM用于数据包的缓冲;掉电后内容丢失。

NVRAM-保存配置文件;掉电后内容不丢失。

Flash-可擦洗、可编程ROM;保存IOS,升级方便;掉电后内容不丢失;多个IOS的拷贝可保存于其中。

ROM-保存开机自检、引导程序;及一个IOS。

可通过换芯片方法升级。

Interfaces-数据包进出路由器的接口。

Interfaces在母板上或在独立的接口模块上。

1、进入SETUP模式Router#setup2、时间设置router#clock set hh:mm:ss date moth year3、router>show historyRouter>terminal history size lines4、router#show version5、router#show running-config6、router#show startup-config7、router(config)#hostname name主机命名8、router(config)#banner motd # message #开机时的固定显示信息9、router(config)#enable password password 特权模式明文密码10、router(config)#no enable password11、router(config)#enable secret password 特权模式加密密码12、router(config)#no enable secret13、router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret 安全可以反解14、router(config)#line console控制台密码15、router(config-line)#login16、router(config-line)#password password17、router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、router(config)#line vty 0 4虚拟终端密码20、router(config-line)#login21、router(config-line)#password password22、router(config)#interface type number(slot/port)端口设置23、router(config-if)#ip address ip summast24、router(config-if)#clock rate 64000(时钟频率单位为bps,只在DCE端设置)25、router(config-if)#bandwith 64(带宽设置,单位为KB)26、router(config-if)#no shutdown(shutdown)27、router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、router(config-if )#ctrl+z保存退出到特权模式29、router#30、router>用户模式enable进入router#特权模式config terminal进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置Line Router(config-line)# 虚拟口设置Router Router(config-router)# 路由设置IPX router Router(config-ipx-router)#IPX路由设置32、router#show interface33、router#show interface Ethernet 034、router#show interface serial 035、router#show running-config36、router#show starup-config37、router#show flash38、router#show controller39、router#show controller interface type40、router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置寄存器的值1、关闭路由器的电源重新启动按住ctrl+break键入进2、>3、>o/r 0x2142(跳过nvarm启动恢复密码)4、>I5、当系统提示是否进入setup模式时,按N6、router>7、router>enable8、router#9、进入修改后(包括密码、寄存器的值:0x2100为rom monitor启动、0x2101为setup 模式启动、0x2102为10、router#copy running-config starup-config11、router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)router(config)#ip route 0.0.0.0 s0(出口端口或下一跳IP地址)rip设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查看RIP信息router#show ip route 查看路由表router#debug ip rip查看RIP更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route查看路由表router#debug ip igrp events查看IGRP路由更新大概信息router#debug ip igrp transaction查看IGRP路由更新详细信息Router(config-router)#variance multiplier 控制IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(config)# auto-summry 打开自动汇总(默认是打开的)router#show ip route eigrp 显示当前的路由表里的EIGRP条目router#show ip protocol 显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被EIGRP发现的邻居router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量router#show ip eigrp topology 显示IP EIGRP的拓扑表Router#debug ip eigrpospf设置1. Router(config)#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是Ip地址) mask(通配掩码)area area-idRouter(config-if)# ip ospf priority numbe 配置OSPF的优先级Router#show ip protocols 验证OSPF的配置Router#show ip route 显示路由器学到的所有路由Router#show ip ospf interface type number 显示area-ID 和邻接信息Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number(lookback回路配置)Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值Router(config-if)# ip ospf authentication-key key 配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication [message-digest]message-digest为可选项,使用后路由器只传送口令消息的摘要(或散列)配置OSPF区域的验证:3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 deny 172.16.40.0 0.0.0.255Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 ou使用IP标准ACL来控制VTY线路的访问.Router(config)#access-list 50 permit 172.16.10.3Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 21Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out3.虚拟通道访问router(config)#access-list 12 permit 192.89.55.0 0.0.0.255router(config)#line vty 0 4outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以及接口对ACL的应用信息.交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}1900(config)#ip address 10.5.5.11 255.255.255.02950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 12950(config-if)#ip address 10.5.5.11 255.255.255.0default gateway1900/2950(config)#ip default-gateway {ip address}1900/2950(config)#ip default-gateway 172.20.137.1查看交换机的IP地址1900#show ipIP address: 10.5.5.11Subnet mask: 255.255.255.0Default gateway: 10.5.5.3Management VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is upHardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800)Internet address is 172.16.80.79/24Broadcast address is 255.255.255.255设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度:switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent {mac-address type module/port}1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/31900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]] 配置受限静态MAC地址1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list} 1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/11900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 12950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap}2950#show mac-address-table secure2950#show port-security管理配置文件1900#copy nvram tftp://host/dst_file1900#copy tftp://host/src_file nvram1950#copy nvram tftp://10.1.1.1/wgswd.cfg2950#copy startup-config tftp://host/dst_file清除NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN建立1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下:>en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY complete2950(vlan)#Ctrl+C2950#端口分配2950下的端口配置,使用switchport access vlan [vlan#]命令,2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q}2950(config-if)#^Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-list Configuring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下: 2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submaskVTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950如下:2950(config)#vtp mode server2950(config)#vtp domain noco验证信息,如下:2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNA T配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}Router(config)#access-list access-list-number permit source [source-wildcard]Router(config)#ip nat inside source listaccess-list-number pool name配置OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload清除NA T Translation TableRouter#clear ip nat translation * 清除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip] 清除一个简单的动态地址转换条目(内、外)Router#clear ip nat translation outsidelocal-ip global-ip清除一个简单的动态地址转换(外)Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 清除一个扩展动态地址转换条目Show命令输出信息Router#show ip nat translationsShow ip interface brief 接口信息Description (描述内容)注释Line con 0 进入CON口接口Exec-t 0 在没有活动的时候,不自动退出Logging synchronous 光标跟随Wr erase 删除配置Reload 重启Clock rate 64000 时钟屏率ping 1.1.1.2 repeat 100000 size 5000 发送重复100000次,大小5000字节数据包。

CCNA命令行知识点温习4(帧中继配置)

CCNA命令行知识点温习4(帧中继配置)

R1(config-if)#no shut
R3的配置:
R3#conf t
R3(config)#int s1
R3(config-if)#ip add 192.168.100.103 255.255.255.0
R3(config-if)#encapsulation frame-relay ietf(封装帧中继)
R3(config-if)#frame-relay map ip 192.168.100.101 301 broadcast(其中192.168.100.101指的是目的路由器的IP地址,103指的是R3流出的数据包的DLCI号是301)
R3(config-if)#no shut
R2的配置:
交换虚电路是指通信双方的电路在用户看来是由独立节点临时且动态连接的虚电路。一旦通信会话完成,便取消虚电路。
4:帧中继协议工作在数据链路层,路由协议工作在网络层,不要混淆。
注意:广域网和局域网的不同主要体现在datalink layer(数据链路层)和physical layer(物理层),即封装方式和线缆的不同。
R2(config)#frame-relay switching(打开帧中继交换)
R2(config)#int s0
R2(config-if)#enc frame-relay(封装帧中继)
R2(config-if)#frame-relay intf-type dce(设置本端口在帧中继线路中充当DCE)
在此实例中,R2作为帧中继交换机,R1流出的数据包的DLCI号为103,R3流出的数据包的DLCI号为301,配置命令如下:
R1的配置:
R1#confΒιβλιοθήκη t R1(config)#int s0

CCNA命令

CCNA命令

新版CCNA 640-801考试IOS命令大全?给出一个帮助屏幕0.0.0.0 255.255.255.255通配符命令;作用与any命令相同access-class将标准的IP访问列表应用到VTY线路access-list创建-个过滤网络的测试列表any指定任何主机或任何网络;作用与0.0.0.0 255.255.255.255命令相同Backspace删除一个字符Bandwidth设置--个串行接口止的带宽Banner为登录到本路由器上的用户创建--个标志区cdp enable打开-个特定接口的CDPcdp holdtime修改CDP分组的保持时间cdp run打开路由器上的CDPcdp timer修改CDP更新定时器clear counters清除某一接口上的统计信息、clear line清除通过T elnet连接到路由器的连接clear mac-address-table 清除该交换机动态创建的过滤表clock rate 提供在串行DCE接口上的时钟config memory 复制startup-config到running-configconfig network 复制保存在TFTP主机上的配置到running-configconfig terminal 进人全局配置模式并修改running-configconfig-register 告诉路由器如何启动以及如何修改配置寄存器的设置copy flash tftp 将文件从闪存复制到TFTP主机copy run start copy running-config startup-config的快捷方式,将配置复制到NVRAM中copy run tftp 将running-config文件复制到TFTP主机Copy tftp flash 将文件从TFTP主机复制到闪存Copy tftp run 将配置从TFTP主机复制为running-config文件Ctrl+A 移动光标到本行的开始位置Ctrl+D 删除一个字符Ctrl+E 移动光标到本行的末尾Ctrl+F 光标向前移动一个字符Ctrl+R 重新显示一行,Ctrl+Shitf+6,then X 当telnet到多个路由器时返回到原路由器Ctrl+U 删除一行Ctrl+W 删除一个字CTRL+Z 结束配置模式并返回EXEC(执行状态)debug dialer 显示呼叫建立和结束的过程debug frame-relay lmi 显示在路由器和帧中继交换机之间的lmi交换信息debug ip igrp events 提供在网络中运行的IGRP路由选择信息的概要debug ip igrp transactions 显示来自相邻路由器要求更新的请求消息和由路由器发到相邻路器的广播消息debug ip rip 发送控制台消息显示有关在路由器接口上收发RIP数据包的信息debug ipx 显示通过路由器的RIP和SAP信息debug isdn q921 显示第层进程debug isdn q931 显示第三层进程delete nvram 删除1900交换机-NVRAM的内容delete vip 删除交换机的VTP配置description 在接口上设置---个描述dialer idle-timeout number 告诉BRI线路如果没有发现触发DDR的流量什么时候断开dialer list number protocol 为DDR链路指定触发DDR的流量protocol permit/deny dialer load-threshold number 设置描述什么时候在ISDN链路上启闭第二个BRI的参数inbound/outbound/eitherDialer map protocol address 代替拨号串用于作ISDN网络中提供更好的安全性name hostname numberdialer string 设置用于拨叫BRl接口的电话号码disable 从特权模式返回用户模式disconnect 从原路由器断开同远楞路由豁的连接dupler 设置一个接口的双工enable 进入特权模式enable password 设置不加密的启朋口令enable password level 1 设置用户模式口令enable password level 15 设置启用模式口令enable secret 设置加密的启用秘密口令。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CCNA命令大全登录网络设备,USB-COM-COM-RJ45,超级终端/SecureCRTWould you like to enter the initial configuration dialog? [yes/no]: //回答no,如果回答了yes,会出现大量对话,Ctrl+C中断对话% Please answer 'yes' or 'no'.Router> //用户模式,只能简单的show及ping/tracerRouter>enable //从用户模式进入特权模式Router# //特权模式,能够进行所有的show及ping/tracerRouter#configure terminal//从特权模式进入全局配置模式Router(config)# //全局配置模式,可以进行相关配置Router(config)#hostname R1//给设备命名R1#show version //查看设备软硬件版本信息,开机时间,内存和Flash大小,模块等R1#show ip interface brief //查看接口信息R1#show running-config //查看运行在内存中的当前配置R1#show startup-config //查看开机配置,保存在NVRAMR1#copy running-config startup-config //将当前运行配置保存到开机配置中R1#show tech-support //查看设备所有软硬件的详细信息R1(config)#enable password xxx//配置enable密码,该密码show run可见R1(config)#enable secret xxx //配置enable密码,该密码show run不可见,两个同时配置时,secret密码生效R1(config)#line vty 0 4 //进入telnet配置模式R1(config-line)#login //telnet登陆需要密码验证R1(config-line)#password xxx //配置telnet密码R1(config-line)#exitR1(config)#line vty 0 4R1(config-line)#no login //telnet登陆不需要验证R1(config-line)#exitR1(config)#line vty 0 4R1(config-line)#login local//telnet登陆需要在本地数据库查找用户名密码进行验证R1(config-line)#exitR1(config)#username spoto password xxx //创建本地用户名密码R1(config)#banner ^R1!^ //配置设备登陆提示符,头尾符号需要一致,中间为提示符内容R1(config)#line vty 0 4R1(config-line)#privilege level 15//配置telnet用户特权等级为15,即登陆后直接进入enable模式R1(config-line)#exitR1(config)#interface fastEthernet x/x //进入接口配置模式R1(config-if)#ip address x.x.x.x x.x.x.x //配置IP及掩码R1(config-if)#no shutdown //打开接口,路由器接口默认处于管理性关闭状态R1(config-if)#exit //退出接口配置模式,返回全局配置模式R1(config)#no ip routing //关闭路由功能,将路由器模拟成PCR1(config)#ip default-gateway x.x.x.x //配置网关地址R1#show ip route //查看关闭路由功能后的网关配置R1#show cdp neighbors //查看思科互连设备信息R1(config)#interface loopback 0 //创建环回接口0,用于模拟网段和测试R1(config-if)#ip address x.x.x.x x.x.x.x//配置环回接口IP及掩码,环回接口不需要no shutdownR1(config-if)#exitR1(config)#ip route x.x.x.x x.x.x.x x.x.x.x //配置使用下一跳地址的静态路由R1(config)#ip route x.x.x.x x.x.x.x fastEthernet x/x //配置使用本地出接口的静态路由R1(config)#ip route 0.0.0.0 0.0.0.0 x.x.x.x //配置使用下一跳地址的默认路由R1(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet x/x //配置使用本地出接口的默认路由R1#show ip route //查看路由表R1#ping x.x.x.x //使用出接口作为源IP的普通pingR1#ping x.x.x.x source x.x.x.x //使用指定源地址的扩展pingR1#debug ip icmp //打开ping的调试过程显示R1#undebug ip icmp //关闭ping的调试过程显示R1#traceroute x.x.x.x //路径跟踪,查看到达目的地所经过的IPR1(config)#router rip //运行RIP协议,进入RIP协议配置模式R1(config-router)#version 2 //配置RIP为版本2R1(config-router)#no auto-summary//关闭自动汇总功能R1(config-router)#network x.x.x.x //将相关网段发布到RIP进程中,所有相关子网都会被发布,命令配置不支持带掩码R1(config-router)#exit //退出RIP协议配置模式R1(config)#router eigrp x //运行EIGRP,配置EIGRP AS号码,相邻设备的AS号码要求一致R1(config-router)#no auto-summary//关闭自动汇总功能R1(config-router)#network x.x.x.x //将相关网段发布到EIGRP进程中,所有相关子网都会被发布R1(config-router)#network x.x.x.x x.x.x.x //将相关网段精确发布到EIGRP进程中,命令配置支持带反掩码R1(config-router)#exit //退出EIGRP协议配置模式R1#show ip eigrp neighbors//查看EIGRP邻居表R1#show ip eigrp topology //查看EIGRP拓扑表R1(config)#router ospf x //运行OSPF,配置OSPF本地进程号,该号码仅有本地意义R1(config-router)#network x.x.x.x x.x.x.x area x //相关网段精确发布到OSPF区域中,命令配置要求带反掩码,相邻设备区域号要相同R1(config-router)#auto-cost reference-bandwidth x //修改参考带宽,单位是兆R1(config-router)#exit //退出OSPF协议配置模式R1#show ip ospf neighbor //查看OSPF邻居表R1#show ip ospf database //查看OSPF拓扑表R1#show ip ospf interface //查看OSPF接口状态信息,包括RID、网络类型、hello时间等在C3640上加载NM-16ESW模块来模拟交换机。

如果是模拟2层交换机,需要关闭路由功能。

Switch#vlan database //进入VLAN数据库模式Switch(vlan)#vlan x //创建VLAN,删除时前面加noSwitch(vlan)#exitSwitch#show vlan-switch //查看VLAN表及所属端口,真实设备或IOU模拟器上的命令为show vlanSwitch#show vtp status //查看VTP信息,包括域名、版本、模式等Switch(config)#int fastEthernet x/xSwitch(config-if)#switchport mode access //配置端口模式为accessSwitch(config-if)#switchport access vlan 10 //将该端口划入VLAN10,默认所有端口属于VLAN1Switch(config-if)#exitSwitch(config)#int fastEthernet x/x //进入单臂路由主接口Switch(config-if)#switchport trunk encapsulation dot1q //指定trunk封装使用802.1Q,当交换机支持802.1Q和ISL时使用Switch(config-if)#switchport mode trunk //配置端口模式为trunkSwitch(config-if)#exitSwitch#show interfaces trunk //查看交换机trunk接口信息及状态Switch(config)#interface vlan x //进入管理IP所在的接口Switch(config-if)#ip address x.x.x.x x.x.x.x //配置交换机的管理IPSwitch(config-if)#exitSwitch(config)#ip default-gateway x.x.x.x //配置交换机的网关地址,实现跨网段远程管理R1(config)#interface fastEthernet x/xR1(config-if)#no shutdown //单臂路由配置,只需要主接口开启,子接口会自动继承开启R1(config-if)#exitR1(config)#interface fastEthernet x/x.x //进入子接口配置模式R1(config-subif)#encapsulation dot1Q x //配置封装为802.1Q,并指定该子接口所对应的VLANR1(config-subif)#ip address x.x.x.x x.x.x.x //配置该VLAN的网关地址R1(config-subif)#exitR1(config)#access-list x permit x.x.x.x //允许来自某台主机的流量R1(config)#access-list x permit x.x.x.x x.x.x.x //允许来自某个网段的流量R1(config)#access-list x deny any //标准ACL的默认操作是拒绝所有流量R1(config)#interface fastEthernet x/xR1(config-if)#ip access-group x in //将CAL应用在接口的入方向R1(config-if)#ip access-group x out //将ACL应用在接口的出方向R1(config-if)#exitR1(config)#line vty 0 4R1(config-line)#access-class 1 in //telnet远程控制,有在ACL中被允许的主机能远程telnet到本机。

相关文档
最新文档