导航:首页 > 程序命令 > cisco命令保存

cisco命令保存

发布时间:2022-10-03 18:32:06

Ⅰ cisco常用命令

cisco常用命令大全

为帮助大家更好通过思科认证。我为大家分想的是思科认证基本命令,欢迎参考阅读!

路由器的几个基本命令:

Router>enable 进入特权模式

Router#disable 从特权模式返回到用户模式

Router#configure terminal 进入到全局配置模式

Router(config)#interface ethernet 1 进入到路由器编号为1的以太网口

exit 返回上层模式

end 直接返回到特权模式

========================================================

注意:

1、CISCO CATALYST(交换机),如果在初始化时没有发现“用户配置”文件,就会自动载入Default Settings(默认配置)文件,进行交换机初始化,以确保交换机正常工作。

2、CISCO Router(路由器)在初始化时,如果没有发现“用户配置”文件,系统会自动进入到“初始化配置模式”(系统配置对话模式,SETUP模式, STEP BY STEP CONFIG模式),不能正常工作!

========================================================

1、CONSOLE PORT(管理控制台接口):距离上限制,独占的方式。刚开始配置的时候一般使用这个。

2、AUX port(辅助管理接口):可以挂接MODEM实现远程管理,独占的方式。

3、Telnet:多人远程管理(决定于性能,VTY线路数量)不安全。后期维护,远程管理登陆。

========================================================

注意:

交换机、路由器配置命令都是回车后立即执行,立即生效的。在运行中的机器上修改命令的时候要特别注意。

========================================================

Router(config)#hostname ?

WORD This system's network name

在配置模式下修改当前主机的本地标识,例:

------------------

Router(config)#hostname r11

r11(config)#

------------------

r11(config-if)#ip address ?

A.B.C.D IP address

为当前端口设置IP地址,使用前先进入需要配置的端口,例:

------------------

r11(config)#interface ethernet 1

r11(config-if)#ip address 172.16.1.1 255.255.255.0

------------------

r11>show version

r11#show version 观察IOS版本,设备工作时间,相关接口列表

r11#show running-config 查看当前生效的配置,此配置文件存储在RAM

r11#show interfaces ethernet 1 查看以太网接口的状态,工作状态等等等...

========================================================

r11#reload 重新加载Router(重启)

r11#setup 手工进入setup配置模式

r11#show history 查看历史命令(最近刚用过的命令)

r11#terminal history size <0-256> 设置命令缓冲区大小,0 : 代表不缓存

r11# running-config startup-config 保存当前配置

注意概念:

nvram:非易失性内存,断电信息不会丢失 <-- 用户配置 <-- 保存着startup-config

ram:随机存储器,断电信息全部丢失 <-- 当前生效配置 <-- 保存着running-config

startup-config:在每次路由器或是交换机启动时候,会主动加载(默认情况)

========================================================

设置说明和密码的几个命令:

r11(config)#banner motd [char c] 同时要以[char c]另起一行结束,描述机器登陆时的说明

r11(config-if)#description 描述接口注释,需要在端口配置模式下

配置console口密码:

------------------

r11(config)#line console 0 进入到consolo 0

r11(config-line)#password eliuzd 设置一个密码为“eliuzd”

r11(config-line)#login 设置login(登陆)时使用密码

------------------

配置enable密码:

------------------

r11(config)#enable password cisco 设置明文的enable密码

r11(config)#enable secret eliuzd 设置暗文的enable密码(优先于明文被使用)

r11(config)#service password-encryption 加密系统所有明文密码(功能较弱)

------------------

配置Telnet密码:

------------------

r11(config)#line vty 0

r11(config-line)#password cisco

r11(config-line)#login

------------------

========================================================

配置虚拟回环接口:(回环接口默认为UP状态)

(config)# 下,虚拟一个端口

------------------

r11(config)#interface loopback 0 创建一个回环接口loopback 0

r11(config-if)#ip address 192.168.1.1 255.255.255.0 配置它的IP地址

no * 做配置的反向操作(删除配置)

------------------

=========================================================

路由器 DCE/DTE 仅存在广域网中r11#show controllers serial 0 用于查看DCE与DTE的属性,serial 0路由器广域网端口

DCE的Router需要配置时钟频率

r11(config-if)#clock rate ? 配置DCE接口的时钟频率(系统指定频率)

一般实际情况下,这个不需要自己配置,因为DCE设备都在运营商那。

=========================================================

r11#show interfaces serial 1

查看端口状态,第一行提示说明

Serial1 is administratively down, Line protocol is down

没有使用no shutdown命令激活端口

Serial1 is down, Line protocol is down

1、对方没有no shutdown激活端口

2、线路损坏,接口没有任何连接线缆

Serial1 is up, line protocol is down

1、对方没有配置相同的二层协议,Serial接口default encapsulation: HDLC

