免费发布供求信息
热门搜: 无锡  赣州  南京  工业  阳电  作用  区别  消毒柜  纽曼  散热器  新能源  插槽 
当前位置: 首页 » 投稿 » 美文摘要 » 正文

思科交换机保存配置命令(如何备份cisco交换机配置文件)

放大字体  缩小字体 发布日期:2024-07-01 11:19:49  作者:[db:新闻资讯作者]  浏览次数:37
核心提示:本文目录如何备份cisco交换机配置文件思科交换机保存命令的几个版本cisco交换机配置命令思科交换机里面的配置怎么保存CISCO的交

本文目录

  • 如何备份cisco交换机配置文件
  • 思科交换机保存命令的几个版本
  • cisco交换机配置命令
  • 思科交换机里面的配置怎么保存
  • CISCO的交换机,进行配置后如何保存
  • cisco保存设置
  • 思科交换机保存设置的命令
  • cisco交换机安全配置设定命令

如何备份cisco交换机配置文件

CISCO交换机备份和恢复配置文件的方法CISCO交换机备份和恢复配置文件的方法1、保存配置将当前运行配置从DRAM存储到启动配置所在的NVRAM中,有两种命令:(1)规范版本:Sw1#copy system:running-configflash:startup-configDestination filename ?(确认目的文件名)(2)简略版本:Sw1#copy running-config startup-configDestination filename ?(3)其他版本Sw1#copy run startcopy run start是copy running-config startup-config的简写。Sw1#wrwr是write的简写。2、将启动配置备份到存储在闪存NVRAM的文件中比如将启动配置备份为文件名config.bak1的文件,并存储在NVRAM中:Sw1#copy startup-configflash:config.bak1Destination filename ?3、恢复配置比如将备份的启动配置config.bak1恢复为目前想用的启动配置:Sw1#copy flash:config.bak1 startup-configDestination filename ?当配置恢复到startup-config中后,可在特权模式下使用reload命令重启交换机,使其重新加载新的启动配置:Sw1#reloadSystem configuration has been modified.Save?:nProceed with reload?发出reload命令后,系统将提示您是否要保存配置,此处不需要保存,所以选择no。如果此处选择yes,则刚刚恢复的文件将被当前运行的配置覆盖。

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

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

cisco交换机配置命令

