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

 更新时间:2024-10-12

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

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

  ⑶CISCO交换机备份和恢复配置文件的方法CISCO交换机备份和恢复配置文件的方法、保存配置将当前运行配置从DRAM存储到启动配置所在的NVRAM中,有两种命令:(规范版本:Sw#copysystem:running-configflash:startup-configDestinationfilename?(确认目的文件名(简略版本:Sw#copyrunning-configstartup-configDestinationfilename?(其他版本Sw#copyrunstartcopyrunstart是copyrunning-configstartup-config的简写。Sw#wrwr是write的简写。、将启动配置备份到存储在闪存NVRAM的文件中比如将启动配置备份为文件名config.bak的文件,并存储在NVRAM中:Sw#copystartup-configflash:config.bakDestinationfilename?、恢复配置比如将备份的启动配置config.bak恢复为目前想用的启动配置:Sw#copyflash:config.bakstartup-configDestinationfilename?当配置恢复到startup-config中后,可在特权模式下使用reload命令重启交换机,使其重新加载新的启动配置:Sw#reloadSystemconfigurationhasbeenmodified.Save?:nProceedwithreload?发出reload命令后,系统将提示您是否要保存配置,此处不需要保存,所以选择no。如果此处选择yes,则刚刚恢复的文件将被当前运行的配置覆盖。

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

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

  ⑹cisco交换机配置命令

  ⑺switch》用户模式:进入特权模式enableswitch》enableswitch#:进入全局配置模式configureterminalswitch》enableswitch#configureterminalswitch(conf)#:交换机命名hostnameaptech以aptech为例switch》enableswitch#configureterminalswitch(conf)#hostnameaptch-aptech(conf)#:配置使能口令enablepasswordcisco以cisco为例switch》enableswitch#configureterminalswitch(conf)#hostnameaptchaptech(conf)#enablepasswordcisco:配置使能密码enablesecretciscolab以cicsolab为例switch》enableswitch#configureterminalswitch(conf)#hostnameaptchaptech(conf)#enablesecretciscolab:设置虚拟局域网vlaninterfacevlanswitch》enableswitch#configureterminalswitch(conf)#hostnameaptchaptech(conf)#interfacevlanaptech(conf-if)#ipaddress......配置交换机端口ip和子网掩码aptech(conf-if)#noshut是配置处于运行中aptech(conf-if)#exitaptech(conf)#ipdefault-gateway..设置网关地址:进入交换机某一端口interfacefasteher/以端口为例switch》enableswitch#configureterminalswitch(conf)#hostnameaptchaptech(conf)#interfacefasteher/aptech(conf-if)#:查看命令showswitch》enableswitch#showversion察看系统中的所有版本信息showinterfacevlan查看交换机有关ip协议的配置信息showrunning-configure查看交换机当前起作用的配置信息showinterfacefastether/察看交换机接口具体配置和统计信息showmac-address-table查看mac地址表showmac-address-tableaging-time查看mac地址表自动老化时间:交换机恢复出厂默认恢复命令switch》enableswitch#erasestartup-configureswitch#reload:双工模式设置switch》enableswitch#configureterminalswitch(conf)#hostnameaptch-aptech(conf)#interfacefasteher/以端口为例aptech(conf-if)#duplexfull/half/auto有full,half,auto三个可选项:cdp相关命令switch》enableswitch#showcdp查看设备的cdp全局配置信息showcdpinterfacefastether/查看端口的cdp配置信息showcdptraffic查看有关cdp包的统计信息showcdpnerghbors列出与设备相连的cisco设备:csico的密码恢复拔下交换机电源线。用手按着交换机的MODE键,插上电源线在switch:后执行flash_ini命令:switch:flash_ini查看flash中的文件:switch:dirflash:把“config.text”文件改名为“config.old”:switch:renameflash:config.textflash:config.old执行boot:switch:boot交换机进入是否进入配置的对话,执行no:进入特权模式察看flash里的文件:showflash:把“config.old”文件改名为“config.text”:switch:renameflash:config.oldflash:config.text把“config.text”拷入系统的“running-configure”:copyflash:config.textsystem:running-configure把配置模式重新设置密码存盘,密码恢复成功。:交换机tel远程登录设置:switch》enswitch#configureterminalswitch(conf)#hostnameaptech-aptech(conf)#enablepasswordcisco以cisco为特权模式密码aptech(conf)#interfacefastether/以端口为tel远程登录端口aptech(conf-if)#ipaddress......aptech(conf-if)#noshutaptech(conf-if)#exitaptech(conf)linevty设置-个用户可以tel远程登陆aptech(conf-line)#loginaptech(conf-line)#passwordedge以edge为远程登录的用户密码主机设置:ip...主机的ip必须和交换机端口的地址在同一网络段mask...gate-way...网关地址是交换机端口地址运行:tel...进入tel远程登录界面password:edgeaptech》enpassword:ciscoaptech#:交换机配置的重新载入和保存设置完成交换机的配置后:aptech(conf)#reload是否保存(y/ny:保存设置信息n:不保存设置信息路由器命令router》用户模式:进入特权模式enablerouter》enablerouter#:进入全局配置模式configureterminalrouter》enablerouter#configureterminalrouter(conf)#:交换机命名hostnameroutera以routerA为例router》enablerouter#configureterminalrouter(conf)#hostnamerouterAroutera(conf)#:配置使能口令enablepasswordcisco以cisco为例router》enablerouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#enablepasswordcisco:配置使能密码enablesecretciscolab以cicsolab为例router》enablerouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#enablesecretciscolab:进入路由器某一端口interfacefasteher/以端口为例router》enablerouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#interfacefasteher/routerA(conf-if)#进入路由器的某一子端口interfacefastether/.以端口的子端口为例router》enablerouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#interfacefasteher/.:设置端口ip地址信息router》enablerouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#interfacefasteher/以端口为例routerA(conf-if)#ipaddress......配置交换机端口ip和子网掩码routerA(conf-if)#noshut是配置处于运行中routerA(conf-if)#exit:查看命令showrouter》enablerouter#showversion察看系统中的所有版本信息showinterfacevlan查看交换机有关ip协议的配置信息showrunning-configure查看交换机当前起作用的配置信息showinterfacefastether/察看交换机接口具体配置和统计信息showmac-address-table查看mac地址表showmac-address-tableaging-time查看mac地址表自动老化时间showcontrollersserial+编号查看串口类型showiprouter查看路由器的路由表:cdp相关命令router》enablerouter#showcdp查看设备的cdp全局配置信息showcdpinterfacefastether/查看端口的cdp配置信息showcdptraffic查看有关cdp包的统计信息showcdpnerghbors列出与设备相连的cisco设备:csico的密码恢复重新启动路由器,在启动过程中按下win+break键,使路由器进入rommonitor在提示符下输入命令修改配置寄存器的值,然后重新启动路由器remmon》confregxremmon》reset重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变把startup-config中配置保存到running-config中,然后重新设置enable密码,并把配置寄存器改回x:router》enablerouter#copystartup-configrunning-configrouter#configureterminalrouter(conf)#enablepasswordciscorouter(conf)#config-registerx保存当前配置到startup-config,重新启动路由器。router#copyrunning-configstartup-configrouter#reload:路由器tel远程登录设置:router》enrouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#enablepasswordcisco以cisco为特权模式密码routerA(conf)#interfacefastether/以端口为tel远程登录端口routerA(conf-if)#ipaddress......routerA(conf-if)#noshutrouterA(conf-if)#exitrouterA(conf)linevty设置-个用户可以tel远程登陆routerA(conf-line)#loginrouterA(conf-line)#passwordedge以edge为远程登录的用户密码主机设置:ip...主机的ip必须和交换机端口的地址在同一网络段mask...gate-way...网关地址是交换机端口地址运行:tel...进入tel远程登录界面password:edgeroutera》enpassword:ciscoroutera#:配置路由器的标识banner$……………$在全局配置的模式下利用“banner”命令可以配置路由器的提示信息,所有连接到路由器的终端都会收到。router》enrouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#bannermotd$Thisisaptechpany’router!Pleasedon’tchangetheconfigurationwithoutpermission!$:配置接口标识description………接口标识用于区分路由器的各个接口。router》enrouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#interfacefastether/以/接口为例routerA(conf-if)#descriptionthisisafastEtherportusedtoconnectingthepany’sintra!:配置超时超时适用于设置在多长时间没有对console进行配置,自动返回exec会话时间。默认为分钟。router》enrouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#lineconsolerouterA(conf-if)#exec-timeout第一个“”分钟,第二个“”秒:配置串口参数两台路由器通过串口连接需要一个做为DTE,一个做为DCE。DCE设备要向DTE设备提供时钟频率和带宽。DCE配置:router》enrouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#interfaceserial/routerA(conf_if)#clockrate提供时钟频率为routerA(conf_if)#bandwidth提供带宽为DTE配置:路由器串口配置ip地址router》enrouter#configureterminalrouter(conf)#hostnamerouterBrouterB(conf)#interfaceserial/routerB(conf_if)#ipaddress......:静态路由的配置配置路由器A的主机名和接口参数router》enablerouter#configureterminalrouter(conf)#hostnamerouterArouterA(conf)#interfacefastether/路由器A的端口为两路由器的连接端口routerA(conf-if)#ipaddress......routerA(conf-if)#noshutdownrouterA(conf-if)#exitrouterA(conf)#interfacefastether/路由器A的端口为与主机的连接端口routerA(conf-if)#ipaddress......routerA(conf-if)#noshutdown主机A的ip地址为.........配置路由器B的主机名和接口参数router》enablerouter#configureterminalrouter(conf)#hostnamerouterBrouterB(conf)#interfacefastether/路由器B的端口为两路由器的连接端口routerB(conf-if)#ipaddress......routerB(conf-if)#noshutdownrouterB(conf-if)#exitrouterB(conf)#interfacefastether/路由器B的端口为与主机的连接端口routerB(conf-if)#ipaddress......主机B的ip地址为.........配置路由器A的静态路由表routerA(conf)#iprouter.........配置路由器B的静态路由表routerA(conf)#iprouter.........在routerA和routerB上配置默认路由routerA(conf)#iproute.........routerA(conf)#ipclasslessrouterB(conf)#iproute.........routerB(conf)#ipclassless在routerA和routerB上配置动态路由(RIP)routerA(conf)#routerriprouterA(conf)#work...routerA(conf)#work...routerB(conf)#routerriprouterB(conf)#work...routerB(conf)#work...

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

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

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

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

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

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

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

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

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

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

  ⒅你本机要接到交换机,记得交换机配置管理IP地址:...;

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

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

  ⒈本地安装CDaemon软件,带有TFTP功能的软件均可,配置好downloadpath,否则报错;

  ⒉TFTP使用端口,最好关闭防火墙软件,网络放行端口

  ⒊这样我们就可以开始了:

  ⒋JN-SW#copyrunning-configtftp#这里是copy正在运行的配置到本地

  ⒌Addressornameofremotehost?...#本地的IP地址

  ⒍Destinationfilename?#这里默认即可

  ⒎bytescopiedin.secs(bytes/sec)#有感叹号和这个时间提示,就表示成功了

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

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

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

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

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

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

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

  ⒖交换机访问控制安全配置

  ⒗对交换机特权模式设置密码尽量采用加密和mdhash方式

  ⒘switch(config)#enablesecretpass_string

  ⒙其中SpecifiesanUNENCRYPTEDpasswordwillfollow

  ⒚SpecifiesanENCRYPTEDsecretwillfollow

  ⒛建议不要采用enablepasswordpass_sting密码,破解及其容易!

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

  switch(config)#servicepassword-encryption

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

  switch(config)#enablesecretlevelpass_string/级用户进入特权模式的密码

  switch(config)#enablesecretpass_string/级用户进入特权模式的密码

  switch(config)#usernameuserAprivilegesecretpass_userA

  switch(config)#usernameuserBprivilegesecretpass_userB

  /为级,级用户设置用户名和密码,Ciscoprivilegelevel分为-级,级别越高权限越大

  switch(config)#privilegeexeclevelmands

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

  本地console口访问安全配置

  switch(config)#lineconsole

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

  switch(config-line)#loggingsynchronous

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

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

  switch(config-line)#passwordpass_sting/设置加密密码

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

  方式():本地AAA认证

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

  switch(config)#aaaauthenticationloginconsole-ingroupacsserverlocal

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

  switch(config)#lineconsole

  switch(config-line)#loginauthenticationconsole-in

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

  远程vty访问控制安全配置

  switch(config)#aess-listpermithostx.x.x.x

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

  switch(config)#aaaauthenticationloginvty-ingroupacsserverlocal

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

  switch(config)#aaaauthorizationmandsvty-ingroupacsserverlocal

  if-authenticated

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

  switch(config)#aaaauthorizationmandsvty-ingroupacsserverlocal

  if-authenticated

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

  switch(config)#linevty

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

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

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

  switch(config-line)#authorizationmandsvty-in

  switch(config-line)#loggingsynchronous

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

  switch(config-line)#loginauthenticationvty-in

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

  switch(config-line)#transportinputssh

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

  switch(config)#aaagroupservertacacs+acsserver/设置AAA服务器组名

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

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

  switch(config-sg-tacacs+)#exit

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

  交换机网络服务安全配置

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

  switch(config)#noservicepad

  switch(config)#noservicefinger

  switch(config)#noservicetcp-small-servers

  switch(config)#noserviceudp-small-servers

  switch(config)#noserviceconfig

  switch(config)#noserviceftp

  switch(config)#noip

  switch(config-if)#spanning-treebpdufilterenable

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

  switch(config-if)#spanning-treebpduguardenable

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

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

  广播、组播风暴控制设定

  switch(config-if)#storm-controlbroadcastlevel/设定广播的阀值为%

  switch(config-if)#storm-controlmulticastlevel/设定组播的阀值为%

  switch(config-if)#storm-controlactionshutdown/Shutdownthisinterface

  ifastormours

  orswitch(config-if)#storm-controlactiontrap/SendSNMPtrapifastorm

您可能感兴趣的文章:

相关文章