求cisco配置命令手册(越完善越好,光有最简单基本命令的你可以不用进来了)

如题所述

OSPF:详细步骤 1.配置基本配置2.配置IP R1: R1(config)#interface loopback 0 R1(config-if)#ip address 10.1.1.1255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface loopback 1 R1(config-if)#ip address 10.1.2.1255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface loopback 2 R1(config-if)#ip address 10.1.3.1255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface serial 0/0 R1(config-if)#ip address 1.1.1.1255.255.255.0 R1(config-if)#no shutdown R1(config-if)#clock rate 64000 R2: R2(config-if)#interface serial 1 R2(config-if)#ip address 1.1.1.2255.255.255.0 R2(config-if)#no shutdown R2(config-if)#interface serial 0 R2(config-if)#ip address 1.1.2.1255.255.255.03.通告网络: R1: R1(config)#router ospf 100 R1(config-router)#network 1.1.1.10.0.0.0 area 10 R1(config-router)#network10.1.1.0 0.0.0.255 area 10 R1(config-router)#network 10.1.2.00.0.0.255 area 10 R1(config-router)#network 10.1.3.00.0.0.255 area 10 5.发布 R4: R4(config)#router ospf 100 R4(config-router)#redistribute rip R4(config-router)#exit6.虚电路:做此步时需确定最高路由ID R4: R4(config)#router ospf 100 R4(config-router)#area 20 virtual-link 1.1.3.1 R4(config-router)#exit7.路由汇总一个区域D位置总汇,为节省资源 R2: R2(config)#router ospf 100 R2(config-router)#area 10 range 10.1.0.0255.255.248.0 R2(config-router)#exit8.存根区域(两边都要做) R1: R1(config)#router ospf 100 R1(config-router)#area 10 stub R2: R2(config)#routerospf 100 R2(config-router)#area 10 stub9.完全存根区域(在区域的出口位置做) R2: R2(config)#router ospf 100 R2(config-router)#area 10 stub no-summary rip:详细步骤debug ip rip (启用抓包工具)un all (关闭抓包工具)show running-config (查看当前运行的配置)show ip route (查看路由表)clear ip route * (清除路由表)1.配置基本配置 2.配置IP R1: R1(config)#interface loopback 0 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface loopback 1 R1(config-if)#ip address 172.16.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface serial 0/1 R1(config-if)#ip address 1.1.1.1255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface ethernet 0/0 R1(config-if)#ip address 1.1.3.1255.255.255.0 R1(config-if)#no shutdown R2: R2(config)#interface loopback 0 R2(config-if)#ip address 172.16.2.1 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#interface loopback 1 R2(config-if)#ip address 192.168.2.1 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#interface serial 1/6 R2(config-if)#ip address 1.1.1.2255.255.255.0 R2(config-if)#no shutdown R2(config-if)#interface serial 1/7 R2(config-if)#ip address 1.1.2.1255.255.255.0 R2(config-if)#no shutdown3.通告有类网络: R1: R1(config)#route rip R1(config-router)#network 1.0.0.0 R1(config-router)#network 172.16.0.0 R1(config-router)#network 192.168.1.0R2: R2(config)#route rip R2(config-router)#network 1.0.0.0 R2(config-router)#network 172.16.0.0 R2(config-router)#network 192.168.2.04.进入版本2R1: R1(config)#route rip R1(config-router)#version2 (版本2) R1(config-router)#no auto-summary(不自动整合) R1(config-router)#end R1#clear iproute *(清除所有路由)R2: R2(config)#route rip R2(config-router)#version 2 (版本2) R2(config-router)#no auto-summary(不自动整合) R2(config-router)#end R2#clear iproute *(清除所有路由)4.版本学习(连接R1,R2的分别发送和接收) R1: R1(config)#interface serial 1/6 R1(config-if)#ip rip send version 1 2 (发送版本1和2) R1(config-if)#ip rip receive version 1 2 (接受版本1和2) R1(config)#interface serial 1/7 R1(config-if)#ip rip send version 1 2 (发送版本1和2) R1(config-if)#ip rip receive version 1 2 (接受版本1和2) 5.定义密钥(定义密钥只需配置其相连接的两个设备,另外一个无须配置) R2: R2#configureterminal R2(config)#key chain wisdom(定义密钥名称为wisdom) R2(config-keychain)#key 1 (第一组密钥) R2(config-keychain-key)#key-string cisco(定义密码密钥为cisco) R2(config-keychain-key)#interface serial 1/6 R2(config-if)#ip rip authencation key-chain wisdom(绑定密钥到端口) R2(config-if)#ip rip authencation mode md5(进行md5验证) R1: R1#configureterminal R1(config)#key chain wisdom(定义密钥名称为wisdom) R1(config-keychain)#key 1 (第一组密钥) R1(config-keychain-key)#key-stringcisco(定义密码密钥为cisco) R1(config-keychain-key)#interface serial 0/1 R1(config-if)#ip rip authencation key-chain wisdom(绑定密钥到端口) R1(config-if)#ip rip authencation mode md5(进行md5验证) VLAN:详细步骤测试:各网络段IP互通既实验成功准备设备:一个路由器和两个交换机(路由器串联到其中一个交换机,此交换机再串联到下一个交换机),各交换机上各连接4台PC机1.配置基本配置2.先配置交换机SW1: SW1#vlandatabase ---------------------进入vlan配置模式SW1(vlan)#vtp domain wisdom-----------设置vtp域名为wisdomSW1(vlan)#vtp password cisco----------设置vtp密码为ciscoSW1(vlan)#vtp server------------------设置vtp模式为服务器模式SW1(vlan)#vtp pruning-----------------启用vtp修剪(模拟器中无需此命令) SW1(vlan)#vlan 10 name Sales1-----------创建vlan10的并命名为sales1SW1(vlan)#vlan 20 name Sales2 -----------创建vlan20命名为Sales2SW1(vlan)#vlan 30 name Sales3----------创建vlan30命名为Sales3SW1(vlan)#exit-------------------------保存并退出SW1(config)#interface fastethernet 0/23------进入快速以太网0号插槽23号端口SW1 (config-if)#switchport modetrunk---------------------设置该端口为trunk模式SW1(config-if)#switchport trunkencapsulation dot1q------设置该端口的干线封装模式为dot1qSW1(config)#interface fastethernet 0/24------进入快速以太网0号插槽24号端口SW1 (config-if)#switchport modetrunk---------------------设置该端口为trunk模式SW1(config-if)#switchport trunkencapsulation dot1q------设置该端口的干线封装模式为dot1qSW2:SW1#vlan database---------------------进入vlan配置模式SW2(vlan)#vtp domain wisdom-----------设置vtp域名为wisdomSW2(vlan)#vtp password cisco----------设置vtp密码为ciscoSW2(vlan)#vtp client------------------设置vtp模式为客户端模式SW2(vlan)#vtp pruning-----------------启用vtp修剪(模拟器中无需此命令)SW2(vlan)#exit-------------------------保存并退出SW2(config)#interface fastethernet 0/24------进入快速以太网0号插槽24号端口SW2 (config-if)#switchport modetrunk---------------------设置该端口为trunk模式SW2(config-if)#switchport trunkencapsulation dot1q------设置该端口的干线封装模式为dot1q3.端口分配vlanSW1: SW1(config)#interface range fastethernet 0/1- 5----进入快速以太网的0号插槽1和5号端口SW1(config-if)#switchport modeaccess----------设置该端口为静态vlan访问模式SW1(config-if)#switchport accessvlan 10---------将此端口分配给vlan10SW1(config)#interfacerange fastethernet 0/6 – 10进入快速以太网的0号插槽6和10号端口SW1(config-if)#switchportmode access----------设置该端口为静态vlan访问模式SW1(config-if)#switchportaccess vlan 20---------将此端口分配给vlan20SW1(config)#interfacerange fastethernet 0/11 - 15进入快速以太网的0号插槽11和15号端口SW1(config-if)#switchportmode access----------设置该端口为静态vlan访问模式SW1(config-if)#switchportaccess vlan 30---------将此端口分配给vlan30SW1(config)#interfacerange fastethernet 0/16 - 20进入快速以太网的0号插槽16和20号端口SW1(config-if)#switchportmode access----------设置该端口为静态vlan访问模式SW1(config-if)#switchportaccess vlan 40---------将此端口分配给vlan40SW2: SW2(config)#interface range fastethernet 0/1- 5----进入快速以太网的0号插槽1和5号端口SW2(config-if)#switchport modeaccess----------设置该端口为静态vlan访问模式SW2(config-if)#switchport accessvlan 10---------将此端口分配给vlan10SW2(config)#interface range fastethernet0/6 – 10进入快速以太网的0号插槽6和10号端口SW2(config-if)#switchport modeaccess----------设置该端口为静态vlan访问模式SW2(config-if)#switchport accessvlan 20---------将此端口分配给vlan20SW2(config)#interfacerange fastethernet 0/11 - 15进入快速以太网的0号插槽11和15号端口SW2(config-if)#switchportmode access----------设置该端口为静态vlan访问模式SW2(config-if)#switchportaccess vlan 30---------将此端口分配给vlan30SW2(config)#interfacerange fastethernet 0/16 - 20进入快速以太网的0号插槽16和20号端口SW2(config-if)#switchportmode access----------设置该端口为静态vlan访问模式SW2(config-if)#switchportaccess vlan 40---------将此端口分配给vlan402.配置路由器RT(config)#interfacefastethernet 0/0---------------------进入快速以太网的0号模块0号接口RT(config-if)#noip address---------------------------------------------------删除该接口的IP地址RT(config-if)#noshutdown-----------------------------------------------------启用该接口RT(config-if)#exit------------------------------------------------------------保存并退出RT(config)#interfacefastethernet 0/0.10进入快速以太网的0号模块的0号接口的10号子接口RT(config-subif)#encapsulationdot1q 10------将该子接口以dot1q标准封装给VLAN10RT(config-subif)#ipaddress 192.168.1.254 255.255.255.0将该子接口设置IP地址192.168.1.254 RT(config-subif)#exit---------------------------------------------------------保存并退出RT(config)#interfacefastethernet 0/0.20-------进入快速以太网0号模块0号接口的20号子接口RT(config-subif)#encapsulationdot1q 20------------将该接口以 dot1q标准封装给VLAN20RT(config-subif)#ipaddress 192.168.2.254 255.255.255.0将该子接口设置IP地址192.168.2.254RT(config-subif)#exit---------------------------------------------------------保存并退出RT(config)#interfacefastethernet 0/0.30进入快速以太网接口的0号模块0号接口的30号子接口RT(config-subif)#encapsulationdot1q 30---------------将该接口以dot1q标准封装给VLAN30RT(config-subif)#ipaddress 192.168.3.254 255.255.255.0将该子接口设置IP地址为192.168.3.254RT(config-subif)#exit---------------------------------------------------------保存并退出RT(config)#interfacefastethernet 0/0.40---进入快速以太网0号模块0号接口的40号子接口RT(config-subif)#encapsulationdot1q 40------------------将该接口以dot1q标准封装给VLAN40RT(config-subif)#ipaddress 192.168.4.254 255.255.255.0将该子接口设置IP地址为192.168.4.254RT(config-subif)#exit---------------------------------------------------------保存并退出因字数有限,所以不能全列全!
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-07-31
楼主,你还是去买本书看看吧,Cisco设备型号那么多,很多型号命令也有差别的。