思科模拟器命令.pdf
思科路由器命令大全(完整版)

思科路由器命令大全(完整版)思科路由器命令大全(完整版)本文档旨在提供思科路由器命令的详细说明和使用指南,包括路由器配置、网络管理、安全性设置等内容。
每个章节都详细介绍了不同的命令和参数,以帮助用户更好地理解和使用思科路由器。
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:路由信息协议,一种距离向量路由协议。
思科模拟器网络设备常见命令大全

思科模拟器网络设备常见命令大全1. 创建VLAN、端口隔离、配置SVISW1(config)#vlan 10 #创建VLAN 10SW1(config-vlan)#exit #返回全局模式SW1(config)#interface range fastEthernet 0/6-10 #进入接口模式SW1(config-if-range)#switchport access vlan 10 #将接口划入到VLAN 10SW1(config-if-range)#exit #返回全局模式SW1(config)#interface vlan 10 #进入VLAN接口模式SW1(config-VLAN 10)#ip address 192.168.10.1 255.255.255.0 #配置SVI接口地址2. 配置TRUNK口链路SW1(config)#interface fastEthernet 0/2 #进入接口模式SW1(config-FastEthernet 0/2)#switchport mode trunk #设置端口模式为trunk#如果是三层交换机,在模拟器上需要封装802.1Q协议SW1(config)#interface fastEthernet 0/2 #进入接口模式SW1(config-FastEthernet 0/2)#switchport trunk encapsulation dot1q #封装802.1q协议SW1(config-FastEthernet 0/2)#switchport mode trunk #设置端口模式为trunk3. 配置单臂路由RTA(config)#interface fastEthernet 0/0RTA(config-if-FastEthernet 0/0)#no shutdownRTA(config)#interface fastEthernet 0/0.1 #进入子接口模式RTA(config-subif)#encapsulation dot1Q 10 #封装VLAN标签RTA(config-subif)#ip address 192.168.10.1 255.255.255.0 #配置子接口IP地址RTA(config-subif)#no shutdown #启用子接口4. 配置静态路由RA(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.2 #配置到非直连网段静态路由RA(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.2 #配置到非直连网段静态路由5. 配置RIP V2路由RA(config)#router rip #启用RIP路由进程RA(config-router)#version 2 #定义RIP版本号RA(config-router)#network 192.168.0.0 #宣告直连路由RA(config-router)#network 192.168.1.0 #宣告直连路由RA(config-router)#no auto-summary #关闭自动汇总6. 配置RIP路由协议认证RA(config)#key chain ruijie #配置密钥链RA(config-keychain)#key 1 #配置密钥IDRA(config-keychain-key)#key-string 12345 #配置密钥值RA(config-keychain-key)#exitRA(config-keychain)#exitRA(config)#interface fastEthernet 0/0RA(config-if)#ip rip authentication mode md5 #配置验证方式为MD5RA(config-if)#ip rip authentication key-chain ruijie #配置接口启用RIP验证7. 配置OSPF单区域路由RA(config)#router ospf #启用OSPF路由进程RA(config-router)#network 192.168.0.0 0.0.0.255 area 0 #宣告直连路由RA(config-router)#network 192.168.1.0 0.0.0.255 area 0 #宣告直连路由8. 配置OSPF多区域路由RA(config)#router ospf #启用OSPF路由进程RA(config-router)#network 192.168.1.0 0.0.0.255 area 0 #宣告直连路由RA(config-router)#network 172.16.1.0 0.0.0.255 area 1 #宣告直连路由RA(config-router)#network 172.16.2.0 0.0.0.255 area 1 #宣告直连路由Router(config-router)# area 1 stub no-summary #完全stub 过滤路由ip access-list standard acl_1deny 3.3.3.0 0.0.0.255permit anyrouter ospf 10distribute-list acl_1 in9. 配置OSPF协议认证(1)明文验证RA(config)#interface fastEthernet 0/0RA(config-if-FastEthernet 0/0)#ip ospf authentication #启用接口的明文验证RA(config-if-FastEthernet 0/0)#ip ospf authentication-key 123 #配置明文验证的密码(2)暗文验证RB(config)#interface fastEthernet 0/1RB(config-if-FastEthernet 0/1)#ip ospf authentication message-digest #启用接口的MD5验证RB(config-if-FastEthernet 0/1)#ip ospf message-digest-key 1 md5 aaa #配置MD5验证的密钥ID和密钥10.访问控制列表(1)标准访问控制列表RB(config)#access-list 10 permit 192.168.1.0 0.0.0.255RB(config)#access-list 10 deny 192.168.2.0 0.0.0.255RB(config)#interface fastEthernet 0/0RB(config-if-fastEthernet 0/0)#ip access-group 10 out(2)扩展访问控制列表RB(config-ext-nacl)#permit tcp 192.168.2.0 0.0.0.255 host 192.168.4.2 eq ftpRB(config-ext-nacl)#permit tcp 192.168.2.0 0.0.0.255 host 192.168.4.3 eq wwwRB(config-ext-nacl)#deny ip 192.168.2.0 0.0.0.255 192.168.4.0 0.0.0.255RB(config-ext-nacl)#permit ip any anyRB(config)#interface fastEthernet 0/0RB(config-if-FastEthernet 0/0)#ip access-group 100 in #接口应用访问控制列表11.NAT(1)静态NATRA(config)#ip nat inside source static 192.168.100.4 68.1.1.4 RA(config)#ip nat inside source static 192.168.100.6 68.1.1.6 RA(config)#interface fastEthernet 0/0RA(config-if-FastEthernet 0/0)#ip nat inside #定义接口为内部接口RA(config-if-FastEthernet 0/0)#exitRA(config)#interface serial 2/0RA(config-if-Serial 2/0)#ip nat outside #定义接口为外部接口(2)动态NATRA(config)#interface fastEthernet 0/0RA(config-if)#ip nat insideRA(config-if)#exitRA(config)#interface serial 2/0RA(config-if-Serial 2/0)#ip nat outsideRA(config)# access-list 10 permit 192.168.1.0 255.255.255.0 RA(config)# access-list 10 permit 192.168.2.0 255.255.255.0 RA(config-std-nacl)#exitRA(config)#ip nat inside source list 10 interface serial 2/0 overload12.远程登录SW1(config)#enable password 123456 #配置enable密码SW1(config)#line vty 0 4 #进入线程配置模式SW1(config-line)#password 123456 #配置Telnet密码SW1(config-line)#login #启用Telnet的用户名密码验证13.DHCP服务SW1(config)#ip dhcp pool vlan10 #设定地址池名称SW1(dhcp-config)#network 192.168.10.0 255.255.255.0 #配置DHCP地址池SW1(dhcp-config)#dns-server 68.1.1.6 #配置DNS地址SW1(dhcp-config)#default-router 192.168.10.1 #配置网关SW1(dhcp-config)#exitSW1(config)#ip dhcp excluded-address 192.168.10.160192.168.10.200 #配置排除地14.生成树协议SWA(config)#spanning-tree mode pvst/rapid-pvst #开启生成树协议或者快速生成树SWA(config)#spanning-tree vlan 10 priority 4096 #优先级为4096,默认为32768多生成树SW1(config)#spanning-tree #启用生成树协议SW1(config)#spanning-tree mode mstp #定义为MSTP模式SW1(config)#spanning-tree mst 1 priority 4096 # SW1设为实例1的根核心要配SW1(config)#spanning-tree mst configuration #进入MSTP配置模式SW1(config-mst)#instance 1 vlan 10 #创建实例1SW1(config-mst)#instance 2 vlan 20 #创建实例2SW1(config-mst)#name aaa #定义区域名称aaaSW1(config-mst)#revision 1 #定义配置版本号为115.VRRP服务RB(config)#interface fastEthernet 0/0RB(config-if-FastEthernet 0/0)#vrrp 1 ip 52.1.1.254 #启用VRRP进程RB(config-if-FastEthernet 0/0)#vrrp 1 priority 120 #定义接口VRRP优先级RB(config-if-FastEthernet 0/0)#vrrp 1 preempt #启用抢占模式15.配置EIGRP路由router(config)#router eigrp 1router(config-router)#network A.B.C.Drouter(config-router)#no auto-summary #在主类边界关闭自动汇总,默认开启16.配置BGP路由router(config)#router bgp 100router(config-router)#network 15.1.1.0 mask 255.255.255.0 #传递网络router(config-router)#neighbor {ip-address} remote-as 100 #配置邻居router(config-router)#auto-summary #在主类边界开启自动汇总(只发布主类要开启)默认关闭r1(config-router)#aggregare-address 10.1.1.0 215.255.255.0 #路由汇总17.路由重分发redistribute protocol [ metric metric-value] [ match internal | external nssa-external type] [route-map map-tag] #RIP redistribute protocol [ metric metric-value ] [ metric-type {1|2} ] [ tag tag-value ] [ route-map map-tag ] #OSPFredistribute connected [ metric metric-value ]redistribute connected [ subnets ] [ metric metric-value ] [ metric-type { 1 | 2 } ] [ tag tag-value ] [ route-map map-tag ] redistribute static [ metric metric-value ]redistribute static [subnets ][ metric metric-value ] [ metric-type { 1 | 2 } ] [ tag tag-value ] [ route-map map-tag ] default-information originate [ route-map route-map-name ] default-information originate [ always ] [ metric metric-value ] [ metric-type type-value ] [ route-map map-name ]18.策略路由route-map name [ permit | deny ] [sequence-number ]match ip address { access-list-number | name } [ …access-list-number | name ]set ip next-hop ip-address […ip-address ]ip policy route-map route-map-name #在接口上配置策略路由19.端口聚合SW1(config)#interface port-channel 1 #创建聚合端口1SW1(config)#interface range fastEthernet 0/23-24 #进入一组接口SW1(config-if)#channel-group 1 mode on #将接口配置成AP 的成员端口SW1(config)#interface port-channel 1 #进入聚合接口模式SW1(config-if)#switchport mode trunk #将聚合端口配置为干道模式SW1(config)#port-channel load-balance dst-mac #配置基于目的MAC地址流量平衡。
思科模拟器基本命令(交换机)

