思科和华为交换机命令对比
思科和华为交换机应该是网络项目中大家接触比较多的了,这两种交换机的常用命令各有不同,本文结合网络项目中两种交换机的常用命令从对比的角度帮助大家来学习。
一、调试命令
思科:
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配置命令:
思科:
建立和删除VLAN
Switch# vlan database
Switch(vlan)# vlan 20 name test20
Switch(vlan)# no vlan 20
Switch(vlan)# exit
将端口分配给一个VLAN
Switch(config)# interface f0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 20
设置VLAN TRUNK
Switch(config)# interface f0/24
Switch(config-if)# switchport mode trunk
Switch(config-if)#switchport trunk allow vlan {ID|All}
Switch(config-if)# switchport trunk encapsulation dot1q
华为:
建立和删除VLAN
[Quidway]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 监听双向数据,默认为both
rx 接收
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 Vlan20
ip address 172.29.197.33 255.255.255.248
standby 20 ip 172.29.197.53
standby 20 priority 105 优先级
standby 20 preempt 抢占
standby 20 track GigabitEthernet0/25 decrement 10 跟踪端口如果DOWN了优先级减10
华为VRRP:
ip address 172.29.197.9 255.255.255.248
vrrp vrid 30 virtual-ip 172.29.141.11
vrrp 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.5
R1(config)# line vty 0 4
R1(config)# access-class 1 in
华为设置vty安全访问:
[Quidway]acl number 2000
rule 1 permit source 172.29.181.150 0
rule 2 deny
[Quidway]user-interface vty 0 4
acl 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.0 192.168.3.1 preference 150
九、可网管配置
思科:
Switch(config)#snmp-server community sunion ro 配置本交换机的只读字串为sunion
Switch(config)#snmp-server community sunion rw 配置本交换机的读写字串为sunion
Switch(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-domain 192.168.190.121 params securityname datanms 指定交换机SNMP Trap的接收者为192.168.190.121 ,发送Trap时采用datanms作为字串
好了,通过以上九点的举例,相信大家对项目中两种交换机的常用命令应该比较清晰了,当然更多的命令使用和技巧需要我们不断的积累。
华为思科命令比较
Cisco_H3C命令对照 思科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 dis diagnostic-information 显示全面的信息no undo 取消(删除) hostname sysname 更改机器名 \ lang chinese 进入中文状态 user local-user 新建修改用户 end return 退回到特权模式 exit quit 返回上级视图 exit quit 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 接口控制
华为交换机配置命令手册及实验
华为交换机配置命令手 册及实验 Huawei 交换机配置命令手册: 1、开始 建立本地配置环境,将主机的串口通过配置电缆与以太网交换机的Console 口连接。在 主机上运行终端仿真程序(如Windows 的超级终端等),设置终端通信参数为:波特 率为9600bit/s、8 位数据位、1 位停止位、无校验和无流控,并选择终端类型为 VT100。 以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如
(5)VLAN 接口视图(配置VLAN 和VLAN 汇聚对应的IP 接口参数)[Quidway-Vlan- interface1]:在系统视图下键入interface vlan-interface 123 (6)本地用户视图(配置本地用户参数)[Quidway-luser-user1]:在系统视图下键入 local- user user1 (7)用户界面视图(配置用户界面参数)[Quidway-ui0]:在系统视图下键入user-interface 3、其他命令 设置系统时间和时区
思科华为命令对照大全
目录第一章VTP协议 第二章 STP协议 第三章三层交换机的配置 第六章PPP协议 第八章OSPF 基本概念及单区域配置第九章 OSPF的多区域配置 第十章OSPF高级配置 第十一章热备份路由协议HSRP 第十二章访问控制列表ACL 第十三章网络地址转换NAT 第十四章IPSec VPN的配置 第十五章WLAN和VoIP 第十六章IPv6配置 一、交换机部分 二、路由器部分 ★华为命令集
ATEN命令汇总一 第一章VTP协议 Switch(config)#vtp domain (name)设置VTP域名 Switch(config)#vtp mode server/transparent/client设置VTP模式,服务/透明/客户/ Switch(config)#vtp password 123 设置VTP密码 Switch(cofnig)#vtp pruning 设置VTP修剪 Switch#show vtp status 查看VTP状态信息 Switch#show vlan brief 查看VLAN信息 ================================================== ============================================= 第二章 STP协议 Switch(cofnig)#spanning-tree vlan 1 启用生成树 Switch(config)#spanning-tree vlan 2 root primary / secondary 配置交换机为根网桥、主要的/次要的 Switch(config)#spanning-tree vlan 2 priority 8192 修改交换机的优先级 Switch(config-if)#spanning-tree vlan 2 cost 100/19/4/2 修改端口路径成本 Switch(config-if)#spanning-tree vlan 2 port-priority 50 修改端口路径优先级(端口十进制取值0~255,默认值事128) Switch(config)#spanning-tree uplinkfast 配置上行速链路 Switch(config)#interface range f0/1 - 20 (为除TRUNK链路外的接口配速端口)Switch(config-if)#spanning-tree portfast 配置速端口 Switch#show spanning-tree 查看生成树信息(在小凡模拟器上show spanning-tree br) 以太网通道配置 Switch(config)#interface range fasteternet 0/1 - 2 (为1、2端口配置以太网端口Switch(config-if-range)#channel-group 1 mode on (把绑在一起成为组1 Switch#show etherchannel 1 summary 查看以太网通道的配置是否正确 ================================================== ============================================= 第三章三层交换机的配置 1、在3层交换机上启动路由,否则3层交换不具有路由功能 switch(config)#ip routing 2、配置VLAN的IP地址 switch(config)#interface vlan 1 因为3层交换机支持各VLAN间的路由,因此每个VLAN都可以配置IP地址 switch(config-if)#ip address 192.168.1.1 255.255.255.0 switch(config-if)#no shutdown 3、查看FIB表 switch #show ip cef
华为,中兴_思科命令对比
华为,思科,中兴基本交换机命令 [Quidway]super password 修改特权用户密码switch(config)#enable password *** 思科交换机设置特权模式密码[Quidway]sysname *** 交换机命名 switch(config)#hoatname *** 思科交换机命名[Quidway]interface ethernet 0/1 进入接口视图Switch(config)#interface f0/1 [Quidway]interface vlan x 进入接口视图Switch(config)#interface vlan 1 [Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关Router(config)#ip route 0.0.0.0 0.0.0.0 10.65.1.2 默认路由[Quidway]user-interface vty 0 4 [S3026-ui-vty0-4]authentication-mode password [S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3 Switch(config)#line vty 0 4 Switch(config-line)#password [Quidway-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态Switch(config-if)#duplex ? auto Enable AUTO duplex configuration full Force full duplex operation half Force half-duplex operation [Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率Switch(config-if)#speed ? 10 Force 10 Mbps operation 100 Force 100 Mbps operation auto Enable AUTO speed configuration [Quidway-Ethernet0/1]flow-control 配置端口流控 [Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX 状态平接或扭接 [Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式 [Quidway-Ethernet0/1]shutdown 关闭/重起接口[Quidway-Ethernet0/2]quit 退出系统视图 [Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式Switch#vlan database Switch(vlan)#vlan 2 或 Switch#configure terminal
思科和H3C常用配置详细对比
cisco与华为命令比较 功能Cisco命令华为命令 进入全局模 式 #configure terminal
(完整版)思科与华为命令区别.doc
功能Cisco 命令华为命令 进入全局模式#configure terminal
思科华为命令对照表
思科华为 show display show version display version no undo no shutdown undo shutdown configure terminal system-view show run display current-configuration username local-user line user-interface end return show start disp saved-configuration exit quit router rip rip router ospf ospf router bgp bgp hostname sysname access-list acl write save erase delete 0 simple 7 cipher logging info-center encapsulation link-protocol
dis cur display current-configuration ;显示当前配置 display interfaces ;显示接口 display vlan all ;显示路由信息 display version ;显示版本信息 super password ;修改特权用户密码 sysname ;交换机命名 interface ethernet 0/1 ;进入接口视图 interface vlan x ;进入接口视图 ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址 route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关 rip ;三层交换支持 local-user ftp user-interface vty 0 4 ;进入虚拟终端 authentication-mode password ;设置口令模式 set authentication-mode password simple 222 ;设置口令(simple简单的) ser privilege level 3 ;用户级别(当用户远程登陆时,其默认级别为1,不能作任何设置,3为最高级别,可以作修改) interface ethernet 0/1 ;进入端口模式 int e0/1 ;进入端口模式 duplex {half|full|auto} ;配置端口工作状态(端口聚合时是全双工,而CISCO
cisco&华为配置命令对应
cisco&华为配置命令对应 思科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 display show version disp version no undo show run disp current-configuration username local-user end return
cisco与h3c命令对比
CISCO 和锐捷基本上是一样的思科和H3C是完全不一样的 Cisco 华为解释 show display 显示 no undo 删除/取消user local-user 新建用户end return 退回到系统视图exit quit 返回上级视图exit logout telnet的退出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 日志信息encapsulation link-pro 封装链路层协议show version disp version 显示版本 show run disp current-configuration 显示当前配置show disp base-information 显示全面的信息tech-support show start disp saved-configuration 显示已保存的配置ctrl+z ctrl+z 退回到系统视图ctrl+p ctrl+p 上一条命令ctrl+n ctrl+n 下一条命令 - ctrl+a display cur - ctrl+r display ip routig-table undebug all ctrl+d 取消所有debug命令cisco和华为命令2008-04-09 13:27CISCO交换机配置命令大全2006-2-28 14:33:00 1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password
思科和华为交换机命令对比
思科和华为交换机应该是网络项目中大家接触比较多的了,这两种交换机的常用命令各有不同,本文结合网络项目中两种交换机的常用命令从对比的角度帮助大家来学习。 一、调试命令 思科: 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配置命令: 思科: 建立和删除VLAN Switch# vlan database Switch(vlan)# vlan 20 name test20 Switch(vlan)# no vlan 20 Switch(vlan)# exit 将端口分配给一个VLAN Switch(config)# interface f0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 20 设置VLAN TRUNK Switch(config)# interface f0/24 Switch(config-if)# switchport mode trunk Switch(config-if)#switchport trunk allow vlan {ID|All} Switch(config-if)# switchport trunk encapsulation dot1q 华为: 建立和删除VLAN [Quidway]vlan 30