CISCO配置命令大全
Cisco命令大全
![Cisco命令大全](https://img.taocdn.com/s3/m/0c5734e9998fcc22bcd10d7d.png)
Cisco命令大全switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,使用命令"line+接口类型+接口号" 注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。
思科路由器命令大全(完整版)
![思科路由器命令大全(完整版)](https://img.taocdn.com/s3/m/52315853a88271fe910ef12d2af90242a895ab26.png)
思科路由器命令大全(完整版)思科路由器命令大全(完整版)本文档旨在提供思科路由器命令的详细说明和使用指南,包括路由器配置、网络管理、安全性设置等内容。
每个章节都详细介绍了不同的命令和参数,以帮助用户更好地理解和使用思科路由器。
1:路由器基本配置1.1 主机名设置1.2 用户名和密码设置1.3 IP 地址和子网掩码配置1.4 默认网关配置2:接口配置2.1 以太网接口配置2.2 串行接口配置2.3 子接口配置2.4 虚拟局域网 (VLAN) 配置3:路由协议配置3.1 静态路由配置3.2 动态路由配置3.2.1 RIP 配置3.2.2 OSPF 配置3.2.3 BGP 配置4:网络管理4.1 SNMP 配置4.2 NetFlow 配置4.3 Syslog 配置4.4 路由器时间设置5:安全性配置5.1 访问控制列表 (ACL) 配置5.2 VPN 配置5.3 防火墙配置5.4 AAA 配置附件:本文档附带的附件包括示例配置文件、命令输出示例等,以帮助读者更好地理解和应用文档中的内容。
法律名词及注释:本文档所涉及的法律名词及其注释如下:1:主机名:指路由器的主机标识名称,用于在网络中识别路由器。
2:用户名和密码:用于登录和管理路由器的凭证信息。
3: IP 地址:网络协议中用于唯一标识设备的数字地址。
4:子网掩码:用于标识 IP 地址中网络部分和主机部分的分界线。
5:默认网关:用于转发网络流量的下一跳路由器。
6:以太网接口:用于连接局域网设备的物理接口。
7:串行接口:用于连接广域网设备的物理接口。
8:子接口:在一个物理接口上创建多个逻辑接口,用于实现VLAN 分隔等功能。
9:虚拟局域网 (VLAN):用于将局域网划分成多个逻辑网络的技术。
10:静态路由:手动配置的路由表项,用于指定数据包传输的路径。
11:动态路由:根据路由协议动态学习和更新的路由表项,用于自动路由选择。
12: RIP:路由信息协议,一种距离向量路由协议。
Cisco配置命令大全
![Cisco配置命令大全](https://img.taocdn.com/s3/m/930d896d767f5acfa1c7cd3a.png)
Cisco配置命令大全1. switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"configt"全局配置模式----接口模式,使用命令"interface+接口类型+接口号"全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息 + # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configureterminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} |{port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。
思科交换机路由基本配置命令
![思科交换机路由基本配置命令](https://img.taocdn.com/s3/m/d631781f66ec102de2bd960590c69ec3d5bbdbc6.png)
思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。
下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。
干货!思科网络设备配置命令大全
![干货!思科网络设备配置命令大全](https://img.taocdn.com/s3/m/caf50030854769eae009581b6bd97f192279bf32.png)
干货!思科网络设备配置命令大全础配置1思科设备管理基础命令enable 从用户模式进入特权模式configure terminal 进入配置模式interface g0/0进入千兆以太网接口g0/0ip address 172.16.0.1 255.255.0.0配置接口的 ip 地址no shutdown 开启接口line vty 0 4进入虚拟终端 vty 0 - vty 4password 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 设置用户登录路由器时的提示信show ip int brief 查看接口状态2VLAN相关命令vlan X 创建VLAN Xname SPOTO 将VLAN X命名为SPOTOexit 退出当前模式interface e0/0 进入以太网接口e0/0switchport mode access 将二层接口设置为接入模式switchport access vlan X 将接口划入vlan Xinterface e0/1switchport trunk encapsulation dot1q trunk链路封装协议为 802.1qswitchport mode trunk 将二层接口配置模式为 trunkswitchport trunk allow vlan X trunk接口单独放行某个 vlan。
cisco思科命令大全
![cisco思科命令大全](https://img.taocdn.com/s3/m/d7f6edeb551810a6f52486ff.png)
思科命令大全思科常用命令大权1用户模式2:特权模式enableshow vlanshow versionshow interfaceshow mac-address-tableshow running-configcopy running-config startup-config3:全局配置模式config terminalhostnameenable passwordip default-gateway4:接口配置模式interface 端口switchport mode trunk5:line模式line console 0第2章交换机的基本配置1.配置主机hostname2.查看交换机的配置show running-config使能口令enable password加密保存的使能口令enable secret配置IP地址interface vlan1ip addressno shutdown配置交换机的网关ip default-gateway ipaddress查看交换机的MAC地址表show mac-address-table使用CDP协议show cdpshow cdp interfaceshow cdp neighborsshow cdp neighbors detailshow cdp traffic保存与删除交换机配置copy running-config startup-config第三章:虚拟局域网(VLAN)VLAN的概述VLAN是对连接在第2层交换机端口的网络用户的逻辑分段。
VLAN的作用:1。
广播控制2。
安全(副产品)3。
带宽利用4。
延迟VLAN的种类静态:基于端口的VLAN动态:基于MAC地址的VLAN在交换机上配置静态VLAN创建VLAN1。
CONFIG TERMINALVLAN 2NAME 22。
特权模式下VLAN DATABASEVLAN 2 NAME 2查看VLANSHOW VLAN删除VLANNO VLAN 2验证:SHOW VLAN BRIEF在VLAN中添加端口INTERFACE F0/2INTERFACE RANGE F0/2 - 5SWITCHPORT MODE ACCESSSWITCHPORT ACCESS VLAN 2VLAN配置实例在交换机上添加VLAN2,VLAN3,VLAN3,端口范围分别为1-4,5-8,9-12这个实例的作用就是让不同的VLAN的计算机之间的通信隔开。
cisco命令大全
![cisco命令大全](https://img.taocdn.com/s3/m/1217edec172ded630b1cb6dd.png)
思科命令复习路由器配置视图模式介绍:普通视图 router>特权视图 router# /在普通模式下输入enable全局视图 router(config)# /在特权模式下输入config t接口视图 router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称1、基本配置:router>enable /进入特权模式router#conf t /进入全局配置模式router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字router(config)#enable password xxx /设置特权口令router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密router(config)#line vty 0 4 /进入设置telnet服务模式router(config-line)#password xxx /设置telnet的密码router(config-line)#login /使能可以登陆router(config)#line con 0 /进入控制口的服务模式router(config-line)#password xxx /要设置console的密码router(config-line)#login /使能可以登陆2、接口配置:router(config)#int s0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口)router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca frrouter(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口3、一般的常用命令router(config-if)#exitrouter(config)#router(config-router)#exitrouter(config)#router(config-line)#exitrouter(config)#router(config)#exitrouter#exit命令 /从接口、协议、line等视图模式下退回到全局配置模式,或从全局配置模式退回到特权模式router(config-if)#endrouter(config-router)#endrouter(config-line)#endrouter#end命令 /从任何视图直接回到特权模式router#Logout /退出当前路由器登陆模式相对与windows的注销router#reload /重新启动路由器(热启动)冷启动就是关闭路由器再打开电源开关特权模式下:router#show ip route /查看当前的路由表router#clear ip route * /清楚当前的路由表router#show protocols /显示出所有的被动路由协议和接口上哪些协议被设置router#show ip protocol /查看当前路由器运行的动态路由协议情况router#show ip int brief /查看当前的路由器的接口ip地址启用情况router#show running-config /查看当前运行配置router#show startup-config /查看启动配置router#debug ip +协议 /动态查看路由更新信息router#undebug all /闭所有DEBUG信息router#debug ip pack /打开ip报文的调试router#terminal monitor /输出到终端上显示调试信息router#Show interfaces /显示设置在路由器和访问服务器上所有接口的统计信息. 显示路由器上配置的所有接口的状态router#Show interfaces serial /显示关于一个串口的信息router#Show ip interface /列出一个接口的IP信息和状态的小结, 列出接口的状态和全局参数4、路由配置:(1)静态路由router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx xxx/目标网络和掩码还有下一跳地址router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由(2)动态路由rip协议router(config)#router rip /启动rip协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#version 2 转换为rip 2版本,默认是rip 1版本router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口router(config-router)# neighbor xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接ipigrp协议router(config)#router igrp xxx /启动igrp协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡eigrp协议router(config)router eigrp xxx /启动协议router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡router(config-router)#no auto-summary /关闭自动汇总功能router#Show ip eigrp int /查看哪个接口宣告进了EIGRProuter(config-router)#timers active-time 4 /改变或关闭缺省的3min的活动状态计时router#Show ip eigrp nei /查看邻居表router#Show ip eigrp topology /查看拓扑表router#Show ip eigrp topology all-links /查看不是可行后继router#show ip eigrp traffic /查看发送包数量router(config-if)#ip summary-address eigrp 1 192.168.0.0 255.255.240.0 /接口下汇总EIGRP认证:router (config)#key chain ccie /配置密钥的名字router (config-keychain)#key 1 /密钥序列号router (config-keychain-key)#key-string abc /密码router (config)#int s0/0router (config-if)#ip authentication mode eigrp 1 md5 /接口使用md5加密router (config-if)#ip authentication key-chain eigrp 1 ccie /接口调用密钥router (config-keychain-key)#send-lifetime 00:00:00 1 mar 2012 00:00:00 3 mar 2012 /配置密钥的生存时间router (config-router)Paaive-interface s0/1 /被动接口的配置ospf协议router(config)router ospf xxx /启动协议启动一个OSPF协议进程router(config-router)network xxx.xxx.xxx.xxx area xxx /宣告自己的接口或网段在ospf的区域中可以把不同接口宣告在不同区域中router(config-router)router-id xxx.xxx.xxx.xxx /配置路由的idrouter(config-router)aera xxx stub /配置xxx区域为末梢区域加入这个区域的路由器全部要配置这个条命令router(config-router)aera xxx stub no-summary /配置xxx区域为完全末梢区域只在ABR上配置router(config-router)aera xxx nssa /配置xxx区域为非纯末梢区域加入这个区域的路由器全部要配置这个条命令router(config-router)aera xxx nssa no-summary /配置xxx区域为完全非纯末梢区域只在ABR上配置,并发布缺省路由信息进入这个区域内的路由器router #show ip ospf interface /查看哪些接口被宣告进OSPF进程router #show ip ospf int brief /查看接口运行OSPF的简要信息router #show ip ospf neighbor /查看OSPF的邻居表router #show ip protocol /查OSPF配置信息router #show ip ospf /查看完整的OSPF信息router #show ip database /查看OSPF数据库router (config-router)#maximum-paths /修改OSPF的负载均衡条数router (config-router)#Area 1 range 192.168.10.0 255.255.255.0 /区域间的路由汇总router (config-router)#summary-address 192.168.10.0 255.255.255.0 /外部路由汇总router #show run | b router ospf /查看OSPF配置router (config-router)#area 1 default-cost 10 /为BR路由器发送到一个末梢区域的缺省路由指定一个代价值router#clear ip ospf process /清楚当前路由器ospf协议的进程OSPF加密:router (config-if)#ip ospf authentication-key ccnp /接口下配置明文密钥router (config-router)#area 0 authentication /协议下调用明文密钥router (config-if)#ip ospf message-digest-key 1 md5 ccnp /接口下配置MD5密钥router (config-router)#area 0 authentication message-digest /协议下调用MD5密钥5、保存当前修改/运行的配置:router#write /将RAM中的当前配置存储到NVRAM中,下次路由器启动就是执行保存的配置router#Copy running-config startup-config /命令与write效果一样6 ACL配置router(config)#access-list (1~99)(deny/permit)(源地址)(反掩码)(log) /标准访问列表router(config)#access-list (100~199)(deny/permit)(协议)(源地址)(反掩码)(目的地址)(反掩码)(端口号)(log) / 扩展访问列表router(config)#ip access-list {standard | extended(扩展)} ( name ) 命名访问列表router#access-enable /允许路由器在动态访问列表中创建临时访问列表入口router (config-if)#ip access-group xxx /把访问控制列表(ACL)应用到接口上router (config-line)#access-class xxx {in/out} / VTY上调用ACLrouter#show ip access-list /查看aclrouter (config)#access-list / 定义一个标准的IP ACL交换机配置1、基本配置:Switch >enable /进入特权模式Switch#conf t /进入全局配置模式Switch (conf-if)#duplex full/half/auto /有full , half, auto 三个可选switch# erase startup-configure / 恢复出场配置switch# reload / 重启交换机远程登录和con口还有接口配置和路由器配置命令一样,不再下面总结。
CISCO交换机配置命令大全
![CISCO交换机配置命令大全](https://img.taocdn.com/s3/m/8dd370d4b14e852458fb5704.png)
CISCO交换机配置命令大全1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:A TM (config)# interface atm number.subint multiointA TM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:A TM(config)# lane database database-nameA TM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressA TM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressA TM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:A TM(config)# interface atm numberA TM(config-if)# lane config database database-nameA TM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的A TM子接口上.命令如下:A TM(config)# interface atm number.subint multipointA TM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
Cisco(思科)交换机配置命令
![Cisco(思科)交换机配置命令](https://img.taocdn.com/s3/m/9e3c4063ddccda38376baf26.png)
Cisco(思科)交换机配置命令1. 交换机支持的命令:交换机基本状态: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 ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(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 1switch(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 ;查看指定端口信息补充:3层交换机多出的就是路由能力,体现在vlan的互相通信功能和端口的路由能力,下面介绍:开启路由功能:ip routing进入vlan 配置网段网关与路由配置接口相同interface vlan 1ip 192.168.1.1 255.255.255.0路由配置与路由器配置相同只是把接口换为VLAN+VLAN号,开启接口路由功能,进入接口配置:no swichport。
思科路由器配置命令大全
![思科路由器配置命令大全](https://img.taocdn.com/s3/m/a2b262274b35eefdc8d33363.png)
思科路由器常用配置命令一览表:1、Exec commands:<1-99> 恢复一个会话bfe 手工应急模式设置clear 复位功能clock 管理系统时钟configure 进入设置模式connect 打开一个终端copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug 调试功能disable 退出优先命令状态disconnect 断开一个网络连接enable 进入优先命令状态erase 擦除快闪内存exit 退出exce模式help 交互帮助系统的描述lat 打开一个本地传输连接lock 锁定终端login 以一个用户名登录logout 退出终端mbranch 向树形下端分支跟踪多路由广播mrbranch 向树形上端分支跟踪反向多路由广播name-connection 给一个存在的网络连接命名no 关闭调试功能pad 打开X.29 PAD连接ping 发送回显信息ppp 开始点到点的连接协议reload 停机并执行冷启动resume 恢复一个活动的网络连接rlogin 打开远程注册连接rsh 执行一个远端命令send 发送信息到另外的终端行setup 运行setup命令show 显示正在运行系统信息slip 开始SLIP协议start-chat 在命令行上执行对话描述systat 显示终端行的信息telnet 远程登录terminal 终端行参数test 测试子系统内存和端口tn3270 打开一个tin3270连接trace 跟踪路由到目的地undebug 退出调试功能verify 验证检查闪烁文件的总数where 显示活动的连接which-route 执行OSI路由表查找并显示结果write 把正在运行的设置写入内存、网络、或终端x3 在PAD上设置X.3参数xremote 进入xremote模式2、#show ?access-expression 显示访问控制表达式access-lists 显示访问控制表apollo Apollo 网络信息appletalk Apple Talk 信息arap 显示Appletalk 远端通道统计arp 地址解析协议表async 访问路由接口的终端行上的信息bridge 前向网络数据库buffers 缓冲池统计clns CLNS网络信息clock 显示系统时钟cmns 连接模式网络服务信息compress 显示压缩状态configuration 非易失性内存的内容controllers 端口控制状态debugging 调试选项状态decnet DEC网络信息dialer 拨号参数和统计dnsix 显示Dnsix/DMPP信息entry 排队终端入口extended 扩展端口信息flash 系统闪烁信息flh-log 闪烁装载帮助日志缓冲区frame-relay 帧中继信息history 显示对话层历史命令hosts IP域名,查找方式,名字服务,主机表interfaces 端口状态和设置ip IP信息ipx Novell IPX信息isis IS-IS路由信息keymap 终端键盘映射lat DEC LAT信息line 终端行信息llc2 IBM LLC2 环路信息lnm IBM 局网管理local-ack 本地认知虚环路memory 内存统计netbios-cache NetBios命名缓冲存贮器内存node 显示已知LAT节点ntp 网络时间协议processes 活动进程统计protocols 活动网络路由协议queue 显示队列内容queueing 显示队列设置registry 功能注册信息rhosts 远程主机文件rif RIF存贮器入口route-map 路由器信息sdlle 显示sdlc-llc2转换信息services 已知LAT服务sessions 远程连接信息smds SMDS信息source-bridge 源网桥参数和统计spanning-tree 跨越树形拓朴stacks 进程堆栈应用standby 热支持协议信息stun STUN状态和设置subsystem 显示子系统tcp TCP连接状态terminal 显示终端设置tn3270 TN3270 设置translate 协议转换信息ttycap 终端容易表users 显示终端行的信息version 系统硬、软件状态vines VINES信息whoami 当前终端行信息x25 X.25信息xns XNS信息xermote Xremote统计3、#config ?Memory 从非易失性内存设置Network 从TFTP网络主机设置Overwrite-network 从TFTP网络主机设置覆盖非易失性内存Terminal 从终端设置4、Configure commads:Access-list 增加一个访问控制域Apollo Apollo全局设置命令appletalk Appletalk 全局设置命令arap Appletalk远程进出协议arp 设置一个静态ARP入口async-bootp 修改系统启动参数autonomous-system 本地所拥有的特殊自治系统成员banner 定义注册显示信息boot 修改系统启动时参数bridge 透明网桥buffers 调整系统缓冲池参数busy-message 定义当连接主机失败时显示信息chat-script 定义一个调制解调器对话文本clns 全局CLNS设置子命令clock 设置时间时钟config-register 定义设置寄存器decnet 全局DEC网络设置子命令default-value 缺省字符位值dialer-list 创建一个拨号清单入口dnsix-nat 为审计提供DMDM服务enable 修改优先命令口令end 从设置模式退出exit 从设置模式退出frame-relay 全局帧中继设置命令help 交互帮助系统的描述hostname 设置系统网络名iterface 选择设置的端口ip 全局地址设置子命令ipx Novell/IPX全局设置命令keymap 定义一个新的键盘映射lat DEC本地传输协议line 设置终端行lnm IBM局网管理locaddr-priority-list 在LU地址上建立优先队列logging 修改注册(设备)信息login-string 定义主机指定的注册字符串map-class 设置静态表类map-list 设置静态表清单menu 定义用户接口菜单mop 设置DEC MOP服务器netbios NETBIOS通道控制过滤no 否定一个命令或改为缺省设置ntp 设置NTPpriority-list 建立特权列表prompt 设置系统提示符queue-list 建立常规队列列表rcmd 远程命令设置命令rcp-enable 打开Rep服务rif 源路由进程router-map 建立路由表或进入路由表命令模式router 打开一个路由进程rsh-enable 打开一个RSH服务sap-priority-list 在SAP或MAC地址上建立一个优先队列service 修改网络基本服务snmp-server 修改SNMP参数state-machine 定义一个TCP分配状态的机器stun STUN全局设置命令tacacs-server 修改TACACS队列参数terminal-queue 终端队列命令tftp-server 为网络装载请求提供TFTP服务tn3270 tn3270设置命令translate 解释全局设置命令username 建立一个用户名及其权限vines VINES全局设置命令x25 X.25 的第三级x29 X.29 命令xns XNS 全局设置命令xremote 设置Xremote5、(config)#ipGlobal IP configuration subcommands:Accounting-list 选择保存IP记帐信息的主机Accounting-threshold 设置记帐入口的最大数accounting-transits 设置通过入口的最大数alias TCP端口的IP地址取别名as-path BGP自治系统路径过滤cache-invalidate-delay 延迟IP路由存贮池的无效classless 跟随无类前向路由规则default-network 标志网络作为缺省网关候选default-gateway 指定缺省网(如果没有路由IP)domain-list 完成无资格主机的域名domain-lookup 打开IP域名服务系统主机转换domain-name 定义缺省域名forward-protocol 控制前向的、物理的、直接的IP广播host 为IP主机表增加一个入口host-routing 打开基于主机的路由(代理ARP和再定向)hp-host 打开HP代理探测服务mobile-host 移动主机数据库multicast-routing 打开前向IPname-server 指定所用名字服务器的地址ospf-name-lookup 把OSPF路由作为DNS名显示pim PIM 全局命令route 建立静态路由routing 打开IP路由security 指定系统安全信息source-route 根据源路由头的选择处理包subnet-zero 允许子网0子网tcp 全局TCP参数1. switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port- channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN 号或旧的来进行修改。
思科常用配置命令及参数
![思科常用配置命令及参数](https://img.taocdn.com/s3/m/095a65116d85ec3a87c24028915f804d2b1687d9.png)
思科常用配置命令及参数思科cisco公司制造的路由器、交换机和其他设备承载了全球80%的互联网通信,成为了网络应用的成功实践者之一,那么你知道思科常用配置命令及参数有哪些吗?下面是店铺整理的一些关于思科常用配置命令及参数的相关资料,供你参考。
思科常用配置命令及参数:启动接口,分配IP地址:router(config-if)# encapsulation frame-relay [cisco | ietf ]router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobitsrouter(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]<--配置静态Invers ARP表:router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ] --><--设置Keepalive间隔:router(config-if)# keepalive Number--><--为本地接口指定DLCI:router(config-if)# frame-lelay local-dlci Number--><--子接口配置:router(config-if)# interface Type Port.Subininterface-Number [ multipoint | point-to-point ]router(config-subif)# ip unnumbered Interfacerouter(config-subif)# frame-lelay local-dlci Number-->router(config-if)# ^z配置标准ACL:router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] <-- Access-List-Number 范围:1~99标准ACL;100~199扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL--> router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-Number [ in | out ]router(config-if)# ^z配置扩展ACL:router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-Number [ in | out ]router(config-if)# ^z配置命名ACL:router(config)# ip access-list [ standard | extended ] ACL-Namerouter(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-List-Test-Conditions ]router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Access-List-Test-Conditions ]router(config [ std- | ext- ] nacl)# ^zrouter(config)# interface Type Portrouter(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]router(config-if)# ^z配置DCE时钟:router# show controllers Type Port <--确定DCE接口-->router(confin-if)# clock rate 64000 <--进入DCE接口设置时钟速率-->router(config-if)# ^z配置PPP协议:router(config)# username Name password Set-Password-Here <--验证方建立数据库-->router(config)# interface Type Portrouter(config-if)# encapsulation ppp <--启动PPP协议-->router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <--选择PPP认证-->router(config-if)# ppp pap sent-username Name password Password <--发送验证信息-->router(config-if)# ^zPAP单向认证配置实例:验证方:router-server(config)# username Client password 12345 <--验证方建立数据库-->router-server(config)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication pap <--选择使用PAP实现PPP认证-->router-server(config-if)# ^z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp pap sent-username Client password 12345 <--发送验证信息-->router-client(config-if)# ^zPAP双向认证配置实例:路由器 A:routerA(config)# username B password 12345routerA(config)# interface serial 0routerA(config-if)# encapsulation ppprouterA(config-if)# ppp authentication paprouterA(config-if)# ppp pap sent-username A password 54321routerA(config-if)# ^z路由器 B:routerB(config)# username A password 54321routerB(config)# interface serial 1routerB(config-if)# encapsulation ppprouterB(config-if)# ppp authentication paprouterB(config-if)# ppp pap sent-username B password 12345routerB(config-if)# ^zCHAP单向认证配置实例:验证方:router-server(config)# username router-client password 12345router-server(config)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication chaprouter-server(config-if)# ^z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp authentication chaprouter-client(config-if)# ppp chap hostname router-clientrouter-client(config-if)# ppp chap password 12345router-client(config-if)# ^z。
CISCO配置命令大全
![CISCO配置命令大全](https://img.taocdn.com/s3/m/1a3a0210767f5acfa1c7cd8f.png)
CISCO配置命令大全路由器的基本配置1 .配置以太网(Ethernet)端口:# conf t从终端配置路由器。
# int e0指定E0口。
# ip addr ABCD XXXXABCD为以太网地址,XXXX为子网掩码。
# ip addr ABCD XXXX secondaryE0口同时支持两个地址类型。
如果第一个为A类地址,则第二个为B或C类地址。
# no shutdown激活E0口。
# exit2.X.25的配置# conf t# int S0指定S0口.# ip addr ABCD XXXXABCD为以太网S0的IP地址,XXXX为子网掩码.。
# encap X25-ABC封装X.25协议。
ABC指定X.25为DTC或DCE操作,缺省为DTE。
# x25 addr ABCDABCD为S0的X.25端口地址,由邮电局提供。
# x25 map ip ABCD XXXX br映射的X.25地址.ABCD为对方路由器(如:S0)的IP地址,XXXX为对方路由器(如:S0)的X.25端口地址。
# x25 htc X配置最高双向通道数.X的取值范围1-4095,要根据邮电局实际提供的数字配置。
# x25 nvc X配置虚电路数。
X不可超过据邮电局实际提供的数,否则,将影响数据的正常传输。
# exit---- 3 .专线的配置:# conf t# int S2指定S2口。
# ip addr ABCD XXXXABCD为S2的IP地址,XXXX为子网掩码。
# exit4.帧中继的配置# conf t# int s0# ip addr ABCD XXXXABCD为S0的IP地址,XXXX为子网掩码。
# encap frante_relay封装frante_relay协议。
# no nrzi_encodingNRZI=NO# frame_relay lmi_type q933aLMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。
思科路由器命令大全完整版
![思科路由器命令大全完整版](https://img.taocdn.com/s3/m/2a5b292a00f69e3143323968011ca300a6c3f6e9.png)
思科路由器命令大全完整版一、基本配置命令1、`enable`:进入特权模式。
2、`configure terminal`:进入全局配置模式。
3、`hostname 主机名`:设置路由器的主机名。
4、`interface 接口类型接口编号`:进入指定接口的配置模式,例如`interface ethernet 0/0`。
5、`ip address IP 地址子网掩码`:为接口配置 IP 地址和子网掩码。
6、`no shutdown`:启用接口。
二、路由配置命令1、`ip route 目标网络子网掩码下一跳地址`:添加静态路由。
2、`router ospf 进程号`:启用 OSPF 路由协议,并指定进程号。
3、`network 网络地址反掩码 area 区域号`:在 OSPF 中宣告网络。
三、访问控制列表(ACL)命令1、`accesslist 编号 permit|deny 源地址源掩码目的地址目的掩码协议端口`:创建访问控制列表规则。
2、`ip accessgroup 编号 in|out`:将访问控制列表应用到接口的入站或出站方向。
四、NAT 配置命令1、`ip nat inside source list 访问控制列表编号 interface 外部接口overload`:配置 PAT(端口地址转换)。
2、`interface 接口 ip nat inside`:指定接口为内部接口。
3、`interface 接口 ip nat outside`:指定接口为外部接口。
五、VLAN 配置命令1、`vlan VLAN 号`:创建 VLAN。
2、`name VLAN 名称`:为 VLAN 命名。
3、`interface vlan VLAN 号`:进入 VLAN 接口配置模式。
六、端口镜像命令1、`monitor session 会话号source interface 源接口`:指定源端口。
2、`monitor session 会话号 destination interface 目的接口`:指定目的端口。
CISCO交换机配置命令大全
![CISCO交换机配置命令大全](https://img.taocdn.com/s3/m/587c9d11f18583d04964594e.png)
CISCO交换机配置命令大全1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}]在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
Cisco路由器配置命令大全
![Cisco路由器配置命令大全](https://img.taocdn.com/s3/m/a8b63a2411a6f524ccbff121dd36a32d7375c7c8.png)
Cisco路由器配置命令大全本文档旨在提供一份最新最全的Cisco路由器配置命令范本,旨在帮助用户快速配置和管理Cisco路由器。
以下是具体的章节内容:⒈设置基本参数⑴主机名设置命令⑵控制台设置命令⑶用户密码设置命令⑷物理接口配置命令⒉配置IP网络⑴设置IP地质和子网掩码⑵配置静态路由⑶配置动态路由协议(如OSPF或EIGRP)⑷ ICMP设置命令⒊网络管理和监控⑴远程管理设置命令⑵ SNMP配置命令⑶日志记录命令⑷监控和排错命令⒋安全配置⑴访问控制列表(ACL)配置命令⑵ VPN配置命令⑶防火墙配置命令⑷加密和身份验证命令⒌功能扩展⑴ NAT配置命令⑵ QoS配置命令⑶ VLAN配置命令⑷ DHCP配置命令附件:本文档涉及附件,请参阅附件文件以获取更详细的配置示例和说明。
注释:⒈Cisco路由器:Cisco公司生产的用于网络互联的路由器设备。
⒉配置命令:指通过命令行界面输入的一系列指令,用于配置和管理Cisco路由器。
⒊IP地质:Internet协议地质,用于在网络中标识设备的唯一地质。
⒋子网掩码:用于确定IP地质中网络地质和主机地质的部分。
⒌静态路由:通过手动配置的路由信息,用于指定数据包的下一跳路径。
⒍动态路由协议:通过协议自动交换路由信息,动态更新路由表。
⒎OSPF:开放最短路径优先(Open Shortest Path First)协议,用于计算路径的最佳选择。
⒏EIGRP:增强型内部网关路由协议(Enhanced Interior Gateway Routing Protocol),Cisco公司开发的路由协议。
⒐ICMP:Internet控制报文协议,用于在IP网络中发送错误和控制消息。
⒑SNMP:简单网络管理协议,用于管理和监控网络设备。
1⒈ACL:访问控制列表,用于控制流经路由器的数据包的访问权限。
1⒉VPN:虚拟专用网络,通过加密和认证技术实现安全的远程连接。
1⒊防火墙:用于保护网络免受未经授权的访问和攻击的安全设备。
(完整)Cisco配置命令
![(完整)Cisco配置命令](https://img.taocdn.com/s3/m/d5fb0fc243323968001c9204.png)
switch〉用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch〉 enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch〉 enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192。
168.1。
1 255.255。
255.0 配置交换机端口ip和子网掩码aptech2950(conf—if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default—gateway 192。
CISCO配置命令大全
![CISCO配置命令大全](https://img.taocdn.com/s3/m/f4b6cf22dd36a32d73758109.png)
Access-enable允许路由器在动态访问列表中创建临时访问列表入口Access-group把访问控制列表(ACL)应用到接口上Access-list定义一个标准的IP ACLAccess-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中的当前配置存储到NVRAMCopy running-config tftp 将RAM中的当前配置存储到网络TFTP 服务器上Copy tftp flash 从TFTP服务器上下载新映像到FlashCopy 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 规定线路断开前的空闲时间的长度Dialer map 设置一个串行接口来呼叫一个或多个地点Dialer wait-for-carrier-time 规定花多长时间等待一个载体Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控制控制拨号Dir 显示给定设备上的文件Disable 关闭特许模式Disconnect 断开已建立的连接Enable 打开特许模式Enable password 确定一个密码以防止对路由器非授权的访问Enable password 设置本地口令控制不同特权级别的访问Enable secret 为enable password命令定义额外一层安全性(强制安全,密码非明文显示)Encapsulation frame-relay 启动帧中继封装Encapsulation novell-ether 规定在网络段上使用的Novell独一无二的格式Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco 的密码是sapEnd 退出配置模式Erase 删除闪存或配置缓存Erase startup-config 删除NVRAM中的内容Exec-timeout 配置EXEC命令解释器在检测到用户输入前所等待的时间Exit 退出所有配置模式或者关闭一个激活的终端会话和终止一个EXECExit 终止任何配置模式或关闭一个活动的对话和结束EXECformat 格式化设备Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)Help 获得交互式帮助系统History 查看历史记录Hostname 使用一个主机名来配置路由器,该主机名以提示符或者缺省文件名的方式使用Interface 设置接口类型并且输入接口配置模式Interface 配置接口类型和进入接口配置模式Interface serial 选择接口并且输入接口配置模式Ip access-group 控制对一个接口的访问Ip address 设定接口的网络逻辑地址Ip address 设置一个接口地址和子网掩码并开始IP处理Ip default-network 建立一条缺省路由Ip domain-lookup 允许路由器缺省使用DNSIp host 定义静态主机名到IP地址映射Ip name-server 指定至多6个进行名字-地址解析的服务器地址Ip route 建立一条静态路由Ip unnumbered 在为给一个接口分配一个明确的IP地址情况下,在串口上启动互联网协议(IP)的处理过程Ipx delay 设置点计数Ipx ipxwan 在串口上启动IPXWAN协议Ipx maximum-paths 当转发数据包时设置Cisco IOS软件使用的等价路径数量Ipx network 在一个特定接口上启动互联网数据包交换(IPX)的路由选择并且选择封装的类型(用帧封装)Ipx router 规定使用的路由选择协议Ipx routing 启动IPX路由选择Ipx sap-interval 在较慢的链路上设置较不频繁的SAP(业务广告协议)更新Ipx type-20-input-checks 限制对IPX20类数据包广播的传播的接受Isdn spid1 在路由器上规定已经由ISDN业务供应商为B1信道分配的业务简介号(SPID)Isdn spid2 在路由器上规定已经由ISDN业务供应商为B2信道分配的业务简介号(SPID)Isdntch-type 规定了在ISDN接口上的中央办公区的交换机的类型Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制Lat 打开LAT连接Line 确定一个特定的线路和开始线路配置Line concole 设置控制台端口线路Line vty 为远程控制台访问规定了一个虚拟终端Lock 锁住终端控制台Login 在终端会话登录过程中启动了密码检查Login 以某用户身份登录,登录时允许口令验证Logout 退出EXEC模式Mbranch 向下跟踪组播地址路由至终端Media-type 定义介质类型Metric holddown 把新的IGRP路由选择信息与正在使用的IGRP路由选择信息隔离一段时间Mrbranch 向上解析组播地址路由至枝端Mrinfo 从组播路由器上获取邻居和版本信息Mstat 对组播地址多次路由跟踪后显示统计数字Mtrace 由源向目标跟踪解析组播地址路径Name-connection 命名已存在的网络连接Ncia 开启/关闭NCIA服务器Network 把一个基于NIC的地址分配给一个与它直接相连的路由器把网络与一个IGRP的路由选择的过程联系起来在IPX路由器配置模式下,在网络上启动加强的IGRPNetwork 指定一个和路由器直接相连的网络地址段Network-number 对一个直接连接的网络进行规定No shutdown 打开一个关闭的接口Pad 开启一个X.29 PAD连接Permit 为一个已命名的IP ACL设置条件Ping 把ICMP响应请求的数据包发送网络上的另一个节点检查主机的可达性和网络的连通性对网络的基本连通性进行诊断Ping 发送回声请求,诊断基本的网络连通性Ppp 开始IETF点到点协议Ppp authentication 启动Challenge握手鉴权协议(CHAP)或者密码验证协议(PAP)或者将两者都启动,并且对在接口上选择的CHAP和PAP 验证的顺序进行规定Ppp chap hostname 当用CHAP进行身份验证时,创建一批好像是同一台主机的拨号路由器Ppp chap password 设置一个密码,该密码被发送到对路由器进行身份验证的主机命令对进入路由器的用户名/密码的数量进行了限制Ppp pap sent-username 对一个接口启动远程PAP支持,并且在PAP 对同等层请求数据包验证过程中使用sent-username和password Protocol 对一个IP路由选择协议进行定义,该协议可以是RIP,内部网关路由选择协议(IGRP),开放最短路径优先(OSPF),还可以是加强的IGRPPwd 显示当前设备名Reload 关闭并执行冷启动;重启操作系统Rlogin 打开一个活动的网络连接Router 由第一项定义的IP路由协议作为路由进程,例如:router rip 选择RIP作为路由协议Router igrp 启动一个IGRP的路由选择过程Router rip 选择RIP作为路由选择协议Rsh 执行一个远程命令Sdlc 发送SDLC测试帧Send在tty线路上发送消息Service password-encryption 对口令进行加密Setup 运行Setup命令Show 显示运行系统信息Show access-lists 显示当前所有ACL的内容Show buffers 显示缓存器统计信息Show cdp entry 显示CDP表中所列相邻设备的信息Show cdp interface 显示打开的CDP接口信息Show cdp neighbors 显示CDP查找进程的结果Show dialer 显示为DDR(数字数据接受器)设置的串行接口的一般诊断信息Show flash 显示闪存的布局和内容信息Show frame-relay lmi 显示关于本地管理接口(LMI)的统计信息Show frame-relay map 显示关于连接的当前映射入口和信息Show frame-relay pvc 显示关于帧中继接口的永久虚电路(pvc)的统计信息Show hosts 显示主机名和地址的缓存列表Show interfaces 显示设置在路由器和访问服务器上所有接口的统计信息Show interfaces 显示路由器上配置的所有接口的状态Show interfaces serial 显示关于一个串口的信息Show ip interface 列出一个接口的IP信息和状态的小结Show ip interface 列出接口的状态和全局参数Show ip protocols 显示活动路由协议进程的参数和当前状态Show ip route 显示路由选择表的当前状态Show ip router 显示IP路由表信息Show ipx interface 显示Cisco IOS软件设置的IPX接口的状态以及每个接口中的参数Show ipx route 显示IPX路由选择表的内容Show ipx servers 显示IPX服务器列表Show ipx traffic 显示数据包的数量和类型Show isdn active 显示当前呼叫的信息,包括被叫号码、建立连接前所花费的时间、在呼叫期间使用的自动化操作控制(AOC)收费单元以及是否在呼叫期间和呼叫结束时提供AOC信息Show isdn ststus 显示所有isdn接口的状态、或者一个特定的数字信号链路(DSL)的状态或者一个特定isdn接口的状态Show memory 显示路由器内存的大小,包括空闲内存的大小Show processes 显示路由器的进程Show protocols 显示设置的协议Show protocols 显示配置的协议。
Cisco路由器配置命令大全
![Cisco路由器配置命令大全](https://img.taocdn.com/s3/m/6ca908035627a5e9856a561252d380eb63942370.png)
Cisco路由器配置命令大全1.路由器基本配置1.1 主机名和域名配置1.2 版本和许可证配置1.3 密码和登陆设置1.4 接口配置1.5 接口描述1.6 IP地质配置2.路由配置2.1 静态路由配置2.2 默认路由配置2.3 动态路由配置(OSPF, EIGRP, RIP)2.4 路由过滤(ACL)3.VLAN配置3.1 VLAN的创建和删除3.2 VLAN接口和IP配置3.3 VLAN间的路由配置3.4 VLAN间的链路聚合4.交换机端口配置4.1 接口模式配置4.2 速率和双工模式配置 4.3 接口安全配置4.4 VLAN端口模式配置4.5 接口状态检查与调试5.NAT配置5.1 静态NAT配置5.2 动态NAT配置5.3 PAT配置5.4 NAT过载配置6.VPN配置6.1 VPN服务器配置6.2 VPN客户端配置6.3 IPsec配置6.4 SSL VPN配置7.安全配置7.1 防火墙配置7.2 ACL配置7.3 IDS/IPS配置7.4 AAA服务器配置7.5 网络攻击防护配置8.QoS配置8.1 ACL配置8.2 优先级配置8.3 带宽限制配置8.4 压缩和分片配置9.网络服务配置9.1 DHCP配置9.2 DNS配置9.3 NTP配置9.4 Syslog配置9.5 SNMP配置10.管理配置10.1 网络管理协议配置(Telnet, SSH, HTTP, HTTPS)10.2 文件传输配置(FTP, TFTP)10.3 配置备份和恢复10.4 日志记录和监控10.5 系统升级和恢复附件:本文档涉及的附件包括配置文件样例、示意图等。
法律名词及注释:- ACL: 访问控制列表,用于限制网络流量的过滤规则。
- NAT: 网络地质转换,用于实现内网IP地质与外网IP地质之间的映射。
- VPN: 虚拟专用网络,通过加密通道实现远程访问和安全通信。
- QoS: 服务质量,用于优化网络性能并保证特定应用程序的带宽和延迟要求。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
CISCO配置命令大全
路由器的基本配置
1.配置以太网(Ethernet)端口:ﻫ# conf t ﻫ从终端配置路由器。
ﻫ#int e0ﻫ指定E0口。
ﻫ# ip addrABCD XXXX ﻫABCD为以太网地址,XXXX为子网掩码。
#ip addrABCD XXXXsecondary ﻫE0口同时支持两个地址类型。
如果第一个
为A类地址,则第二个为B或C类地址。
ﻫ# no shutdownﻫ激活E0口。
# exit
2.X.25的配置ﻫ# conftﻫ#int S0 ﻫ指定S0口.
#ipaddrABCD XXXX ﻫABCD为以太网S0的IP地址,XXXX为子网掩码.。
#encapX25-ABC
封装X.25协议。
ABC指定X.25为DTC或DCE操作,缺省为DTE。
ﻫ# x25addr ABCD ﻫABCD为S0的X.25端口地址,由邮电局提供。
ﻫ# x25 map ip ABCD XXXX br ﻫ映射的X.25地址.ABCD 为对方路由器(如:S0)的ﻫIP地址,XXXX为对方路由器(如:S0)的X.25端口地址。
# x25 htcX
配置最高双向通道数.X的取值范围1-4095,
要根据邮电局实际提供的数字配置。
# x25 nvc X ﻫ配置虚电路数。
X不可超过据邮电局实际
提供的数,否则,将影响数据的正常传输。
#exit ﻫ---- 3 .专线的配置:
# conf tﻫ# int S2ﻫ指定S2口。
# ip addr ABCD XXXX
ABCD为S2的IP地址,XXXX为子网掩码。
ﻫ# exitﻫ4.帧中继的配置
#conft
#ints0 ﻫ# ip addr ABCD XXXX
ABCD为S0的IP地址,XXXX为子网掩码。
ﻫ#encapfrante_relayﻫ封装frante_relay协议。
# no nrzi_encoding
NRZI=NO
#frame_relay lmi_type q933a ﻫLMI使用Q933A标准.LMI(LocalmanagementInterface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。
#fram-relay intf-typABC
ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。
ﻫ# frame_relay interface_dlci 110 br
配置DLCI(数据链路连接标识符)。
# frame-relay mapip ABCDXXXX broadcast
建立帧中继映射。
ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。
ﻫ# no shutdown
激活本端口.
# exit
---- 5. 帧中继子接口的配置: ﻫ#conft ﻫ#int s0.1 point-to-point
对应S0的子接口1,点对点方式。
# ip addr ABCD XXXX
ABCD为子口1的IP地址,XXXX为子网掩码。
ﻫ# frame-relay intreface-dlci 100 br ﻫ 6.配置拨号备份ﻫ(1).配置备份主口ﻫ#conf t ﻫ#int s0ﻫS0为主口.ﻫ# backup int asy1
A1口为备份口.
# backupdelay 0 1 ﻫ延时1秒.
(2).配置虚拟接口ﻫ#conft
#ip addr ABCD XXXX
ABCD为虚拟接口IP地址,XXXX为子网掩码。
# encap pppﻫ封装ppp协议.
# dialerin-band
激活随叫随拨功能.
#dialer idle-timeout7200
# dialer map ip ABCD modem-script callbroadcast 6225481br 映射对应的拨号口.ﻫABCD为对方拨号口的ip地址,6225481为对应的电话号码。
# dialer_group1定义拨号组成员.
(3).配置防火墙
#dialer_list1 pro ip permit
允许ip协议通过。
ﻫ(4).配置连接口令
# user nameABCD pass XXXX ﻫABCD为对方主机名,XXXX为连接口令. ﻫ(5).配置拨号字符串ﻫ# conf tﻫ#chat-script call ABORT BUSYABORT ERROR"" atdt6335481TIMEOUT 45"CONNECT"
6335481为对方电话号码。
(6).配置拨号连接密码ﻫ#conf t ﻫ#username ROU1 passXXXX ﻫROU1为对方路由器名,X XXX为连接密码。
(7).配置线路ﻫ#conft ﻫ# line aux0ﻫ# modem inout ﻫMODEM双向传输。
# modem autoconfigurediscovery ﻫ#transportinput all
# rxspeed51200ﻫMODEM的收发速率为51200。
ﻫ# exitﻫ7.配置同步/异步口(适用于2522)
# conf t ﻫ# int s2 ﻫ# ph asyn ﻫ配置S2为异步口.
# ph sync、ﻫ配置S2为同步口.ﻫ8.动态路由的配置
#conf tﻫ#routereigrp20
使用EIGRP路由协议。
常用的路由协议有RIP,IGRP,IS-IS等。
ﻫ# passive-interface serial0ﻫ若S0与X.25相连,则输入本条指令。
# passive-interfaceserial1ﻫ若S1与X.25相连,则输入本条指令。
ﻫ#network ABCD
ABCD为本机的以太网地址。
#network XXXX ﻫXXXX为S0的ip地址。
ﻫ#noauto-summaryﻫ#exit ﻫ9.静态路由的配置ﻫ# iprouter ABCD XXXX YYYY90
ABCD为对方路由器的以太网地址;XXXX为子网掩码.;YYYY为对方对应的广域网端口地址。
#dialer-list 1protocol ippermail ﻫ10.备份配置文件到硬盘
# copyruntFTPﻫ在硬盘上建立一个空文件且有读写权限,才能备份成功.ﻫ11.恢复备份配
12.在路由器上建一个备份ﻫ#copy run start ﻫ路由器的配置置文件到路由器ﻫ#copytﻫ
参数较多,可根据实际需要增减, ﻫ限于篇幅,本文仅给出了一般的常用配置。
ﻫ---- .调试---- 1. 首先将路由器的Ethernet口和所有要使用的串口都激活,方法是进入该口,执行No Shutdown。
ﻫ---- 2. 将和路由器相连的主机加上缺省路由(中心路由器的Ethernet 地址),方法是在UNIX系统的超级用户下执行:router adddefaule XXXX 1(XXXX 为路由器的E0口地址)。
每台主机都要加缺省路由,否则,将不能正常通讯。