switch命令大全

switch命令大全
1.switch(config)# hostname hostname 

在基于CLI的交换机上设置主机名/系统名: 

switch(enable) set system name name-string 

2.在基于IOS的交换机上设置登录口令: 

switch(config)# enable password level 1 password 

在基于CLI的交换机上设置登录口令: 

switch(enable) set password 

switch(enable) set enalbepass 

3.在基于IOS的交换机上设置远程访问: 

switch(config)# interface vlan 1 

switch(config-if)# ip address ip-address netmask 

switch(config-if)# ip default-gateway ip-address 

在基于CLI的交换机上设置远程访问: 

switch(enable) set interface sc0 ip-address netmask broadcast-address 

switch(enable) set interface sc0 vlan 

switch(enable) set ip route default gateway 

4.在基于IOS的交换机上启用和浏览CDP信息: 

switch(config-if)# cdp enable 

switch(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-string 

6.在基于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 database 

switch(vlan)# vlan vlan-num name vla 

switch(vlan)# exit 

switch# configure teriminal 

switch(config)# interface interface module/number 

switch(config-if)# switchport mode access 

switch(config-if)# switchport access vlan vlan-num 

switch(config-if)# end 

在基于CLI的交换机上配置静态VLAN: 

switch(enable) set vlan vlan-num [name name] 

switch(enable) set vlan vlan-num mod-num/port-list 

9. 在基于IOS的交换机上配置VLAN中继线: 

switch(config)# interface interface mod/port 

switch(config-if)# switchport mode trunk 

switch(config-if)# switchport trunk encapsulation {isl|dotlq} 

switch(config-if)# switchport trunk allowed vlan remove vlan-list 

switch(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 database 

switch(vlan)# vtp domain domain-name 

在基于CLI的交换机上配置VTP管理域: 

switch(enable) set vtp [domain domain-name] 

11.在基于IOS的交换机上配置VTP 模式: 

switch# vlan database 

switch(vlan)# vtp domain domain-name 

switch(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 database 

switch(vlan)# vtp v2-mode 

在基于CLI的交换机上配置VTP版本: 

switch(enable) set vtp v2 enable 

13. 在基于IOS的交换机上启动VTP剪裁: 

switch# vlan database 

switch(vlan)# vtp pruning 

在基于CL I 的交换机上启动VTP剪裁: 

switch(enable) set vtp pruning enable 

14.在基于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 cost 

switch(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}priority 

switch(enable) set spantree portvlanpri {module/port}priority [vlans] 

17. 在基于IOS的交换机上修改STP时钟: 

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds 

switch(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-name 

21. 为了从一条中继链路上删除VLAN,可使用下列命令: 

switch(enable) clear trunk module/port vlan-range 

22. 用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-num 

26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: 

switch(enable) set vlan vlan-num mod-num/port-num 

27. 命令show spantree显示一个交换机端口的STP状态. 

28. 配置一个ELAN的LES和BUS,可以使用下列命令: 

ATM (config)# interface atm number.subint multioint 

ATM(config-subif)# lane serber-bus ethernet elan-name 

29. 配置LECS: 

ATM(config)# lane database database-name 

ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address 

ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address 

ATM(lane-config-databade)# name … 

30. 创建完数据库后,必须在主接口上启动LECS.命令如下: 

ATM(config)# interface atm number 

ATM(config-if)# lane config database database-name 

ATM(config-if)# lane config auto-config-atm-address 

31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: 

ATM(config)# interface atm number.subint multipoint 

ATM(config)# lane client ethernet vlan-num elan-num 

32. 用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 terminal 

router(config)# interface media module/port 

router(config-if)# description description-string 

router(config-if)# ip address ip-addr subnet-mask 

router(config-if)# no shutdown 

38. 用中继链路来建立与VLAN的连接: 

router(config)# interface module/port.subinterface 

router(config-ig)# encapsulation[isl|dotlq] vlan-number 

router(config-if)# ip address ip-address subnet-mask 

39. 用LANE 来建立与VLAN的连接: 

router(config)# interface atm module/port 

router(config-if)# no ip address 

router(config-if)# atm pvc 1 0 5 qsaal 

router(config-if)# atm pvc 2 0 16 ilni 

router(config-if)# interface atm module/port.subinterface multipoint 

router(config-if)# ip address ip-address subnet-mask 

router(config-if)# lane client ethernet elan-num 

router(config-if)# interface atm module/port.subinterface multipoint 

router(config-if)# ip address ip-address subnet-name 

router(config-if)# lane client ethernet elan-name 

router(config-if)# … 

40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: 

router(config)# ip routing 

router(config)# router ip-routing-protocol 

router(config-router)# network ip-network-number 

router(config-router)# network ip-network-number 

41. 配置默认路由: 

switch(enable) set ip route default gateway 

42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令: 

router(config)# interface interface number 

router(config-if)# mls rp vlan-id vlan-id-num 

43. 在路由处理器启用MLSP: 

router(config)# mls rp ip 

44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: 

router(config)# interface interface number 

router(config-if)# mls rp vtp-domain domain-name 

45. 查看指定的VTP域的信息: 

router# show mls rp vtp-domain vtp domain name 

46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: 

router(config-if)#mls rp management-interface 

47. 要检验MLS-RP的配置情况: 

router# show mls rp 

48. 检验特定接口上的MLS配置: 

router# show mls rp interface interface number 

49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表: 

set mls flow [destination|destination-source|full] 

50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令: 

router(config)# mls rp ip input-acl 

网管如何从繁入简 

--------------------------------------------------------------------------------


网管如何从繁入简 

在谈到辽宁移动网络管理最大的特点时,辽宁移动通信有限责任公司网络部主任孟鑫说:“辽宁移动的网络环境,恐怕是中国目前最为复杂的。”如何把这么复杂的网络简单的管理起来,成为辽宁移动当务之急。 

网络环境复杂
作为中国移动在辽宁的子公司,辽宁移动的主要业务包括移动通信、传输、数据通信等,其业务覆盖15万平方公里,并通过OSS(运作支持系统)为近600万的GSM用户服务。辽宁移动的整个网络体系由七个设备供应商所提供的传输器、GSM、GRPS、IP、IN和网络同步结构组成,而且分别基于Q3/CMIP、CORBA、SNMP 和ACSII等不同界面。因此,辽宁移动的网管人员不得不通过每个厂商所提供的OMC或者EMS系统来管理不同的设备。这不仅为网管人员的工作带来极大困扰,也直接制约了辽宁移动业务的发展。 

在辽宁移动对网管前景的规划中,包括了两层含义:一是省级的综合网管平台,能够确保传输、IP、GSM、同步网等业务的顺利运行;二是未来的网管,要从目前的网络层管理,逐步走向业务层、商务层管理,提高服务水准和市场决策能力。为此,他们选择了中国惠普公司作为辽宁移动网管项目的供应商。惠普的项目小组在接到任务以后,详细分析了辽宁移动网管所面临的问题和用户需求: 

首先,多厂商网络环境迫使辽宁移动不得不安排网管人员进行OMC/EMS知识的特别培训,既增加了管理的难度,也提高了管理成本;

第二,其中的部分OMC/EMS系统并不能提供或者只能提供很少的性能管理功能,甚至还有一些设备根本无法得到有效的管理,因而不能迅速、及时地发现和解决网络可能出现的故障,直接影响服务质量;

第三,辽宁移动网络环境的成长速度很快,例如其中已经包括了GPRS和覆盖IT服务的WAP等业务,因此他们希望能够通过一个完整、直观的视图,对整个基础架构进行故障管理和性能管理;

第四,辽宁移动希望使用一个基于标准的商业软件产品,而不是像有的移动运营商那样选择本地定制的解决方案。因为他们认为,商业软件产品不仅能够降低开发难度、减少培训时间、节省开发和维护成本,更重要的是,它拥有比定制方案更长的产品生命周期,能够满足未来不断增加的新业务需求。在辽宁移动确认了这些需求以后选择了惠普的电信管理信息平台HP OpenView TeMIP。

十个月实施完毕
HP OpenView TeMIP解决方案在10个月内实施完毕。在整个项目实施过程中,惠普向辽宁移动提供了所有TeMIP培训需求,其中包括TeMIP.产品介绍、TeMIP.管理、TeMIP.CAT工具包、TeMIP.OSI工具包、Visula TeMIP和TeMIP IST工具包。同时,惠普还提供了当地及远程的TeMIP发展支持、解决故障和安装的支持。

现在,HP OpenView TeMIP解决方案已经成功地运行在辽宁移动七家设备供应商的不同界面上,覆盖了GSM、GPRS 和 IP等业务的网络,并计划管理SS7、传输和今后的SDH环境。目前,辽宁移动的网管人员在这个统一的网络管理解决方案的帮助之下,每天处理大约2万个警报。同时,随着辽宁移动网络规模和客户数量的不断增长,网管人员还可以实时地看到网络服务的状况,清楚地掌握网络的局部情况,并对问题进行及时处理。

在采访中,辽宁移动的网管人员也从技术的角度谈到了他们最终决定选择HP OpenView TeMIP解决方案的原因:作为一个以目标为导向的解决方案,TeMIP符合TMN标准,能够在很短的时间内处理大量的警报数据,具有灵活、快速的整合能力和分布式功能,利用它所提供的开发工具(GAT, OSI TOOLKIT, API),可以缩短开发时间。孟鑫说:“TeMIP解决方案,是惠普公司基于对标准的电信管理网络理论(如TMN)所拥有的长期经验基础上提供的高质量产品。我们尤其对TeMIP的警报处理功能、以及系统框架允许我们进行模块开发的功能留下了深刻印象。”

应用效果
现在,网管人员仅仅需要培训和使用TeMIP,就能够管理他们整个的网络设备,不再需要去了解每一个单独的OMC/EMS系统。而TeMIP单一通用的GUI系统,可以帮助他们进行故障管理、配置管理和性能管理。当然,作为一个关键业务系统,强有力的支持服务也是必不可少。HP OpenView TeMIP支持服务中心已经成为辽宁移动坚强的技术后盾。

Cisco3640路由器设置 
--------------------------------------------------------------------------------

http://www.net130.com   发布日期:2004-5-12 浏览次数:40581 
  

一、 设置路由器管理信息 
1、 用扁平控制线接上9孔接头,连接CONSOLE到终端或PC串口,设置终端或直接连至串口的超级终端的参数:BAND率9600,无奇偶校验,8位数据位,1位停止位. 
2、 路由器上电,终端屏幕会显示上电过程。 
3、 进入特权模式设置口令 
line vty 0 4 
password bc123 
exit 
enable secret bc123fzq123 
exit 
4、 在特权模式设置路由器信息: 
hostname bc3640 
ip domain-list jzl.cq 
ip domain-list jz2.cq 
ip domain-name jzl.cq 
ip name-sever 10.54.34.1 
5、 进入全局模式,配置以太网地址 
configure timinal 
interface fastethernet 0/0 
ip address 192.168.254.254 255.255.255.0 
no shutdown 
exit 
interface fastethernet 1/0 
ip address 10.154.34.253 255.255.255.252 
noshut down 
exit 
设置IP路由功能开放 
ip routing 
设置拨入客户名和口令 
username user1 password 123 
设置拨号组参数,为拨号客户指定ip地址 
line 65 72 
autoselect ppp 
modem inout 
transport inputall 
exit 
interface group-async1 
ip unnumbered fastethernet 1/0 
encapsulation ppp 
dialer in band 
dialer map ip 10.154.34.247 name user 1 
async default routing 
anync mode interactive 
peer default ip address pool default 
ppp authentication chap pap 
group-ranger 65 72 ;路由器远程拨入端口 
设置内部ospf路由协议、静态路由 
access-list 77 permit 10.154.34.0 0.0.1.255 
router ospf 110 
redistribute connected subnets 
redistribute static subnets 
passive-interface fastethernet 0/0 
network 10.154.34.0 0.0.255 area 0 
network 10.154.35.0 0.0.0.255 area 0 
distribute-list 77 out 
exit 

ip default-gateway 10.154.34.254 
Ip router 0.0.0.0 0.0.0.0 10.154.34.254 
Ip router 10.0.0.0 255.0.0.0 10.154.34.254 
Ip router 192.168.0.0 255.255.0.0 192.168.254.1 
设置NAT转换 
access-list 99 deny 192.168.3.1 
access-list 99 permit 192.168.3.0 0.0.0.255 
access-list 99 permit 192.168.0.0 0.0.255.255 
ip nat pool netdyn 10.154.35.1 10.154.35.126 netmask 255.255.255.0 
ip nat inside source list 99 pool netdyn overload 
ip nat inside source static 192.168.3.1 10.154.35.1 
interface fastethernet1/0 
ip nat outside 
exit 
interface group-async1 
ip nat outside 
exit 
interface fastethernet 0/0 
ip nat insider 
exit 
write memory 
二、 CISCO路由器广域网配置向导 
1、 dial-on demand routing (ddr)是用公共电话网提供了网络连接。通常的,广域网大多数使用专线连接的,路由器连接到类似MODEM OR ISDNTAS 的数据终端DCE设备上,他们支持同步V.25BITS协议,你可以用SCRIPTS AND DIALER命令设定拨号串。 
DDR比较适用于用户对数率要求不高,偶尔有数据传输或只是在特定时候传输数据,比如银行每晚传送报表等等情况下。 
当一个感兴趣的包到达路由器时,产生一个DDR请求,路由器发送呼叫建立信息给指定的串口的DCE设备,这个呼叫就把本地的和远程的设备连接起来,一旦没有数据传输,空闲时间开始记时,超过设置的记时时间,连接终止。DDR现在都用静态路由来传输数据,避免路由交换引起的DDR拨号。 
和XNS可以通过DDR路由寻址,同步串口,异步串口和ISDN端口可以配置成到一个或多个目的地的DDR连接。 
下面是一个典型的DDR连接: 
在配置DDR过程中,我们可以把一个或几个物理端口配置成一个逻辑拨号接口,他可以是同步V.25方式,同步DYR启动拨号或异步CHATSCRIPT方式 
在端口配置模式下: 
在一个端口激活DIAL-ON-DEMAND ROUTING 
命令:dialer in-band 
指定一个端口为拨号访问组:dialer-group group-number 
指定一个单一电话号码:dialer string dialer-string 
断线前空前等待时间:dialer idle-time seconds 
定义一个或多个目的电话号码表: 

dialer map protocol net-hop-addre



本文转自 wwwzbx 51CTO博客,原文链接:http://blog.51cto.com/wwwzbx/2961,如需转载请自行联系原作者

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值