2、可能没有配置时钟频率

3、可能没有正确的配置三层地址(可能)

Serial1 is up,line protocol is up

接口工作正常

========================================================

查看CDP信息的几个命令:

r11#show cdp neighbors 查看CDP的邻居(不含IP)

r11#show cdp neighbors detail 查看CDP的邻居(包含三层的IP地址)

r11#show cdp entry * 查看CDP的邻居(包含三层的IP地址)老命令

r1(config)#no cdp run 在全局配置模式关闭CDP协议(影响所有的接口)

r1(config-if)#no cdp enable 在接口下关闭CDP协议(仅仅影响指定的接口)

r11#clear cdp table 清除CDP邻居表

r11#show cdp interface serial 1 查看接口的CDP信息

注意两个提示:

Sending CDP packets every 60 seconds(每60秒发送cdp数据包)

HoldTime 180 seconds(每个cdp数据包保持180秒)

========================================================

r11(config)#ip host 设置静态的主机名映射

r11#show sessions 查看设置过的映射主机名

========================================================

Telnet *.*.*.* 被telnet的设备,需要设置line vty的密码,如果需要进入特权模式需要配置enable密码

例:

------------------

Router#telnet 192.168.1.1

------------------

Router#show users 查看登录到本地的用户

Router#show sessions 查看从本地telnet外出的会话

Router#clear line * 强制中断“telnet到本地”的会话

Router#disconnect * 强制中断“telnet外出”的会话

========================================================

以下只是在实验时连接交换机上切换登陆路由器的命令,可以跳过。

>show hosts 显示当前的主机名配置

>show sessions 显示当前的外出TELNET会话

>clear line XXX 清除线路

+ 直接返回到特权模式

++<6> + x

========================================================

Access-enable允许路由器在动态访问列表中创建临时访问列表入口

Access-group把访问控制列表(ACL)应用到接口上

Access-list定义一个标准的IP ACL

Access-template在连接的路由器上手动替换临时访问列表入口

Appn向APPN子系统发送命令

Atmsig 执行ATM信令命令

B 手动引导操作系统

Bandwidth 设置接口的带宽

Banner motd 指定日期信息标语

Bfe 设置突发事件手册模式

Boot system 指定路由器启动时加载的系统映像

Calendar 设置硬件日历

Cd 更改路径

Cdp enable 允许接口运行CDP协议

Clear 复位功能

Clear counters 清除接口计数器

Clear interface 重新启动接口上的件逻辑

Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率

Cmt 开启/关闭FDDI连接管理功能

Config-register 修改配置寄存器设置

Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息

Configure memory 从NVRAM加载配置信息

Configure terminal 从终端进行手动配置

Connect 打开一个终端连接

Copy 复制配置或映像数据

Copy flash tftp 备份系统映像文件到TFTP服务器

Copy running-config startup-config 将RAM中的当前配置存储到NVRAM

Copy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上

Copy tftp flash 从TFTP服务器上下载新映像到Flash

Copy tftp running-config 从TFTP服务器上下载配置文件

Debug 使用调试功能

Debug dialer 显示接口在拨什么号及诸如此类的信息

Debug ip rip 显示RIP路由选择更新数据

Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息

Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息

Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程

Debug ppp 显示在实施PPP中发生的业务和交换信息

Delete 删除文件

Deny 为一个已命名的IP ACL设置条件

Dialer idle-timeout 规定线路断开前的空闲时间的长度

Ⅱ 知道思科路由器上保存命令的帮下忙

1、首先交换机连接电源线。

Ⅲ cisco路由器中保存路由器ram配置文件到nvram中的命令是什么

run start 意思是把当前正在运行的配置保存为开机配置至NVram 。。一般是配置改动以后将改动保存 以免路由器关机以后新配置消失 因为RAM 断电就掉数据。
当然要做备份的话 可以保存至 run tftp 或者 start tftp (如果这两个一样的话)保存至tftp服务器
当然破解密码也要用上。。

Ⅳ cisco packet tracer 怎么在断电后保存配置的命令

关掉时,pt会询问是否保存,选是就可以了,连路由器里没保存的都保存了。
你说的保存不是指路由器里保存配置吧?
running-config startup-config或者write,最省事就是wr。

Ⅳ 思科交换机保存命令的几个版本

3个。
给交换机配置使能密码,进入特权模式时需要输入密码才能进入,避免设备可以被其他人员使用。
交换机配置VLAN,并给将端口加入到该VLAN。最后使用show:查看命令,交换机的所有配置和其它相关信息都需要通过show命令查看。

Ⅵ 思科交换机的配置保存命令

1、首先打开思科交换CLI,从特权模式进入全局配置模式,如下图所示。

Ⅶ CISCO的交换机,进行配置后如何保存

1、首先打开思科交换CLI,从特权模式进入全局配置模式,如下图所示。