switch》 用户模式1:进入特权模式 enableswitch》 enableswitch#2:进入全局配置模式 configure terminalswitch》 enableswitch#configure terminalswitch(conf)#3:交换机命名 hostname aptech3950 以aptech3950为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech3950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# interface vlan 1aptech3950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech3950(conf-if)#no shut 是配置处于运行中aptech3950(conf-if)#exitaptech3950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# interface fastehernet 0/17aptech3950(conf-if)#8:查看命令 showswitch》 enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令 switch》 enableswitch# erase startup-configureswitch# reload10:双工模式设置switch》 enableswitch#configure terminalswitch3950(conf)#hostname aptch-2950aptech3950(conf)# interface fastehernet 0/17 以17端口为例aptech3950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch》 enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。用手按着交换机的MODE键,插上电源线在switch:后执行flash_ini命令:switch: flash_ini查看flash中的文件: switch: dir flash:把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old执行boot: switch: boot交换机进入是否进入配置的对话,执行no : 进入特权模式察看flash里的文件: show flash : 把“config.old”文件改名为 “config.text”: switch: rename flash: config.old flash: config.text把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-configure把配置模式重新设置密码存盘,密码恢复成功。13:交换机telnet远程登录设置:switch》enswitch#configure terminalswitch(conf)#hostname aptech-2950aptech3950(conf)#enable password cisco 以cisco为特权模式密码aptech3950(conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口aptech3950(conf-if)#ip address 192.168.1.1 255.255.255.0aptech3950(conf-if)#no shutaptech3950(conf-if)#exitaptech3950(conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆aptech3950(conf-line)#loginaptech3950(conf-line)#password edge 以edge为远程登录的用户密码主机设置:ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段netmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telnet 192.168.1.1 进入telnet远程登录界面password : edge aptech3950》enpassword: ciscoaptech#14:交换机配置的重新载入和保存设置完成交换机的配置后:aptech3950(conf)#reload是否保存(y/n) y: 保存设置信息 n:不保存设置信息路由器命令router》 用户模式1:进入特权模式 enablerouter 》 enablerouter #2:进入全局配置模式 configure terminalrouter 》 enablerouter #configure terminalrouter (conf)#3:交换机命名 hostname routera 以routerA为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerAroutera (conf)#4:配置使能口令 enable password cisco 以cisco为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# enable secret ciscolab6:进入路由器某一端口 interface fastehernet 0/17 以17端口为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17routerA (conf-if)#进入路由器的某一子端口 interface fastethernet 0/17.1 以17端口的1子端口为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17.17:设置端口ip地址信息router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA(conf)# interface fastehernet 0/17 以17端口为例routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码routerA (conf-if)#no shut 是配置处于运行中routerA (conf-if)#exit8:查看命令 showrouter 》 enablerouter # show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间show controllers serial + 编号 查看串口类型show ip router 查看路由器的路由表9:cdp相关命令router 》 enablerouter # show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备10:csico2600的密码恢复重新启动路由器,在启动过程中按下win+break键,使路由器进入rom monitor在提示符下输入命令修改配置寄存器的值,然后重新启动路由器remmon1》confreg 0x2142remmon2》reset重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变把startup-config中配置保存到running-config中,然后重新设置enable密码,并把配置寄存器改回0x2102:router》enable router#copy startup-config running-configrouter#configure terminalrouter(conf)#enable password ciscorouter(conf)#config-register 0x2102保存当前配置到startup-config , 重新启动路由器。router #copy running-config startup-config router #reload11:路由器telnet远程登录设置:router》enrouter #configure terminalrouter (conf)#hostname routerArouterA (conf)#enable password cisco 以cisco为特权模式密码routerA (conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口routerA (conf-if)#ip address 192.168.1.1 255.255.255.0routerA (conf-if)#no shutrouterA (conf-if)#exitrouterA (conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆routerA (conf-line)#loginrouterA (conf-line)#password edge 以edge为远程登录的用户密码主机设置:ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段netmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telnet 192.168.1.1 进入telnet远程登录界面password : edge routera》enpassword: ciscoroutera#12:配置路由器的标识 banner $……………$在全局配置的模式下利用“banner”命令可以配置路由器的提示信息,所有连接到路由器的终端都会收到。router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#banner motd $This is aptech company’ router ! Please don’t change the configuration without permission!$13:配置接口标识 description ………接口标识用于区分路由器的各个接口。router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#interface fastethernet 0/1 以0/1 接口为例routerA(conf-if)# description this is a fast Ethernet port used to connecting the company’s intranet! 14:配置超时 超时适用于设置在多长时间没有对console进行配置,自动返回exec会话时间。默认为10分钟。router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#line console 0routerA(conf-if)#exec-timeout 0 0 第一个“0”分钟,第二个“0”秒15:配置串口参数 两台路由器通过串口连接需要一个做为DTE,一个做为DCE。DCE设备要向DTE设备提供时钟频率和带宽。DCE配置:router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#interface serial 0/0routerA(conf_if)#clock rate 64000 提供时钟频率为64000routerA(conf_if)#bandwidth 64 提供带宽为64DTE配置:路由器串口配置ip地址router》enrouter #configure terminalrouter (conf)#hostname routerBrouterB(conf)#interface serial 0/0routerB(conf_if)#ip address 192.168.1.1 255.255.255.016:静态路由的配置配置路由器A的主机名和接口参数router》enable router#configure terminalrouter(conf)#hostname routerArouterA(conf)#interface fastethernet 0/1 路由器A的1端口为两路由器的连接端口routerA(conf-if)#ip address 192.168.2.1 255.255.255.0routerA(conf-if)#no shutdownrouterA(conf-if)#exitrouterA(conf)# interface fastethernet 0/0 路由器A的0端口为与主机的连接端口routerA(conf-if)#ip address 192.168.1.2 255.255.255.0routerA(conf-if)#no shutdown主机A的ip地址为 192.168.1.1 255.255.255.0 192.168.1.2配置路由器B的主机名和接口参数router》enable router#configure terminalrouter(conf)#hostname routerBrouterB(conf)#interface fastethernet 0/0 路由器B的0端口为两路由器的连接端口routerB(conf-if)#ip address 192.168.2.2 255.255.255.0routerB(conf-if)#no shutdownrouterB (conf-if)#exitrouterB(conf)# interface fastethernet 0/1 路由器B的1端口为与主机的连接端口routerB(conf-if)#ip address 192.168.3.1 255.255.255.0主机B的ip地址为 192.168.3.2255.255.255.0 192.168.3.1配置路由器A的静态路由表routerA(conf)#ip router 192.168.3.0 255.255.255.0 192.168.2.2 配置路由器B的静态路由表routerA(conf)#ip router 192.168.1.0 255.255.255.0 192.168.2.1在routerA和routerB上配置默认路由routerA(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.2routerA(conf)#ip classlessrouterB(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.1routerB(conf)#ip classless在routerA和routerB上配置动态路由(RIP)routerA(conf)#router riprouterA(conf)#network 192.168.1.0routerA(conf)#network 192.168.2.0routerB(conf)# router riprouterB(conf)#network 192.168.2.0routerB(conf)#network 192.168.3.0

