Cisco与H3C 命令对比
- 格式:doc
- 大小:95.50 KB
- 文档页数:3
H3C和CISCO交换机常用命令及对比1.查看所有配置命令:思科show run ,华三disp cu2.查看所有接口状态:思科 show ip inter brief ,华三 display interfaces3.查看所有vlan的信息:思科 show vlan brief ,华三 display vlan all4.查看版本信息: 思科 show version ,华三 display version5.查看CPU使用信息:思科 show process ,华三 disp cpu6.查看内存使用信息:思科 show memory ,华三 disp memory7.思科交换机进入特权用户模式: enable ,进入全局配置模式: config terminal8.华三交换机进入超级用户模式: super ,进入系统视图模式: system-view9.交换机建立vlan:思科 vlan X ,华三 vlan X10.交换机删除vlan:思科 no vlan X ,华三 undo vlan X11.进入交换机端口进行配置:思科华三: interface FastEthernet 1/0/112.交换机设置指定端口为access模式:思科 switchport mode access , 华三 port link-type access13.交换机设置指定端口为trunk模式:思科 switchport mode trunk , 华三 port link-type trunk14.分配端口到指定vlan:思科 switchport access vlan X ,华三 port access vlan X15.交换机中继端口允许通过制定vlan:思科 switchport trunk allowed vlan X,华三 port trunk permit vlan X16.交换机保存配置:思科 wr ,华三 save ,PIX525防火墙 write memory17.在华三交换机端口上起认证: dot1x ,取消认证: undo dot1x18.交换机配置清空:思科在超级用户模式下erase startup-config,华三在用户视图下reset saved-configuration。
本文主要给大家详细的介绍了华为3COM和CISCO之间的IOS的区别,本文主要从安全性,IOS中文界面,配置命令等方面详细的给大家进行了描述。
以前华为公司的产品配置指令和CISCO公司的一样,但由于版权与官司的问题,华为3COM公司于2002年到2003年期间进行了IOS的升级工作,升级后的IOS与CISCO公司有很大区别。
主要表现在以下三个方面。
一、全新IOS支持中文界面:在新版IOS中用户可以选择英文或中文界面,这样对于那些英文水平不高或不习惯看英文的用户来说可以切换到中文界面,各项命令的注解一目了然。
对中文的支持显示了华为3COM公司本土化作战的目标。
二、安全级别的提高:我们先来回顾一下CISCO公司的安全级别,CISCO路由器通过模式分配权限,cisco IOS 软件将EXEC会话分为用户(USER)模式和特权(privileged)模式,另外很多配置命令还需要进入到配置模式下进行。
通过ENABLE进入特权模式,通过configure terminal进入配置模式。
华为3COM公司的IOS安全级别是基于用户的而不是基于模式的。
也就是说我们可以为一台路由器配置很多个用户,不同的用户分配不同的权限,要想进入路由器必须输入正确的用户名和密码才可以。
这一点有点类似于WINDOWS操作系统,当登录系统后要想进入桌面必须输入正确的用户名和密码。
对用户进行权限划分比划分模式更安全,更方便管理。
三、配置命令的全面变化:由于涉及到版权的问题,华为公司在此次升级IOS后对所有的配置命令也进行了很大程度的变动。
可以说现在的指令和以前的指令有天壤之别,与CISCO公司的配置命令而是相去甚远,经常配置CISCO路由器的用户初次接触华为3COM路由器会很不适应。
新旧命令变化如图所示:思科华为华为3COM和锐捷之间的命令比较CISCO 和锐捷基本上是一样的思科和H3C是完全不一样的Cisco 华为解释show display 显示no undo 删除/取消user local-user 新建用户end return 退回到系统视图exit quit 返回上级视图exit logout telnetr的退出router rip rip 启动rip router ospf ospf 启动ospf router bgp bgp 启动bgp hostname sysneme 设置主机名字access-list acl 控制访问列表write save 保存配置erase delete 删除配置0 simple 明文7 cipher 密文host ip host host名字和ip地址对应logging info-center 日志信息encapslution link-pro 封装链路层协议show version disp version 显示版本show run disp 显示当前配置current-configurationshow disp base-information 显示全面的信息tech-supportshow start disp saved-configuration 显示已保存的配置ctrl+z ctrl+z 退回到系统视图ctrl+p ctrl+p 上一条命令ctrl+n ctrl+n 下一条命令- ctrl+adisplay cur- ctrl+rdisplay ip routig-tableundebug all ctrl+d 取消所有debug命令cisco和华为命令2008-04-09 13:27CISCO交换机配置命令大全2006-2-28 14:33:001.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port][vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP 地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridgebridge-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-addressles1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-addressles2-nsap-addressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令: router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
cisco与华为命令比较功能Cisco命令华为命令进入全局模式#configure terminal <Quidway>system显示当前配置show running-config display current-configuration 显示版本信息show version display version显示vlan信息show vlan display vlan显示接口信息show interface接口display interface接口交换机路由器命名hostname主机名sysname主机名修改特权密码enable password密码(明文)enable secret密码(密文)super password密码进入接口模式interface接口interface接口进入vlan模式interface vlan vlan号interface vlan vlan号给接口配IP ip address <ip> <掩码> ip address <ip> <掩码>配telnet密码line vty 0 4password密码login user-interface vty 0 4authentication-mode passwordset authentication-mode password simple密码user privilege level 3激活端口no shutdown undo shutdown 关闭端口shutdown shutdown退出exit quit创建VLAN vlan vlan号vlan vlan号VLAN中增加端口port e0/1port e0/2 to e0/4当前端口加入到VLAN switchport access vlan vlan号port access vlan vlan号设置端口工switchport mode port link-type作模式trunk|access|dynamic trunk|access|hybrid设trunk允许的VLAN switchport trunk allowed vlanremove|add IDport trunk permit vlan ID|All指定镜像端口monitor session 1 destinationint接口monitor-port接口指定被镜像端口monitor session 1 source int接口 bothport mirror接口设置生成树启动与否spanning-tree vlan vlan号(默认开启)stp enable|disable(默认关闭)端口的聚合 interface range f0/1 – 4channel-group 1 mode on link-aggregation e0/1 to e0/4 ingress|bothundo link-aggregation e0/1|all设置主vlan isolate-user-vlan enable设置主vlan 包括的子vlan isolate-user-vlan<x> secondary <vlan-list>显示路由信息show ip route display ip route 绑定HDLC协议默认就是link-protocol hdlc设静态路由 ip route网络号掩码下一跳IP/接口ip route-static网络号掩码下一跳IP/接口启用RIP路由router rip riprip workrip inputrip output配置路由器的ID int loopback 0ip add IP地址掩码router id A.B.C.D启动OSPF协议router ospf进程号ospf enable配置OSPF区域net网络号反向掩码 area<area_id>int接口ospf enable area <area_id>标准ACL命令格式access-list列表号permit|deny源IP反向掩码acl <acl-number> [match-orderconfig|auto]rule[normal|special]{permit|deny}[source source-addrsource-wildcard|any]扩展ACL配置access-list列表号permit|deny协议源IP反向掩码目的IP反向掩码 eq端口号acl <acl-number> [match-orderconfig|auto]rule{normal|special}{permit|deny}{tcp|udp}source {<ipwild>|any}destination <ipwild>|any} eq服务名PPP设置encapsulation ppp link-protocol pppPap认证主认证方(config)#username用户名password密码(config)#int串口接口(config-if)#pppauthentication pap被认证方(config)#int串口接口(config-if)#ppp papsent-username用户名password密码主认证方local-user用户名password {simple|cipher}密码interface串口接口ppp authentication-mode pap被认证方interface串口接口ppp pap local-user用户名password {simple|cipher}密码Chap认证主认证方(config)#username客户端主机名 password密码主认证方local-user对方主机名password {simple|cipher}密码(config)#int 串口接口 (config-if)#ppp authentication(config-if)#ppp chap hostname服务器主机名 被认证方(config)#username 服务器主机名 password 密码 (config)#int 串口接口(config-if)#ppp chap hostname客户端主机名interface 串口接口ppp authentication-mode chapppp chap user 自己主机名被认证方 interface 串口接口local-user 对方主机名 password {simple|cipher}密码 ppp chap user 自己主机名静态nat (1)为内外部接口配IP 并激活; (2)在接口上启用NAT ; 内部接口:ip nat inside 外部接口:ip nat outside (3)建立静态地址转换(config)#ip nat inside sourcestatic 私有IP 公网IPinterface 接口nat server global <ip> [port] inside <ip> port [protocol]动态NAT (1)为内外部接口配IP 并激活; (2)在接口上启用NAT ; 内部接口:ip nat inside外部接口:ip nat outside(3)定义内网允许访问外网的ACL(config)#access-list 列表号 permit 源IP 反向掩码(1) 建立地址池nat address-group 公网起始IP 公网终止IP pool 1 (2)定义内网允许访问外网的ACLacl 列表号rule permit source 源IP 反向掩码 rule deny sourceany (3)实现地址转换(4)定义合法IP 地址池 (config)#ip nat pool 地址池名 公网起始IP 公网终止IP netmask 掩码(5)实现地址转换(config)#ip nat inside sourcelist 列表号 pool 地址池名int 公网接口nat outbound 列表号address-group pool 1调试命令 思科:Switch#show run 显示所有配置命令Switch#show ip inter brief 显示所有接口状态 Switch#show vlan brief 显示所有VLAN 的信息 Switch#show version 显示版本信息 华为:[Quidway]dis cur 显示所有配置命令[Quidway]display interfaces 显示所有接口状态 [Quidway]display vlan all 显示所有VLAN 的信息[Quidway]display version 显示版本信息 二、接口配置命令思科:Switch(config)#interface f0/8 进入接口视图 Switch(config-if)#no shut 此命令开启接口Switch(config-if)#description to server01 端口描述Switch(config-if)#ip add 192.168.1.100 255.255.255.0 设置接口IP 华为:[Quidway]interface e0/1 进入接口视图 [Quidway]undo shutdown 此命令开启接口[Quidway]description to server02 端口描述[Quidway]ip add 192.168.1.102 255.255.255.0 设置接口IP 三、VLAN 配置命令:思科:建立和删除VLANSwitch# vlan databaseSwitch(vlan)# vlan 20 name test20Switch(vlan)# no vlan 20Switch(vlan)# exit将端口分配给一个VLANSwitch(config)# interface f0/1Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 20设置VLAN TRUNKSwitch(config)# interface f0/24Switch(config-if)# switchport mode trunkSwitch(config-if)#switchport trunk allow vlan {ID|All}Switch(config-if)# switchport trunk encapsulation dot1q华为:建立和删除VLAN[Quidway]vlan 30[Quidway]undo vlan 30将端口分配给一个VLAN[Quidway]int ethernet0/1[Quidway-Ethernet0/1]port access vlan 30( port default vlan 30)或[Quidway]vlan 30[Quidway-vlan3]port ethernet 0/1 在VLAN中增加端口[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在VLAN中增加多个连续端口设置VLAN TRUNK[Quidway]int e0/24[Quidway-Ethernet0/24] port link-type trunk[Quidway-Ethernet0/24]port trunk permit vlan {ID|All}四、端口镜像配置思科:配置镜像源端口Switch(config)#monitor session 1 source interface gigabitEthernet 0/2 –5 rx上面命令最后一个参数:both 监听双向数据,默认为bothrx 接收tx 发送配置镜像目的端口Switch(config)#monitor session 1 destination interface gigabitEthernet 0/6删除镜像端口Switch(config)#no monitor session 1华为:将端口E0/2配置为监控端口[Quidway]monitor-port Ethernet 0/2端口E0/1配置为镜像端口[Quidway]port mirror Ethernet 0/1或者直接配置监控端口和镜像端口[Quidway]port mirror Ethernet 0/1 observing-port Ethernet 0/2删除镜像[Quidway]undo monitor-port五、冗余配置思科HSRP:Switch# interface Vlan20ip address 172.29.197.33 255.255.255.248standby 20 ip 172.29.197.53standby 20 priority 105 优先级standby 20 preempt 抢占standby 20 track GigabitEthernet0/25 decrement 10 跟踪端口如果DOWN 了优先级减10华为VRRP:[Quidway]interface Vlanif30ip address 172.29.197.9 255.255.255.248vrrp vrid 30 virtual-ip 172.29.141.11vrrp vrid 30 priority 150 优先级vrrp vrid 30 preempt-mode 抢占vrrp vrid 30 track interface GigabitEthernet0/0/18 reduced 60 跟踪端口如果DOWN了优先级减60六、设置安全远程访问思科设置vty安全访问:R1(config)# access-list 1 permit 192.168.2.5R1(config)# line vty 0 4R1(config)# access-class 1 in华为设置vty安全访问:[Quidway]acl number 2000rule 1 permit source 172.29.181.150 0rule 2 deny[Quidway]user-interface vty 0 4acl 2000 inbound七、NTP配置思科:Cisco6509#show clock 显示时间Cisco6509#clock set 14:00:00 30 Sep 2011 设置时间Cisco6509(config)#ntp server 202.198.0.102 设置与其他时间服务器同步Cisco6509(config)#clock timezone beijing +8 设置时区华为:[Quidway]dis clock 显示时间[Quidway]clock datetime 23:30:00 2011/11/16 设置时间[Quidway]ntp-service unicast-server 202.198.0.102 设置与其他时间服务器同步[Quidway]clock timezone E8 add 08:00:00 设置时区八、静态路由配置思科:ip route <目的网段> <目的网段掩码><下一跳>Cisco6509# ip route 0.0.0.0 0.0.0.0 10.65.1.2 静态路由Cisco6509#ip route 0.0.0.0 0.0.0.0 192.168.3.1 150 浮动静态路由管理距离为150华为:[Quidway] ip route-static 0.0.0.0 0.0.0.0 10.65.1.2[Quidway]ip route-static 0.0.0.0 0.0.0.0192.168.3.1 preference 150九、可网管配置思科:Switch(config)#snmp-server community sunion ro 配置本交换机的只读字串为sunionSwitch(config)#snmp-server community sunion rw 配置本交换机的读写字串为sunionSwitch(config)#snmp-server enable traps 允许交换机将所有类型SNMP Trap 发送出去Switch(config)#snmp-server host 192.168.190.1 traps sunion 指定交换机SNMP Trap的接收者为192.168.190.1,发送Trap时采用sunion作为字串华为:[Quidway]snmp-agent community read datanms 配置本交换机的只读字串为datanms[Quidway]snmp-agent community write datanms 配置本交换机的读写字串为datanms[Quidway]snmp-agent sys-info location BeiJing China 设置交换机的位置信息[Quidway]snmp-agent sys-info version all 设置交换机支持所有的SNMP协议版本[Quidway]snmp-agent target-host trap address udp-domain192.168.190.121 params securityname datanms 指定交换机SNMP Trap的接收者为192.168.190.121 ,发送Trap时采用datanms作为字串。
更新:2008/12/15設定内容を取り消すno undo 設定内容確認(但しCiscoは特権モードからのみ)show display 動作中のプロセス再起動clearresetrunning-configを表示show running-config display current-configuration startup-configを表示show startup-config display saved-configuration running-configを保存write memory savestartup-configを消去write erase delete </flash:filename>稼働中のOSのVersionを表示show versiondisplay versionconfig及びソフト、ハード両方の詳細情報を表示show tech-support display diagnostic-information enableconfigure terminal インターフェース設定モードへ移行interface <int_id>interface <int_id>telnet に関する設定line vty user-interface vty consoleに関する設定line console user-interface aux 0ホスト名設定hostnamesysname時刻の設定clock set <HH:MM:SS DD Month YYYY>clock datetime <HH:MM:SS><YYYY/MM/DD>タイムゾーンの設定clock timezone <name>clock timezone <name><add |minus><HH:MM:SS>同期するNTPサーバの指定ntp server <ip address>ntp-service unicast-server <ip address>CDP(CiscoDiscoveryProtocol)有効化cdp run-NTDP有効化-ntdp enable LLDP有効化lldp runlldp enableInfo-Center有効化-info-center enableSyslogサーバの指定logging {Hostname |ip address }出力するログのレベル選択logging trapSNMPエージェント有効化snmp-server enable snmp-agent trap enable SNMPコミュニティ名設定snmp-server communitysnmp-agent communitySNMPのプロトコルバージョン指定snmp-agent sys-info version all SNMPトラップ送信先の設定snmp-agent target-host デバッグ情報の表示debugdebuggingデバッグの停止no debug allundo debugging all インターフェース設定モードへ移行interface <int_id>interface <int_id>VLANインターフェースの作成interface <vlan_id>interface <vlan_id>Loopbackインターフェースの作成interface loopback <id>interface loopback <id>IPアドレスの付与ip address ip address インターフェースのshutdown shutdown shutdownインターフェースのupno shutdown undo shutdown インターフェースの説明文を追加descriptiondescriptionインターフェース情報参照(L2)show interface {<int_id>}display interface {<int_id>}インターフェース情報参照(L3)show ip interface {<int_id>}display ip interface {<int_id>}VLAN作成vlan <vlan_id>vlan <vlan_id>VLAN削除no vlan <vlan_id>undo vlan <vlan_id>物理ポートをアクセスポートとして設定switchport mode access port link-type access 物理ポートをトランクポートとして設定switchport mode trunkport link-type trunkトランク時のカプセル化方式選択※4-1switchport trunk encapsulation <dot1q |isl >-port access vlan <vlan_id>(I/F-View)port <int_id>(Vlan-View)トランクポートへVLANを追加switchport trunk allowed vlan <vlan_id>port trunk permit vlan <vlan_id>トランクポートへPVIDを設定※4-2switchport trunk native-vlan <vlan_id>port trunk pvid vlan <vlan_id>STPを有効化spanning-tree enablestp enable STPを無効化※5-1no spanning-tree vlan <vlan_id>undo stpSTPの動作モード選択※5-2spanning-tree mode {pvst|rapid-pvst|mst}stp mode {stp|rstp|mst}STPインスタンスのPriority設定spanning-tree mst <id>priority stp instance <id>priority STPリージョン情報設定モードへ移行spanning-tree mst configuration stp region-configuration リージョン名設定name region-name リヴィジョン番号設定revisionrevision-levelインスタンスへVLANをマッピングinstance <id>vlan <vlan_id>instance <id>vlan <vlan_id>MSTリージョン情報の設定を有効化-active region configuration STP情報の参照show spanning-treedisplay stpinfo-center loghost <ip address>snmp-server host {hostname}version <no.>H3C-Cisco コマンド対比表(Configuration Commands)switchport access vlan <vlan_id>アクセスポートへVLANを追加VLANカテゴリCisco全般目的Interface管理system-viewユーザモード→特権モードへの移行H3CSTP更新:2008/12/15channel-group <id>mode {active |passive }link-aggregation group <id>mode static channel-protocol lacp port link-aggregation group <id>link-aggregation group <id>mode manual port link-aggregation group <id>channel-group <id>mode {auto |desirable }channel-protocol pagp LAG情報の参照show etherchanneldisplay link-aggregationトラック対象のインターフェースを指定するtrack <id>interface <int_id>line-protocol vrrp vrid <group_id>track interface <int_id>{reduced <value>}VRRP有効化及びグループID、VIP設定vrrp <group_id>ip <ip-address>vrrp vrid <group_id>virtual-ip <ip-address>VRRPのPriority設定vrrp <group_id>priority <value>vrrp vrid <group_id>priority <value>切り戻り(preempt)の所要時間を指定する※7-1vrrp <group_id>preempt {delay minimum <sec>}vrrp vrid <group_id>preempt-mode timer delay トラック対象のインターフェースがダウンしたらdecremantで指定した数値だけVRRPのPriorityを下げる。
思科与H3C配置命令对⽐思科与H3C配置命令对⽐ 思科与H3C路由器的配置命令有什么不同,下⾯yjbys⼩编为⼤家⼀⼀解读! 静态路由: 静态路由(static routing)是指由⽤户或⽹络管理员⼿⼯配置的路由信息。
在早期⽹络中,⽹络的规模不⼤,路由器的数量很少,路由器也相对较⼩,通常采⽤⼿动的⽅法对每台路由器的路由表进⾏配置,即静态路由。
这种⽅法适合于在规模较⼩、路由表也相对简单的⽹络中使⽤。
它较简单,容易实现,沿⽤了很长⼀段时间。
在⼩规模的⽹络中,静态路由的优点有两点,⼀是⼿动配置,可以精确控制路由选择,改进⽹络的性能,⼆是不需要动态路由协议参与,这将会减少路由器的开销,为重要的应⽤保证带宽。
缺点是⼤型和复杂的⽹络环境通常不宜采⽤静态路由。
⼀⽅⾯,⽹络管理员难以全⾯地了解整个⽹络的拓扑结构;另⼀⽅⾯,当⽹络的拓扑结构和链路状态发⽣变化时,路由器中的静态路由信息需要⼤范围地调整,这⼀⼯作的难度和复杂程度⾮常⾼。
当⽹络发⽣变化或⽹络发⽣故障时,不能重选路由,很可能使路由失败。
下⾯具体来⽐较思科和H3C关于静态路由的配置命令。
思科静态路由配置如下: Router(config)#ip route ⽬的⽹段⼦⽹掩码下⼀跳/出接⼝ H3C 静态路由配置如下: [Switch]ip route-static ⽬的⽹段⼦⽹掩码下⼀跳/出接⼝ 注意:对于接⼝类型为⾮点对点的接⼝,不能够指定出接⼝,必须指定下⼀跳地址。
⽬的IP地址和掩码都为0.0.0.0的路由为默认路由。
OSPF: OSPF(Open Shortest Path First,开放最短路径优先)是IETF 开发的基于链路状态的⾃治系统内部路由协议。
与距离⽮量协议不同,链路状态路由协议使⽤Dijkstra的'最短路径优先算法(SPF)计算和选择路由。
这类路由协议关⼼⽹络中链路或接⼝的状态,每个路由器将其已知的链路状态向该区域的其他路由器通告,通过这种⽅式,⽹络上的每台路由器对⽹络结构都会有相同的认识。
思科Cisco 华为3COM 功能enable system-view 进入特权模式configure terminal \ 进入配置状态show display 显示show running-config display current 显示目前的运行配置show version disp version 显示版本show start disp saved 显示已保存的配置show tech-support disp base-information 显示全面的信息no undo 取消(删除)hostname sysname 更改机器名\ lang chinese 进入中文状态user local-user 新建修改用户end return 退回到系统视图exit quit 返回上级视图exit logout telnet退出router rip rip rip动态路由router ospf ospf ospf路由router bgp bgp bgp路由write save 保存配置erase delete 删除配置0 simple 明文7 cipher 密文access-list acl 控制访问列表host ip host host和ip名字对应logging info-center 日志信息encap link-protocol 封闭链路层协议no debug all ctrl+d 取消所有debug命令vlan database vlan 进入vlan的配置vtp trunk trunk 设置成为骨干端口mode \ 模式trunk 相同主干线switchport port 接口控制access 相同访问ip dhcp dhcp 设置dhcp服务器功能思科华为命令对照表思科华为show displayshow version disp versionno undoshow run disp current-configuration username local-userend returnshow start disp saved-configurationexit quitexit logoutctrl+z quitrouter rip riprouter ospf ospfrouter bgp bgphostname sysnameaccess-list aclwrite saveerase delete0 simple7 cipherlogging info-centerencapsulation link-protocol例子:sysname Huawei-R2831 \\设置主机名interface Ethernet 0/0 进入接口模式description T0 Switch-A \\接口描述ip address 192.168.10.222 255.255.255.0 \\配置接口IP地址undo shutdown \\启用接口local-user huawei \\建立用户名huaweipassword simple huawei \\设置密码为huaweiservice-type telnet \\服务类型为telnetuser-interface vty 0 4 \\进入telnet通道,设置5个用户可以同时登陆authentication-mode scheme \\设置telnet的模式为本地用户名与密码登陆user-interface console 0 设置console密码authentication-mode password 密码认证set authentication password simple huaweisuper password simple huawei \\设置super密码,display version \\查看VRP软件版本display current-configuration \\查看当前运行的配置display saved-configuration \\查看已保存过的配置display interface Ethernet 0/0 \\查看接品参数display brief interface \\查看接口基本状态sysname Huawei-R2831 \\设置主机名interface Ethernet 0/0 进入接口模式description T0 Switch-A \\接口描述ip address 192.168.10.222 255.255.255.0 \\配置接口IP地址undo shutdown \\启用接口local-user huawei \\建立用户名huaweipassword simple huawei \\设置密码为huaweiservice-type telnet \\服务类型为telnetuser-interface vty 0 4 \\进入telnet通道,设置5个用户可以同时登陆authentication-mode scheme \\设置telnet的模式为本地用户名与密码登陆user-interface console 0 设置console密码authentication-mode password 密码认证set authentication password simple huaweisuper password simple huawei \\设置super密码,display version \\查看VRP软件版本display current-configuration \\查看当前运行的配置display saved-configuration \\查看已保存过的配置display interface Ethernet 0/0 \\查看接品参数display brief interface \\查看接口基本状态。