Ⅷ Cisco常用的路由器交换机配置命令

cisco制造的路由器设备、交换机和其他设备承载了全世界80%的互联网通信,成为硅谷中新经济的传奇,那么你了解Cisco常用的路由器交换机配置命令吗?下面是我整理的一些关于Cisco常用的路由器交换机配置命令的相关资料,供你参考。

Cisco常用的路由器支持的命令:

路由器显示命令:

router#show run ;显示配置信息

router#show interface ;显示接口信息

router#show ip route ;显示路由信息

router#show cdp nei ;显示邻居信息

router#reload ;重新起动

路由器口令设置:

router>enable ;进入特权模式

router#config terminal ;进入全局配置模式

router(config)#hostname ;设置交换机的主机名

router(config)#enable secret xxx ;设置特权加密口令

router(config)#enable password xxb ;设置特权非密口令

router(config)#line console 0 ;进入控制台口

router(config-line)#line vty 0 4 ;进入虚拟终端

router(config-line)#login ;要求口令验证

router(config-line)#password xx ;设置登录口令xx

router(config)#(Ctrl+z) ; 返回特权模式

router#exit ;返回命令

路由器配置:

router(config)#int s0/0 ;进入Serail接口

router(config-if)#no shutdown ;激活当前接口

router(config-if)#clock rate 64000 ;设置同步时钟

router(config-if)#ip address ;设置IP地址

router(config-if)#ip address second ;设置第二个IP

router(config-if)#int f0/0.1 ;进入子接口

router(config-subif.1)#ip address ;设置子接口IP

router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议

router(config)#config-register 0x2142 ;跳过配置文件

router(config)#config-register 0x2102 ;正常使用配置文件

router#reload ;重新引导

路由器文件操作:

router# running-config startup-config ;保存配置

router# running-config tftp ;保存配置到tftp

router# startup-config tftp ;开机配置存到tftp

router# tftp flash: ;下传文件到flash

router# tftp startup-config ;下载配置文件

ROM状态:

Ctrl+Break ;进入ROM监控状态

rommon>confreg 0x2142 ;跳过配置文件

rommon>confreg 0x2102 ;恢复配置文件

rommon>reset ;重新引导

rommon> xmodem: flash: ;从console传输文件

rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP

rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码

rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP

rommon>TFTP_FILE=c2600.bin ;指定下载的文件

rommon>tftpdnld ;从tftp下载

rommon>dir flash: ;查看闪存内容

rommon>boot ;引导IOS

静态路由:

ip route ;命令格式

router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例

router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例

动态路由:

router(config)#ip routing ;启动路由转发

router(config)#router rip ;启动RIP路由协议。

router(config-router)#network ;设置发布路由

router(config-router)#negihbor ;点对点帧中继用。

帧中继命令:

router(config)#frame-relay switching ;使能帧中继交换

router(config-s0)#encapsulation frame-relay ;使能帧中继

router(config-s0)#fram-relay lmi-type cisco ;设置管理类型

router(config-s0)#frame-relay intf-type DCE ;设置为DCE

router(config-s0)#frame-relay dlci 16 ;

router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号

router(config-s0)#frame-relay interface-dlci 16 ;

router(config)#log-adjacency-changes ;记录邻接变化

router(config)#int s0/0.1 point-to-point ;设置子接口点对点

router#show frame pvc ;显示永久虚电路

router#show frame map ;显示映射

基本访问控制列表:

router(config)#access-list permit|deny

router(config)#interface ;default:deny any

router(config-if)#ip access-group in|out ;defaultut

例1:

router(config)#access-list 4 permit 10.8.1.1

router(config)#access-list 4 deny 10.8.1.0 0.0.0.255

router(config)#access-list 4 permit 10.8.0.0 0.0.255.255

router(config)#access-list 4 deny 10.0.0.0 0.255.255.255

router(config)#access-list 4 permit any

router(config)#int f0/0

router(config-if)#ip access-group 4 in

扩展访问控制列表:

access-list permit|deny icmp [type]

access-list permit|deny tcp [port]

例3:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo

router(config)#access-list 101 permit ip any any

router(config)#int s0/0

router(config-if)#ip access-group 101 in

例3:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80

router(config)#access-list 102 permit ip any any

router(config)#interface s0/1

router(config-if)#ip access-group 102 out

删除访问控制例表:

router(config)#no access-list 102

router(config-if)#no ip access-group 101 in

路由器的nat配置

Router(config-if)#ip nat inside ;当前接口指定为内部接口

Router(config-if)#ip nat outside ;当前接口指定为外部接口

Router(config)#ip nat inside source static [p] [port]

Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1

Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80

Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0

Router(config)#ip nat inside source list 1 pool p1

Router(config)#ip nat inside destination list 2 pool p2

Router(config)#ip nat inside source list 2 interface s0/0 overload

Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary

Router#show ip nat translation

rotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。

overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。

外部网关协议配置

routerA(config)#router bgp 100

routerA(config-router)#network 19.0.0.0

routerA(config-router)#neighbor 8.1.1.2 remote-as 200

配置PPP验证:

RouterA(config)#username password

RouterA(config)#int s0

RouterA(config-if)#ppp authentication {chap|pap}

3.PIX防火墙命令

Pix525(config)#nameif ethernet0 outside security0 ;命名接口和级别

Pix525(config)#interface ethernet0 auto ;设置接口方式

Pix525(config)#interface ethernet1 100full ;设置接口方式

Pix525(config)#interface ethernet1 100full shutdown

Pix525(config)#ip address inside 192.168.0.1 255.255.255.0

Pix525(config)#ip address outside 133.0.0.1 255.255.255.252

Pix525(config)#global (if_name) natid ip-ip ;定义公网IP区间

Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句

Pix525(config)#global (outside) 1 133.0.0.1 ;例句

Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉设置

Pix525(config)#nat (if_name) nat_id local_ip [netmark]

Pix525(config)#nat (inside) 1 0 0

内网所有主机(0代表0.0.0.0)可以访问global 1指定的外网。

Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0

内网172.16.5.0/16网段的主机可以访问global 1指定的外网。

Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式

Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句

Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句

Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8

表示内部ip地址192.168.0.8,访问外部时被翻译成133.0.0.1全局地址。

Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8

中间区域ip地址172.16.0.8,访问外部时被翻译成133.0.0.1全局地址。

Cisco常用的交换机支持的命令:

交换机基本状态:

switch: ;ROM状态, 路由器是rommon>

hostname> ;用户模式

hostname# ;特权模式

hostname(config)# ;全局配置模式

hostname(config-if)# ;接口状态

交换机口令设置:

switch>enable ;进入特权模式

switch#config terminal ;进入全局配置模式

switch(config)#hostname ;设置交换机的主机名

switch(config)#enable secret xxx ;设置特权加密口令

switch(config)#enable password xxa ;设置特权非密口令

switch(config)#line console 0 ;进入控制台口

switch(config-line)#line vty 0 4 ;进入虚拟终端

switch(config-line)#login ;允许登录

switch(config-line)#password xx ;设置登录口令xx

switch#exit ;返回命令

交换机VLAN设置:

switch#vlan database ;进入VLAN设置

switch(vlan)#vlan 2 ;建VLAN 2

switch(vlan)#no vlan 2 ;删vlan 2

switch(config)#int f0/1 ;进入端口1

switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2

switch(config-if)#switchport mode trunk ;设置为干线

switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan

switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继

switch(config)#vtp domain ;设置发vtp域名

switch(config)#vtp password ;设置发vtp密码

switch(config)#vtp mode server ;设置发vtp模式

switch(config)#vtp mode client ;设置发vtp模式

交换机设置IP地址:

switch(config)#interface vlan 1 ;进入vlan 1

switch(config-if)#ip address ;设置IP地址

switch(config)#ip default-gateway ;设置默认网关

switch#dir flash: ;查看闪存

交换机显示命令:

switch#write ;保存配置信息

switch#show vtp ;查看vtp配置信息

switch#show run ;查看当前配置信息

switch#show vlan ;查看vlan配置信息

switch#show interface ;查看端口信息

switch#show int f0/0 ;查看指定端口信息

Ⅸ 思科交换机保存设置的命令

(1) Switch# running-config startup-config 这个命令的意思是把当前设备的运行配置保存到flash中去,以便下一次重启后系统能够还原到当前配置。
(2) switch#write 保存配置信息。

Ⅹ cisco交换机3550,2950配置好vlan后的保存命令是什么

在接口配置模式下使用 do wr 或者是 do running-config startup-config
在全局配置模式下使用不带do的命令(以上两个).

阅读全文

与cisco命令保存相关的资料

热点内容
加密机操作手册 浏览:860
dos命令自动关闭 浏览:328
心田花开app在哪里评价 浏览:449
求索记录频道哪个app可以看 浏览:730
金梅瓶pdf下载 浏览:985
机器软件用什么编程 浏览:845
java虚拟机指令 浏览:671
shell编程入门书籍 浏览:946
大连桶装水溯源码售价 浏览:302
php怎么跳转到电脑 浏览:414
如何在电脑上创建新网络连接服务器 浏览:61
c语言编译之后如何运行 浏览:569
mfc多线程编程视频 浏览:411
c编译的中文怎么写 浏览:92
单片机连接蜂鸣器电路 浏览:845
程序员买房前后对比照 浏览:1006
cmdjava中文乱码 浏览:949
窗口app哪个好 浏览:732
xzforandroid 浏览:580
程序员那么可爱歌曲完整版 浏览:926