思科交换机里面的配置怎么保存

1、在接口配置模式下使用 do wr 或者是 do copy running-config startup-config2、在全局配置模式下使用不带do的命令(以上两个)3、导出的话,可以用TFTP,或者FTP直接下载。 你也可以用软件CRT中执行show start-config,显示初始配置信息。执行show running-config 来显示当前运行信息。然后直接复制黏贴到文档就行了。

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

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

2、在特权模式下可以对交换机进行命名,这样在配置多台交换机时,避免将配置写错交换机。

3、给交换机配置使能密码,进入特权模式时需要输入密码才能进入,避免设备可以被其他人员使用。

4、交换机配置VLAN,并给将端口加入到该VLAN。

5、最后使用show:查看命令,交换机的所有配置和其它相关信息都需要通过show命令查看。

cisco保存设置

  文件备份总是最重要的,cisco保存设置呢?我为大家带来cisco安全配置命令大全,需要的朋友可以参考下!

  这类交换机/路由器的配置保存命令是 Switch#write; 还有 Switch#copy running-config startup-config。二个都可以。

   保存到本地

  (1)你本机要接到交换机,记得交换机配置管理IP地址:192.168.117.11;

  (2)要是直连交换机的话,本机和交换机必须在同一网段:192.168.117.113,要是不在同一网 段:192.168.112.113,网络得通,也就是要有路由;

  (3)在交换机上线ping本地IP地址,一定要通;

  (4)本地安装3CDaemon软件,带有TFTP功能的软件均可,配置好download path,否则报错;

  (5)TFTP使用69端口,最好关闭防火墙软件,网络放行69端口

  这样我们就可以开始了:

  JN-SW1#copy running-config tftp #这里是copy正在运行的配置到本地

  Address or name of remote host ? 192.168.112.113 #本地的IP地址

  Destination filename ? #这里默认即可

  !!

  3327 bytes copied in 1.283 secs (2593 bytes/sec) #有感叹号和这个时间提示,就表示成功了

  这里只是保存running-config到本地,举一反三,同样也可以保存startup-config和flash中的IOS到本地,那上传就是反过来喽。

  以上内容就是关于cisco保存设置教程了,希望大家喜欢。

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

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

cisco交换机安全配置设定命令