思科模拟器基本命令(交换机) 知识归纳思科模拟器命令:设置交换机名字为yzhSwitch> 进入超级终端控制台Switch>enable 进入交换机特权模式Switch#Switch#configure terminal 进入交换机全局配置模式Switch(configure)#hostname yzh 改变名字为XXXyzh(configure)# 显示改名成功yzh(configure)#exit 退回上级操作模式,即返回特权模式 yzh#yzh#exit 返回到用户模式yzh>参看交换机有关信息yzh#yzh#configure terminal 进入交换机全局配置模式 yzh#show version 查看交换机的版本信息yzh#show vlan 查看交换机的VLAN信息,默认情况下所有借口均属于VLAN yzh#show running-config 查看交换机当前生效的配置信息配置交换机接口f0/2yzh>yzh>enableyzh#yzh#configure terminal 进入交换机配置模式 yzh(config)#interface fastEthernet 0/2 进入交换机接口fa0/2 yzh(config-if)# 进入接口配置模式yzh(config-if)#speed 100 设置接口F0/2速率为100M yzh(config-if)#duplex half 配置接口的双工模式是半双工 yzh(config-if)#no shutdown 开启接口,使得处于工作状态,等待转发数据。
yzh(config-if)#exit 输入exit返回全局模式 yzh(config)#exit 返回特权模式yzh# 位于特权模式yzh#show interfaces fastEthernet 0/2 查看刚才对接口f0/2配置情况设置交换机Enable特权密码为adminyzh> 进入超级终端控制台 yzh>enable 进入交换机特权模式 yzh#configure terminal 进入交换机配置模式 yzh(config)#enable secret admin 设置Enable 密码为admin 注:验证密码自己思考。
3、思科模拟器链路聚合命令hao

思科模拟器命令一、实验拓扑图:二、操作步骤:——链路聚合(Link Aggregation)方案1---静态聚合--- SW1和SW2交换机配置如下:1、配置vlanZXR10#vlan databaseZXR10(vlan)#vlan 10ZXR10(vlan)#vlan 20ZXR10(vlan)#exitZXR10#configure terminalZXR10(config)# interface fastethernet0/1ZXR10(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 10 ――――――――-接PC机ZXR10(config-if)#exitZXR10(config)# interface fastethernet0/2ZXR10(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 20 ――――――――-接PC机ZXR10(config-if)#exit3、将端口加入到链路聚合组中:ZXR10 (config)# interface fastethernet 0/15 ――――――――-接3228-1的15口ZXR10 (config-if)# channel-group 1 mode on---------以静态方式将端口成员加入链路聚合组ZXR10 (config-if)#exitZXR10 (config)# interface fastethernet 0/16 ―――――――――――-接3228-1的16口ZXR10 (config-if)# channel-group 1 mode on---------以静态方式将端口成员加入链路聚合组ZXR10 (config-if)#exit4、配置链路聚合组模式:ZXR10 (config)# interface port-channel 1-------进入虚拟链路聚合组1ZXR10 (config-if)# switchport mode trunk-------修改虚拟链路聚合组1的模式为TRUNKZXR10(config-if)#switchport trunk allowed vlan 10,20----虚拟链路聚合组1承载VLAN 10,20 ZXR10 (config)#exit(SW2交换机配置同SW-1一样)方案2 –动态链路聚合---SW1和SW2交换机配置如下:1、配置vlanZXR10#vlan databaseZXR10(vlan)#vlan 10ZXR10(vlan)#vlan 20ZXR10(vlan)#exitZXR10#configure terminalZXR10(config)# interface fastethernet0/1ZXR10(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 10 ――――――――-接PC机ZXR10(config-if)#exitZXR10(config)# interface fastethernet0/2ZXR10(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 20 ――――――――-接PC机ZXR10(config-if)#exit3、将端口加入到链路聚合组中:ZXR10 (config)# interface fastethernet 0/15 ――――――――-接3228-1的15口ZXR10 (config-if)# channel-protocol lacp--------设置端口聚合模式为动态模式ZXR10 (config-if)# channel-group 1 mode active(/passive)---------以动态方式将端口成员加入链路聚合组ZXR10 (config-if)#exitZXR10 (config)# interface fastethernet 0/16 ―――――――――――-接3228-1的16口ZXR10 (config-if)# channel-protocol lacp--------设置端口聚合模式为动态模式ZXR10 (config-if)# channel-group 1 mode active(/passive)---------以动态方式将端口成员加入ZXR10 (config-if)#exit4、配置链路聚合组模式:ZXR10 (config)# interface port-channel 1ZXR10 (config-if)# switchport mode trunkZXR10(config-if)#switchport trunk allowed vlan 10,20ZXR10 (config)#exit(SW2交换机配置同SW-1一样)注:聚合模式设置为on时端口运行静态trunk,参与聚合的两端都需要设置为on模式。
思科命令大全(完整版)