cisco交换机安全配置设定命令大全

  思科交换机的安全怎么设置,下面为大家分交换机安全设置的配置命令,希望对同学们学习思科交换机有所帮助!

  一、交换机访问控制安全配置

  1、对交换机特权模式设置密码尽量采用加密和md5 hash方式

  switch(config)#enable secret 5 pass_string

  其中 0 Specifies an UNENCRYPTED password will follow

  5 Specifies an ENCRYPTED secret will follow

  建议不要采用enable password pass_sting密码,破解及其容易!

  2、设置对交换机明文密码自动进行加密隐藏

  switch(config)#service password-encryption

  3、为提高交换机管理的灵活性,建议权限分级管理并建立多用户

  switch(config)#enable secret level 7 5 pass_string7 /7级用户进入特权模式的密码

  switch(config)#enable secret 5 pass_string15 /15级用户进入特权模式的密码

  switch(config)#username userA privilege 7 secret 5 pass_userA

  switch(config)#username userB privilege 15 secret 5 pass_userB

  /为7级,15级用户设置用户名和密码,Cisco privilege level分为0-15级,级别越高权限越大

  switch(config)#privilege exec level 7 commands

  /为7级用户设置可执行的命令,其中commands可以根据分配给用户的权限自行定义

  4、本地console口访问安全配置

  switch(config)#line console 0

  switch(config-line)#exec-timeout 5 0 /设置不执行命令操作的超时时间,单位为分钟和秒

  switch(config-line)#logging synchronous

  /强制对弹出的干扰日志信息进行回车换行,使用户输入的命令连续可见

  设置登录console口进行密码验证

  方式(1):本地认证

  switch(config-line)#password 7 pass_sting /设置加密密码

  switch(config-line)#login /启用登录验证

  方式(2):本地AAA认证

  switch(config)#aaa new-model /启用AAA认证

  switch(config)#aaa authentication login console-in group acsserver local

  enable

  /设置认证列表console-in优先依次为ACS Server,local用户名和密码,enable特权密码

  switch(config)#line console 0

  switch(config-line)# login authentication console-in

  /调用authentication设置的console-in列表

  5、远程vty访问控制安全配置

  switch(config)#access-list 18 permit host x.x.x.x

  /设置标准访问控制列表定义可远程访问的PC主机

  switch(config)#aaa authentication login vty-in group acsserver local

  enable

  /设置认证列表vty-in, 优先依次为ACS Server,local用户名和密码,enable特权密码

  switch(config)#aaa authorization commands 7 vty-in group acsserver local

  if-authenticated

  /为7级用户定义vty-in授权列表,优先依次为ACS Server,local授权

  switch(config)#aaa authorization commands 15 vty-in group acsserver local

  if-authenticated

  /为15级用户定义vty-in授权列表,优先依次为ACS Server,local授权

  switch(config)#line vty 0 15

  switch(config-line)#access-class 18 in /在线路模式下调用前面定义的标准ACL 18

  switch(config-line)#exec-timeout 5 0 /设置不执行命令操作的超时时间,单位为分钟和秒

  switch(config-line)#authorization commands 7 vty-in /调用设置的授权列表vty-in

  switch(config-line)#authorization commands 15 vty-in

  switch(config-line)#logging synchronous

  /强制对弹出的干扰日志信息进行回车换行,使用户输入的命令连续可见

  switch(config-line)#login authentication vty-in

  /调用authentication设置的vty-in列表

  switch(config-line)#transport input ssh

  /有Telnet协议不安全,仅允许通过ssh协议进行远程登录管理

  6、AAA安全配置

  switch(config)#aaa group server tacacs+ acsserver /设置AAA服务器组名

  switch(config-sg-tacacs+)#server x.x.x.x /设置AAA服务器组成员服务器ip

  switch(config-sg-tacacs+)#server x.x.x.x

  switch(config-sg-tacacs+)#exit

  switch(config)# tacacs-server key paa_string /设置同tacacs-server服务器通信的密钥

  二、交换机网络服务安全配置

  禁用不需要的各种服务协议

  switch(config)#no service pad

  switch(config)#no service finger

  switch(config)#no service tcp-small-servers

  switch(config)#no service udp-small-servers

  switch(config)#no service config

  switch(config)#no service ftp

  switch(config)#no ip

  switch(config-if)#spanning-tree bpdufilter enable

  /当启用bpdufilter功能时,该端口将丢弃所有的bpdu包,可能影响网络拓扑的稳定性并造成网络环路

  switch(config-if)#spanning-tree bpduguard enable

  /当启用bpduguard功能的交换机端口接收到bpdu时,会立即将该端口置为error-disabled状态而无法转发数据,进而避免了网络环路!

  注意:同时启用bpduguard与bpdufilter时,bpdufilter优先级较高,bpduguard将失效!

  广播、组播风暴控制设定

  switch(config-if)#storm-control broadcast level 10 /设定广播的阀值为10%

  switch(config-if)#storm-control multicast level 10 /设定组播的阀值为10%

  switch(config-if)#storm-control action shutdown / Shutdown this interface

  if a storm occurs

  or switch(config-if)#storm-control action trap / Send SNMP trap if a storm

 
关键词: 交换机
 
 
相关推荐
热门点击
 
网站首页 | 网站地图 | 广告服务 | 网站留言 | RSS订阅