思科命令大全(完整版)1.设置主机名/系统名IOS:witch(config)#hotname"hotname"CLI:witch(enable)etytemnamename-tring2.设置登录口令IOS:witch(config)#enablepawordlevel1pawordCLI:witch(enable)etpawordwitch(enable)etenalbepa3.设置远程访问IOS:witch(config)#interfacevlan1witch(config-if)#ipaddreip-addrenetmakwitch(config-if)#ipdefault-gatewayip-addreCLI:witch(enable)etinterfacec0ip-addrenetmakbroadcat-addre witch(enable)etinterfacec0vlanwitch(enable)etiproutedefaultgateway4.启用和浏览CDP信息IOS:witch(config-if)#cdpenablewitch(config-if)#nocdpenableCLI:witch(enable)etcdp{enable|diable}module/port5.查看Cico邻接设备的CDP通告IOS:witch#howcdpinterface[typemodle/port]witch#howcdpneighbor[typemodule/port][detail]CLI:witch(enable)howcdpneighbor[module/port][vlan|duple某|capabilitie|detail]6.端口描述IOS:witch(config-if)#decriptionecription-tring CLI:witch(enable)etportnamemodule/numberdecription-tring 7.设置端口速度IOS:witch(config-if)#peed{10|100|auto}CLI:witch(enable)etportpeedmoudle/number{10|100|auto}witch(enable)etportpeedmoudle/number{4|16|auto}8.设置以太网的链路模式IOS:witch(config-if)#duple某{auto|full|half}CLI:witch(enable)etportduple某module/number{full|half}9.配置静态VLANIOS:witch#vlandatabaewitch(vlan)#vlanvlan-numnamevlawitch(vlan)#e某itwitch#configureteriminalwitch(config)#interfaceinterfacemodule/numberwitch(config-if)#witchportmodeaccewitch(config-if)#witchportaccevlanvlan-numwitch(config-if)#endCLI:witch(enable)etvlanvlan-num[namename]witch(enable)etvlanvlan-nummod-num/port-lit10.配置VLAN中继线IOS:witch(config)#interfaceinterfacemod/portwitch(config-if)#witchportmodetrunkwitch(config-if)#witchporttrunkencapulation{il|dotlq}witch(config-if)#witchporttrunkallowedvlanremovevlan-litwitch(config-if)#witchporttrunkallowedvlanaddvlan-litCLI:witch(enable)ettrunkmodule/port[on|off|deirable|auto|nonegotiate] Vlan-range[il|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:witch#vlandatabaewitch(vlan)#vtpdomaindomain-nameCLI:witch(enable)etvtp[domaindomain-name]12.配置VTP模式IOS:witch#vlandatabaewitch(vlan)#vtpdomaindomain-namewitch(vlan)#vtp{ever|cilent|tranparent}witch(vlan)#vtppawordpawordCLI:witch(enable)etvtp[domaindomain-name][mode{ever|cilent|tranparent}][pawordpaword] 13.配置VTP版本IOS:witch#vlandatabaewitch(vlan)#vtpv2-modeCLI:witch(enable)etvtpv2enable14.启动VTP剪裁IOS:witch#vlandatabaewitch(vlan)#vtppruningCLI:witch(enable)etvtppruningenable15.配置以太信道IOS:witch(config-if)#portgroupgroup-number[ditribution{ource|detination}]CLI:witch(enable)etportchannelmoudle/port-rangemode{on|off|deirable|auto}16.调整根路径成本IOS:witch(config-if)#panning-tree[vlanvlan-lit]cotcotCLI:witch(enable)etpantreeportcotmoudle/portcotwitch(enable)etpantreeportvlancotmoudle/port[cotcot][vlan-lit]17.调整端口IDIOS:witch(config-if)#panning-tree[vlanvlan-lit]port-priorityport-priorityCLI:witch(enable)etpantreeportpri{mldule/port}prioritywitch(enable)etpantreeportvlanpri{module/port}priority[vlan] 18.修改STP时钟witch(config)#panning-tree[vlanvlan-lit]ma某-ageecondCLI:witch(enable)etpantreehellointerval[vlan]witch(enable)etpantreefwddelaydelay[vlan]witch(enable)etpantreema某ageagingtiame[vlan]19.启用或禁用PortFat特征IOS:witch(config-if)#panning-treeportfatCLI:witch(enable)etpantreeportfat{module/port}{enable|diable}20.启用或禁用UplinkFat特征IOS:witch(config)#panning-treeuplinkfat[ma某-update-ratepkt-per-econd]CLI:witch(enable)etpantreeuplinkfat{enable|diable}[rateupdate-rate][all-protocoloff|on]为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:witch(config)#cluterenablecluter-name21.为了从一条中继链路上删除VLAN,可使用下列命令:witch(enable)cleartrunkmodule/portvlan-range22.用howvtpdomain显示管理域的VTP参数.23.用howvtptatitic显示管理域的VTP参数.24.在Catalyt交换机上定义TrBRF的命令如下:witch(enable)etvlanvlan-name[namename]typetrbrfbridgebridge-num[tp{ieee|ibm}]25.在Catalyt交换机上定义TrCRF的命令如下:witch(enable)etvlanvlan-num[namename]typetrcrf{ringhe某-ring-num|decringdecimal-ring-num}parentvlan-num26.在创建好TrBRFVLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:witch(enable)etvlanvlan-nummod-num/port-num27.命令howpantree显示一个交换机端口的STP状态.28.配置一个ELAN的LES和BUS,可以使用下列命令:ATM(config)#interfaceatmnumber.ubintmultiointATM(config-ubif)#laneerber-buethernetelan-name29.配置LECS:ATM(config)#lanedatabaedatabae-nameATM(lane-config-databade)#nameelan1-nameerver-atm-addrele1-nap-addreATM(lane-config-databade)#nameelan2-nameerver-atm-addrele2-nap-addreATM(lane-config-databade)#name...30.创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)#interfaceatmnumberATM(config-if)#laneconfigdatabaedatabae-nameATM(config-if)#laneconfigauto-config-atm-addre31.将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)#interfaceatmnumber.ubintmultipointATM(config)#laneclientethernetvlan-numelan-num32.用howlaneerver显示LES的状态.33.用howlanebu显示bu的状态.34.用howlanedatabae显示LECS数据库可内容.35.用howlaneclient显示LEC的状态.36.用howmodule显示已安装的模块列表.37.用物理接口建立与VLAN的连接:router#configureterminalrouter(config)#interfacemediamodule/portrouter(config-if)#decriptiondecription-tringrouter(config-if)#ipaddreip-addrubnet-makrouter(config-if)#nohutdown38.用中继链路来建立与VLAN的连接:router(config)#interfacemodule/port.ubinterface router(config-ig)#encapulation[il|dotlq]vlan-number router(config-if)#ipaddreip-addreubnet-mak39.用LANE来建立与VLAN的连接:router(config)#interfaceatmmodule/portrouter(config-if)#noipaddrerouter(config-if)#atmpvc105qaalrouter(config-if)#atmpvc2016ilnirouter(config-if)#interfaceatmmodule/port.ubinterfacemultipointrouter(config-if)#ipaddreip-addreubnet-makrouter(config-if)#laneclientethernetelan-numrouter(config-if)#interfaceatmmodule/port.ubinterfacemultipointrouter(config-if)#ipaddreip-addreubnet-namerouter(config-if)#laneclientethernetelan-namerouter(config-if)#...40.为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)#iproutingrouter(config)#routerip-routing-protocolrouter(config-router)#networkip-network-numberrouter(config-router)#networkip-network-number41.配置默认路由:witch(enable)etiproutedefaultgateway42.为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)#interfaceinterfacenumberrouter(config-if)#mlrpvlan-idvlan-id-num43.在路由处理器启用MLSP:router(config)#mlrpip44.为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)#interfaceinterfacenumberrouter(config-if)#mlrpvtp-domaindomain-name45.查看指定的VTP域的信息:router#howmlrpvtp-domainvtpdomainname46.要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mlrpmanagement-interface47.要检验MLS-RP的配置情况:router#howmlrp48.检验特定接口上的MLS配置:router#howmlrpinterfaceinterfacenumber49.为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:etmlflow[detination|detination-ource|full]50.为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)#mlrpipinput-acl51.当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:witch(enable)etmlenable52.若想改变老化时间的值,可在特权模式下输入以下命令:54.确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:witch(enable)howmlinclude55.显示MLS高速缓存记录:witch(enable)howmlentry56.用命令howinarp显示ARP高速缓存区的内容。
思科命令大全(完整版)

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI: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-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string7.设置端口速度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}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS: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)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS: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:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道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} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority CLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds CLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocolsoff|on] 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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 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高速缓存区的内容。
BosonNetSim网络模拟软件配置命令大全

BosonNetSim网络模拟软件配置命令大全*************************************************************** **************************思科路由器常用配置命令大全(A-X)(1)*************************************************************** **************************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 确定一个密码以防止对路由器非授权的访问*****************************************************************************************思科路由器常用配置命令大全(A-X)(2)*************************************************************** **************************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和passwordProtocol 对一个IP路由选择协议进行定义,该协议可以是RIP,内部网关路由选择协议(IGRP),开放最短路径优先(OSPF),还可以是加强的IGRPPwd 显示当前设备名*************************************************************** **************************思科路由器常用配置命令大全(A-X)(3)/doc/8d14600486.html,*************************************************************** **************************思科路由器常用配置命令大全(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 命令大全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中的当前配置存储到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和passwordProtocol 对一个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命令大全解释、注释(可编辑修改word版)

cisco 命令大全解释、注释Dynamips 作为一款十分优秀的 Cisco 路由器模拟软件,实验模拟效果远比 Boson NetSim 更加真实可信。
Boson NetSim 是对 IOS 命令行的模拟,而 Dynamips 是通过在计算机中构建运行 IOS 的虚拟机来真正运行IOS 实现对 Cisco 路由器的模拟。
收录最常用的Cisco 命令分类如下:cisco 命令大全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 保存信息到NVRAM write 保存信息到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 信息routereigrp +as 号激活EIGRP 路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表showip eigrp traffic 查看发送包数量routerospf +process-ID 激活OSPF 协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF 的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能showuser 查看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 addressSwitch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN 号, 然后进入vlan 配态,可以输入一个新的VLAN 号或旧的来进行修改。
思科命令

has md
au pr
gr 2
exit
cry is key 6 密码 add 对端接口IP
acc 100 pe ip IP 子网 IP 子网
cry ips tr 名字 esp-a ah-m
exit
cry MAP名字 1 ipsec-isakmp
set pe 对端端口IP
spanning-tree vlan N root secondary
优先级
spanning-tree vlan N priority 4096
速端口
进入端口
spanning-tree protfast
NAT转换
ip nat pool 名字 转换的IP 转换的IP natmark 掩码
gloval (dmz) 1 int
NAT公网访问私网
static (dmz,outside) 公网IP 私网IP
access-list 名字 permit tcp any host 公网IP eq 80
access-group 名字 in int outside
路由器VPN配置
cry is po 1
en
conf t
line con 0
logg syn
exec-time 0 0
no ip domain-lookup
host
cle mac
cle arp
line vty 0 4
pass 123
exit
ena pass 456
username czh pass 123
network IP段 area 0
思科命令

增加一个loopback虚拟端口(ospf选举时route ID)
enable(en)
configure terminal(conf t)
interface loopback 0(in l) ---增加一个虚拟端口,0-2147483647之间随便填
ip address 192.168.1.1 255.255.255.0(ip ad) ---给端口设置IP和子网,不需要no shutdown 自动开启端口
configure terminal(conf t)
hostname(h) (名字) --改名字
加密码
enable(en)
configure terminal(conf t)
enable password(ena p) (密码) --设置进入特权模式密码
enable secter(ena s) (密码) --设置进入特权模式密码
access-list 100 permite ip(协议) any host 192.168.1.1(ac 100 p ip an h 192.168.1.1) ---允许所有电脑对192.168.1.1这台电脑的ip协议
interface serial 0/0/0
ip access-group 1 in ---(在端口上开启访问控制列表in是出去out是进来)
show running-config(sh r) --查看运行配置 IP_ADDRESS=(路由IP) confreg 0x2142 --(不从VNROM里启动)
IP_SUBNET_MASK=(路由子网) reset --(重启)
interface serial 0/0/0(in s 0/0/0) --进入到端口
思科命令集

【基础配置】Showrun查看所有配置Switch>enable 进入特权模式Switch #config terminal 进入全局配置模式Switch(config)#hostname router 设置交换机的主机名为router Switch(config)#enable secret yangxu 设置特权加密口令为yangxu Switch(config)#enable password yangxu 设置特权非密口令为yangxu Switch(config)#line console 0 进入控制台口Switch(config-line)#line vty 0 4 进入虚拟终端Switch(config-line)#login 要求口令验证Switch(config-line)#password xx 设置登录口令xxSwitch(config)#exit 返回特权模式Switch#exit返回命令Switch(config)#no XXX 删除某项命令。
【交换机配置】Switch(config)#vlan 10 创建vlan10Switch(config)#int vlan 10 进入vlan10接口Switch(config)#ip address 192.168.10.1 255.255.255.0配置IP地址Switch(config)#int gi0/1 进入接口0/1Switch(config)# Switchport trunk encapsulation dot1qSwitch(config)#Switchport mode trunk 开启trunkSwitch(config)# Switchport trunk allowed vlan all放通所有vlan通过。
Switch(config)#no shutdown开启接口Switch(config)#int gi0/1 进入接口0/1Switch(config)#Switchport mode access 开启accessSwitch(config)#Switchport access vlan 10把接口划入到vlan10Switch(config)#int gi0/1 进入接口0/1Switch(config)#no Switchport 关闭二层交换功能,开启三层功能Switch(config)#ipadderss 192.168.10.1 255.255.255.252配置ip地址Switch(config)#no shutdown开启接口【DHCP配置】(模拟器默认开启)Switch(config)#Ipdhcp pool yangxu创建DHCP地址池名字为yangxuSwitch(config)#Network 192.168.10.0 255.255.255.0 分配的IP地址网段Switch(config)#default-router 192.168.10.254 分配地址的网关Switch(config)#dns-server 202.102.192.168 DNS服务地址Switch(config)#exit【VRRP功能】(思科使用的HSRP私有协议)Switch(config)#interface f0/0Switch(config-if)#standby 11 ip 192.168.13.254启用HSRP功能,并配置虚拟IP网关地址,11为standby的组号。
思科模拟器配置命令.pdf

相同VLAN间的通信:Switch0与Switch1配置命令相同:Switch#conf tSwitch(config)#vlan 10Switch(config-vlan)#exSwitch(config)#int rang f0/1-5Switch(config-if-range)#sw acc vlan 10Switch(config-if-range)#exSwitch(config)#int f0/24Switch(config-if)#sw mode trunk配置聚合口:(聚合口的成员口类型要一致)Switch0与Switch1配置命令相同:Switch(config)#int rang f0/23-24Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#exSwitch(config)#int port-channel 1Switch(config-if)#sw mode trunk远程登陆交换机:Switch(config)#int vlan 1Switch(config-if)#ip add 1.1.1.1 255.255.255.0(IP地址要和远程登陆的客户机在同一个网段) Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#line vty 0Switch(config-line)#password zlrSwitch(config-line)#exitSwitch(config)#enable secret 123Switch(config)#ex三层交换机不同VLAN间的通信:三层交换机配置:Switch(config)#vlan 10Switch(config-vlan)#vlan 20Switch(config-vlan)#exSwitch(config)#int rang f0/23-24Switch(config-if-range)#sw trunk encapsulation dot1qSwitch(config-if-range)#sw mode trunkSwitch(config-if-range)#exSwitch(config)#int vlan 10Switch(config-if)#ip add 192.168.10.254 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#int vlan 20Switch(config-if)#ip add 192.168.20.254 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#ip routingSwitch0与Switch1配置命令相同:Switch(config)#vlan 20Switch(config-vlan)#exSwitch(config)#int rang f0/6-10Switch(config-if-range)#sw acc vlan 20Switch(config-if-range)#exSwitch(config)#int f0/21Switch(config-if)#sw mode trunk端口安全:Switch1配置命令:Switch(config)#int f0/2Switch(config-if)#sw mode acc(端口安全配置要在端口是静态的前提下) Switch(config-if)#sw port-securitySwitch(config-if)#sw port-security violation protectSwitch(config-if)#sw port-security maximum 1Switch(config-if)#sw port-security mac-address 0000.0c8a.9206 Switch(config-if)#no sw port-security mac-address 0000.0c8a.9206 Switch(config-if)#sw port-security mac-address 0000.0c8a.92d6生成树协议的配置:在选定为根交换机的交换机下配置:Switch(config)#spanning-tree mode pvstSwitch(config)#spanning-tree vlan 1 priority 4096三层交换机与理由器的静态路由通信:ROUTER0:Router#conf tRouter(config)#int f1/0Router(config-if)#ip add 192.168.1.2 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#int f0/0Router(config-if)#ip add 192.168.2.254 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1Router(config)#ip route 192.168.20.0 255.255.255.0 192.168.1.1三层交换机配置:(F0/1作为路由口的配置;若作为SVI配置,则只需把F0/1划分到VLAN10,VLAN20其中之一并把理由器的F1/0的IP地址设置到与SVI端口相同的网段)Switch(config)#int f0/1Switch(config-if)#no swSwitch(config-if)#ip add 192.168.1.1 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#ip route 192.168.2.0 255.255.255.0 f0/1单臂路由配置:ROUTER1:Router(config)#int f0/0Router(config-if)#no shRouter(config-if)#exRouter(config)#int f0/0.1Router(config-subif)#encapsulation dot1q 30Router(config-subif)#ip add 192.168.30.254 255.255.255.0Router(config-subif)#no shRouter(config)#int f0/0.2Router(config-subif)#encapsulation dot1q 40Router(config-subif)#ip add 192.168.40.254 255.255.255.0Router(config-subif)#exSwitch2:Switch(config)#vlan 30Switch(config-vlan)#vlan 40Switch(config-vlan)#exSwitch(config)#int rang f0/1-5Switch(config-if-range)#sw acc vlan 30Switch(config-if-range)#exSwitch(config)#int rang f0/6-10Switch(config-if-range)#sw acc vlan 40Switch(config-if-range)#exSwitch(config)#int f0/24Switch(config-if)#sw mode trunkRIP协议:(连接好每个路由器的端口并配置好各个IP地址,再宣告各个路由器直连的网段)ROUTER1:Router(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.3.0Router(config-router)#network 192.168.30.0Router(config-router)#network 192.168.40.0Router(config-router)#exOSPF协议配置:(连接好每个路由器的端口并配置好各个IP地址,再宣告各个路由器直连的网段)ROUTER2:(作为ABR)Router(config)#route ospf 1Router(config-router)#network 192.168.100.0 0.0.0.255 area 1 Router(config-router)#network 192.168.4.0 0.0.0.255 area 0 Router(config-router)#network 192.168.5.0 0.0.0.255 area 0 路由重分布:ROUTER1(作为ASBR):Router(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.3.0Router(config-router)#network 192.168.30.0Router(config-router)#network 192.168.40.0Router(config-router)#exRouter(config)#route ospf 1Router(config-router)#network 192.168.100.0 0.0.0.255 area 1 Router(config-router)#exRouter(config)#route ripRouter(config-router)#redistribute ospf 1 metric 1Router(config-router)#exRouter(config)#route ospf 1Router(config-router)#redistribute rip metric 1 subnetsNAT配置:ROUTER4:Router>enRouter#conf tRouter(config)#int f0/0Router(config-if)#ip add 192.168.200.254 255.255.255.0Router(config-if)#no shRouter(config-if)#eRouter(config)#int f1/0Router(config-if)#ip add 192.168.150.254 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#ip nat inside source static 192.168.200.1 192.168.7.3Router(config)#int f0/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat pool zlr 192.168.7.4 192.168.7.10 netRouter(config)#ip nat pool zlr 192.168.7.4 192.168.7.10 netmask 192.168.7.0 Router(config)#access-list 1 permit 192.168.200.0 0.0.0.255Router(config)#ip nat inside source list 1 pool zlrRouter(config)#int f0/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat inside source static tcp 192.168.150.1 80 192.168.7.2 80 Router(config)#int f1/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se 3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat pool xl 192.168.7.20 192.168.7.20 netmask 192.168.7.0 Router(config)#access-list 2 permit 192.168.150.0 0.0.0.255Router(config)#ip nat inside source list 2 pool xl overloadRouter(config)#int f1/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#ACL配置:ROUTER4:Router(config)#access-list 10 deny 192.168.4.0 0.0.0.255Router(config)#access-list 10 permit anyRouter(config)#int f1/0Router(config-if)#ip access-group 10 outRouter(config-if)#exRouter(config)#ip access-list standRouter(config)#ip access-list standard xzRouter(config-std-nacl)#10 deny 192.168.6.0 0.0.0.255Router(config-std-nacl)#20 permit anyRouter(config-std-nacl)#exRouter(config)#int f0/0Router(config-if)#ip access-group xz outROUTER2:Router(config)#access-list 100 deny tcp host 192.168.4.1 host 192.168.7.3 eq www Router(config)#access-list 100 permit ip any anyRouter(config)#int f0/0Router(config-if)#ip access-group 100 inROUTER3:Router(config)#ip access-list extended lrRouter(config-ext-nacl)#10 deny tcp host 192.168.6.1 host 192.168.7.2 eq www Router(config-ext-nacl)#20 permit ip any anyRouter(config)#int f0/0Router(config-if)#ip accRouter(config-if)#ip access-group lr in。
思科命令全集汇总

CISCO命令全集-思科命令汇总各个视图模式介绍:普通视图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 /设置特权口令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、路由配置:(1)静态路由router(config)#ip route 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版本router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用router(config-router)# passive-int 接口名/启动本路由器的那个接口为被动接口router(config-router)# nei 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 /关闭自动汇总功能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上配置,并发布缺省路由信息进入这个区域内的路由器4、保存当前修改/运行的配置:router#write /将RAM中的当前配置存储到NVRAM中,下次路由器启动就是执行保存的配置router#Copy running-config startup-config /命令与write效果一样5、一般的常用命令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 ip protocol /查看当前路由器运行的动态路由协议情况router#show ip int brief /查看当前的路由器的接口ip地址启用情况router#show running-config /查看当前运行配置router#show startup-config /查看启动配置router#debug ip pack /打开ip报文的调试router#terminal monitor /输出到终端上显示调试信息router#show ip eigrp neighbors /查看eigrp协议的邻居表router#show ip eigrp top //查看eigrp协议的拓朴表router#show ip eigrp interface /查看当前路由器运行eigrp协议的接口情况router#show ip ospf neighbor /查看当前路由器的ospf协议的邻居表router#show ip ospf interface /查看当前路由器运行ospf协议的接口情况router#clear ip ospf process /清楚当前路由器ospf协议的进程router#Show interfaces /显示设置在路由器和访问服务器上所有接口的统计信息. 显示路由器上配置的所有接口的状态router#Show interfaces serial /显示关于一个串口的信息router#Show ip interface /列出一个接口的IP信息和状态的小结, 列出接口的状态和全局参数――――――――――――――――――――――――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中的当前配置存储到NVRAM Copy 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)Isdn switch-type 规定了在ISDN接口上的中央办公区的交换机的类型Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制Lat 打开LAT连接Line 确定一个特定的线路和开始线路配置Line concole 设置控制台端口线路Line vty 为远程控制台访问规定了一个虚拟终端Lock 锁住终端控制台Login 在终端会话登录过程中启动了密码检查Login 以某用户身份登录,登录时允许口令验证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和passwordProtocol 对一个IP路由选择协议进行定义,该协议可以是RIP,内部网关路由选择协议(IGRP),开放最短路径优先(OSPF),还可以是加强的IGRP Pwd 显示当前设备名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 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 显示配置的协议。
思科模拟器命令

1.计算机命令:PCA logi n: root password: linux # shutdow n -h now # logout # logi n # ifconfig;显示IP 地址# ifconfig ethO <ip address 〉netmask <netmask> ; 设置 IP 地址 # ifconfig ehtO <ip address> netmask <netmask> down ; 删除 IP 地址 # route add 0.0.0.0 gw <ip> # route del 0.0.0.0 gw <ip> # route add default gw <ip> # route del default gw <ip> # route# pi ng <ip> # telnet <ip>交换机VLAN 设置: switch#vla n database switch(vla n)#vla n 2交换机基本状态: switch: rommon> 态 host name> host name# host name(c on fig)# host name(c on fig-if)# 交换机口令设置: switch>e nable switch#c onfig termi nal switch(c on fig)#host name <host name> switch(config)#enable secret xxx switch(config)#enable password xxa switch(c on fig)#li ne con sole 0 switch(c on fig-li ne)#li ne vty 0 4 switch(c on fig-li ne)#logi n switch(config-line)#password xx switch#exit ;交换机的ROM 状态;路由器的ROM 状;用户模式 ;特权模式 ;全局配置模式接口状态进入特权模式;进入全局配置模式 设置交换机的主机名 ;设置特权加密口令 ;设置特权非密口令 ;进入控制台口进入虚拟终端 ;允许登录设置登录口令xx ;返回命令;使用root 用户 ;口令是 linux ;同init 0关机 ;设置网关 ;删除网关显示网关;进入VLAN 设置 ;建 VLAN 2switch(vla n)#no via n 2 switch(co nfig)#i nt fO/1 switch(c on fig-if)#switchport access via n 2 switch(con fig-if)#switchport mode trunkswitch(config-if)#switchport trunk allowed vlan 1,2 switch(c on fig-if)#switchport trunk en cap dot1q switch(config)#vtp domain <name> switch(c on fig)#vtp password <word> switch(c on fig)#vtp mode server switch(c on fig)#vtp mode clie nt交换机设置IP地址:switch(c on fig)#i nterface vla n 1 switch(c on fig-if)#ip address <IP> <mask>switch#dir flash:交换机显示命令:switch#writeswitch#show vtp switch#show run switch#show vla n switch#show in terface switch#show int f0/0;保存配置信息查看vtp配置信息;查看当前配置信息查看vlan配置信息;查看端口信息查看指定端口信息3.路由器支持的命令:路由器显示命令:router#show run router#show in terfacerouter#show ip route router#show cdp neirouter#reload路由器口令设置:router>e nablerouter#c onfig termi nal router(co nfig)#host name <host name> router(c on fig)#e nable secret xxx router(co nfig)#e nable password xxb router(co nfig)#li ne con sole 0 router(config-line)#line vty 0 4 router(co nfig-li ne)#log inrouter(config-line)#password xx;删vlan 2;进入端口1当前端口加入vlan 2;设置为干线;设置允许的vlan;设置vlan中继设置发vtp域名设置发vtp密码;设置发vtp模式;设置发vtp模式;进入vlan 1 ;设置IP地址;设置默认网关;查看闪存显示配置信息;显示接口信息显示路由信息显示邻居信息重新起动进入特权模式;进入全局配置模式设置交换机的主机名;设置特权加密口令;设置特权非密口令;进入控制台口进入虚拟终端;要求口令验证设置登录口令xxrouter(config)#(Ctrl+z) router#exit ;返回特权模式;返回命令路由器配置:router(config)#int s0/0router(config-if)#no shutdown router(config-if)#clock rate 64000 router(config-if)#ip address <ip> <netmask>;进入Serail 接口;激活当前接口;设置时钟频率;设置IP 地址router(config-if)#ip address <ip> <netmask> second ;设置第二个IP router(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip> <netmask> ;设置子接口IProuter(config-subif.1)#encapsulation dot1q <n> router(config)#config-register 0x2142router(config)#config-register 0x2102router#reload ;绑定vlan 中继协议;跳过配置文件;正常使用配置文件;重新引导路由器文件操作:router#copy running-config startup-config router#copy running-config tftprouter#copy startup-config tftp router#copy tftp flash:;保存配置;保存配置到tftp ;开机配置存到tftp;下传文件到flashrouter#copy tftp startup-config ;下载配置文件ROM 状态:Ctrl+Break rommon>confreg 0x2142 rommon>confreg 0x2102 rommon>reset ;进入ROM 监控状态;跳过配置文件;恢复配置文件;重新引导rommon> copy xmodem:<s name> flash:<d name> ;从con sole 传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP 服务器IPrommon>TFTP_FILE=c2600.bin rommon>tftpdnldrommon>dir flash:;指定下载的文件;从tftp 下载;查看闪存内容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> ;命令格式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 router(config-router)#network <netid> router(config-router)#negihbor <ip>帧中继命令: router(config)#frame-relayswitching router(config-s0)#encapsulation frame-relay router(config-s0)#fram-relay lmi-type cisco router(config-s0)#frame-relay intf-type 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-pointrouter#show frame pvc router#show frame map 基本访问控制列表:router(config)#access-list <number> permit|deny<source_ip> <wild|any> router(config)#interface <interface> ;default:deny any router(config-if)#ip access-group <number> in|out ;defaultut例 1 : router(config)#access-list 1 deny host 10.65.1.1 router(config)#access-list 1 permit any router(config)#int f0/0 router(config-if)#ip access-group 4 in例 2 : 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.255router(config)#access-list 4 deny 10.0.0.0 0.255.255.255 router(config)#access-list 4 permit any router(config)#int f0/1 router(config-if)#ip access-group 4 in扩展访问控制列表: access-list <number> permit|deny icmp <S_IP wild> <D_IP wild>[type] access-list <number> permit|deny tcp <S_IP wild> <D_IP wild>[port] 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例 2 : 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;启动路由转发;启动 RIP 路由协议。
思科 模拟器路由器操作命令

•配置用户user1,密码为digitalchina,使用此用户名的用户群为普通用户,不可以进入特权模式–Router#configRouter_config#username user1 password digitalchina –Router_config#aaa authentication for_login login local–Router_config#line console 0–Router_config_line#login authentication for_login–Router_config_line#–Router_config#enable password digitalchina level 15实训五十八HDLC封装•RouterA配置•指定封装协议为HDLC协议–RouterA_config#interface serial 2/0–RouterA_config_s2/0#encapsulation hdlc•指定接口的IP地址以及子网掩码–RouterA_config_s2/0#ip address 11.1.1.1 255.255.255.0–RouterA_config_s2/0#no shut•RouterB配置–Router_config#interface serial 1/0–Router_config_s1/0#encapsulation hdlc–Router_config_s1/0#ip address 11.1.1.2 255.255.255.0–指定此端口(DCE端)的内时钟信号频率–Router_config_s1/0#physical-layer speed 64000端口状态察看•Router#show interface serial 2/0•Serial2/0 is up, line protocol is up•。
思科模拟器命令

静态路由:ip route (需要访问的IP) (子网掩码) (要经过的IP)
动态路由:
RIP协议:router rip
version 2
redistribute ospf 1 在RIP路由器中引入OSPF路由!
end
设置模式:进入端口/绑定端口,switchport mode (模式)
给VLAN分配IP:进入VLAN ,ip add (IP地址)
三层交换机trunk模式封装:switchport trunk encapsulation dot11
switchport mode trunk //先封装,后设置trunk
查看启动:show running-config
查看vlan:show vlan
保存设置:write
查看:show flsh
进入端口/VLAN:interface fasthernet (xx)
绑定端口:interface range fasthernet(xx-xx)
分配vlan:进入端口/绑定端口,switchport access (XX)
network(端口IP)注:把你需要通信的端口IP都输入一遍
no auto-summary
OSPF协议:router ospf 1
network(端口IP)注把你需要通信的端口IP都输入一遍
动态路由重分布:安需要把RIP OSPF分别输好,在两个协议交接的机器上输入
返回上一层:exitable
进入特权模式:config terminal
设备格式化:erase startup-cofig
思科模拟器命令

1. 计算机命令:PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;同init 0 关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;删除IP地址# route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip># telnet <ip>2. 交换机支持的命令:交换机基本状态:switch: ;交换机的ROM状态rommon> ;路由器的ROM状态hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <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 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 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain <name> ;设置发vtp域名switch(config)#vtp password <word> ;设置发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> <mask> ;设置IP地址switch(config)#ip default-gateway <IP> ;设置默认网关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. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname <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> <netmask> ;设置IP地址router(config-if)#ip address <ip> <netmask> second ;设置第二个IP router(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip> <netmask> ;设置子接口IP router(config-subif.1)#encapsulation dot1q <n> ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftp router#copy startup-config tftp ;开机配置存到tftp router#copy tftp flash: ;下传文件到flash router#copy tftp startup-config ;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem:<sname> flash:<dname> ;从console传输文件rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> ;命令格式动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
思科命令大全(完整版)

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI: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-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string7.设置端口速度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}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS: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)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS: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:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道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} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority CLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds CLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocolsoff|on] 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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 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高速缓存区的内容。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1. 计算机命令:PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;同init 0 关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;删除IP地址# route add 0.0.0.0 gw <ip># route del 0.0.0.0 gw <ip># route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip># telnet <ip>2. 交换机支持的命令:交换机基本状态:switch: ;交换机的ROM状态rommon> ;路由器的ROM状态hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <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 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 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain <name> ;设置发vtp域名switch(config)#vtp password <word> ;设置发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> <mask> ;设置IP地址switch(config)#ip default-gateway <IP> ;设置默认网关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. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname <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 ;设置登录口令xxrouter(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> <netmask> ;设置IP地址router(config-if)#ip address <ip> <netmask> second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip> <netmask> ;设置子接口IProuter(config-subif.1)#encapsulation dot1q <n> ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config ;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem:<sname> flash:<dname> ;从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服务器IPrommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> ;命令格式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 <netid> ;设置发布路由router(config-router)#negihbor <ip> ;点对点帧中继用。
帧中继命令: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 ;设置为DCErouter(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 <number> permit|deny <source_ip> <wild|any> router(config)#interface <interface> ;default:deny anyrouter(config-if)#ip access-group <number> in|out ;defaultut例1:router(config)#access-list 1 deny host 10.65.1.1router(config)#access-list 1 permit anyrouter(config)#int f0/0router(config-if)#ip access-group 4 in例2:router(config)#access-list 4 permit 10.8.1.1router(config)#access-list 4 deny 10.8.1.0 0.0.0.255router(config)#access-list 4 permit 10.8.0.0 0.0.255.255router(config)#access-list 4 deny 10.0.0.0 0.255.255.255router(config)#access-list 4 permit anyrouter(config)#int f0/1router(config-if)#ip access-group 4 in扩展访问控制列表:access-list <number> permit|deny icmp <S_IP wild> <D_IP wild>[type] access-list <number> permit|deny tcp <S_IP wild> <D_IP wild>[port]例1:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any anyrouter(config)#int s0/0router(config-if)#ip access-group 101 in例2:router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80router(config)#access-list 102 permit ip any anyrouter(config)#interface s0/1router(config-if)#ip access-group 102 out删除访问控制例表:router(config)#no access-list 102router(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] <私有IP><公网IP> [port] Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1Router(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.0Router(config)#ip nat inside source list 1 pool p1Router(config)#ip nat inside destination list 2 pool p2Router(config)#ip nat inside source list 2 interface s0/0 overloadRouter(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary Router#show ip nat translationrotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。