思科,华为,H3C通用命令对比全套汇编
思科、华为以及H3C交换机常用命令对比

思科、华为以及H3C交换机常用命令对比
思科交换机常用命令:
show interfaces:查看接口信息
show ip interface brief:查看接口IP信息简要版
show running-config:查看当前配置
configure terminal:进入配置模式
interface [interface_id]:进入接口配置模式
no shutdown:启用接口
shutdown:禁用接口
exit:退出配置模式
华为交换机常用命令:
display interfaces:查看接口信息
display current-configuration:查看当前配置
system-view:进入配置模式
interface [interface_id]:进入接口配置模式
shutdown:禁用接口
undo shutdown:启用接口
return:退出配置模式
quit:退出配置模式
H3C交换机常用命令:
display interfaces:查看接口信息
display current-configuration:查看当前配置system-view:进入配置模式
interface [interface_id]:进入接口配置模式shutdown:禁用接口
undo shutdown:启用接口
return:退出配置模式
quit:退出配置模式。
Cisco与HC命令对比

vlan ID / no vlan ID
vlan ID / undo vlan ID
查看端口
show interface
display interface
查看vlan
show vlan id
display vlan id
链路聚合
channel-group 1 mode on
port link-aggregation group 1
开启三层交换的路由功能
ip routing
默认开启
开启接口三层功能
no switchport
不支持
跨交换机的vlan动态注册
vtp domain
GVRP
stp配置根网桥
spanning-tree vlan ID root primary
配置网桥优先级
spanning-tree vlan ID root priority
cisco与H3C命令对比
命令的作用
思科路由器命令
华为路由器命令
显示当前配置
showrun
disp current
显示已保存的配置
show start
disp saved
显示版本
show version
disp version
显示路由器板块信息
show diag
display device
显示全面的信息
show tech-support
disp base-information
显示接口信息
show interface
disp interface
显示路由表
show ip route
display ip routing
H3C和CISCO交换机常用命令及对比

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。
做弱电的人手一份!思科、华为等四大厂商的交换机配置命令全收录

做弱电的人手一份!思科、华为等四大厂商的交换机配置命令全收录01 进入特权模式enableswitch>enableswitch#02 进入全局配置模式configure terminalswitch>enableswitch#configure terminalswitch(conf)#03 交换机命名hostname aptech2950以aptech2950为例switch>enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#04 配置使能口令enable password cisco以cisco为例switch>enableswitch # c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco05 配置使能密码enable secret ciscolab以cicsolab为例switch>enableswitch # c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enble secret ciscolab06 创建多个VLANswitch>enable (进入特权模式)switch#vlan data (进入VLAN配置模式)switch(vlan)#vlan 10 name IT (划分VLAN 10,名称为IT) switch(vlan)#vlan 20 name HR (划分VLAN20,名称为HR)switch(vlan)#vlan 30 name FIN (划分VLAN30,名称为FIN) switch(vlan)#vlan 40 name LOG (划分VLAN40,名称为LOG) switch(vlan)#exit07 设置VLAN 1switch>enableswitch # configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0配置交换机端口IP和子网掩码aptech2950(conf-if)#no shutaptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址08 进入交换机某一个端口interface fastehernet 0/17以17为例switch>enableswitch # configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#09 查看命令showswitch>enableswitch# show version查看系统中的所有版本信息show interface vlan 1查看交换机有关IP协议的配置信息show running-configure查看交换机当前起作用的配置信息show interface fastethernet 0/1查看交换机1接口具体配置和统计信息show mac-address-table查看MAC地址表show mac-address-table aging-time查看MAC地址表自动老化时间10 交换机恢复出厂默认命令switch>enableswitch # erase startup-configureswitch # reload11 双工模式设置switch> enableswitch # c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#duplex full/half/auto有 full、half、auto三个选项12 cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备13 交换机telnet远程登录设置switch>enableswitch # configure terminalswitch(conf)#hostname aptech-2950aptech2950(conf)#enable password ciscoaptech2950(conf)#interface fastethernet 0/1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 aptech2950(conf-it)#no shutaptech2950(conf-if)#exitaptech2950(conf)line vty 0 4 设置0-4个用户可以telnet远程登录aptech2950(conf-line)#password edge 以edge为远程登录的用户密码主机设置:IP 192.168.1.2 主机的IP必须和交换机端口的地址在同一个网络段metmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telent 192.168.1.1进入telnet远程登录界面password:edgeaptech2950>enpassword:ciscoaptech#02华为交换机基础配置命令01 常用命令视图02 创建VLAN<Huawei> //用户视图,一般display命令查看信息比较多。
思科和H3C常用配置详细对比

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作为字串。
华为交换机基本配置命令,附三大品牌命令对比表

华为交换机基本配置命令,附三大品牌命令对比表前言:最近一直有读者咨询有关于交换机配置命令的汇总有没有,我们从事弱电集成工作,会一些简单的交换机配置还是有必要的,想深入学习的话,还是要偏向于网络工程师了。
正文:一、单交换机VLAN划分命令命令解释system 进入系统视图system-view 进入系统视图quit 退到系统视图undo vlan 20 删除vlan 20sysname 交换机命名disp vlan 显示vlanvlan 20 创建vlan(也可进入vlan 20)port e1/0/1 to e1/0/5 把端口1-5放入VLAN 20 中5700系列单个端口放入VLAN[Huawei]int g0/0/1[Huawei]port link-type access (注:接口类型access,hybrid、trunk)[Huawei]port default vlan 10批量端口放入VLAN[Huawei]port-group 1[Huawei-port-group-1]group-member ethernet G0/0/1 to ethernetG0/0/20 [Huawei-port-group-1]port hybrid untagged vlan 3删除group(组)vlan 200内的15端口[Huawei]int g0/0/15[Huawei-GigabitEthernet0/0/15]undo port hybrid untagged vlan 200通过group端口限速设置[Huawei]Port-group 2[Huawei]group-member g0/0/2 to g0/0/23[Huawei]qos lr outbound cir 2000 cbs 20000disp vlan 20 显示vlan里的端口20int e1/0/24 进入端口24undo port e1/0/10 表示删除当前VLAN端口10disp curr 显示当前配置return 返回Save 保存info-center source DS channel 0 log state off trap stateoff 通过关闭日志信息命令改变DS 模块来实现(关闭配置后的确认信息显示)info-center source DS channel 0 log state on trap stateon 通过打开日志信息命令改变DS 模块来实现(打开配置后的确认信息显示)二、配置交换机支持TELNEsystem 进入系统视图sysname 交换机命名int vlan 1 进入VLAN 1ip address 192.168.3.100 255.255.255.0 配置IP地址user-int vty 0 4 进入虚拟终端authentication-mode password (aut password) 设置口令模式set authentication password simple 222 (set aut pass sim 222) 设置口令user privilege level 3(use priv lev 3) 配置用户级别disp current-configuration (disp cur) 查看当前配置disp ip int 查看交换机VLAN IP配置删除配置必须退到用户模式reset saved-configuration(reset saved) 删除配置Reboot 重启交换机三、跨交换机VLAN的通讯在sw1上:vlan 10 建立VLAN 10int e1/0/5 进入端口5port access vlan 10 把端口5加入vlan 10vlan 20 建立VLAN 20int e1/0/15 进入端口15port access vlan 20 把端口15加入VLAN 20int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all 同上在SW2上:vlan 10 建立VLAN 10int e1/0/20 进入端口20port access vlan 10 把端口20放入VLAN 10int e1/0/24 进入端口24port link-type trunk 把24端口设为TRUNK端口port trunk permit vlan all (port trunk permit vlan 10 只能为vlan 10使用)24端口为所有VLAN使用disp int e1/0/24 查看端口24是否为TRUNKundo port trunk permit vlan all 删除该句四、路由的配置命令system 进入系统模式sysname 命名int e1/0 进入端口ip address 192.168.3.100 255.255.255.0 设置IPundo shutdown 打开端口disp ip int e1/0 查看IP接口情况disp ip int brief 查看IP接口情况user-int vty 0 4 进入口令模式authentication-mode password(auth pass) 进入口令模式set authentication password simple 222 37 设置口令user privilege level 3 进入3级特权save 保存配置reset saved-configuration 删除配置(用户模式下运行)undo shutdown 配置远程登陆密码int e1/4ip route 192.168.3.0(目标网段)255.255.255.0 192.168.12.1(下一跳:下一路由器的接口)静态路由ip route 0.0.0.0 0.0.0.0 192.168.12.1 默认路由disp ip rout 显示路由列表华3C AR-18E1/0(lan1-lan4)E2/0(wan0)E3/0(WAN1)路由器连接使用直通线。
思科华为命令对照大全

目录第一章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 (把绑在一起成为组1Switch#show etherchannel 1 summary 查看以太网通道的配置是否正确===============================================================================================第三章三层交换机的配置1、在3层交换机上启动路由,否则3层交换不具有路由功能switch(config)#ip routing2、配置VLAN的IP地址switch(config)#interface vlan 1 因为3层交换机支持各VLAN间的路由,因此每个VLAN都可以配置IP地址switch(config-if)#ip address 192.168.1.1 255.255.255.0switch(config-if)#no shutdown3、查看FIB表switch #show ip cef4、查看邻接关系表switch#show adjacency detail5、在3层交换机上配置路由接口switch(config-if)#no switchport (配置接口为3层模式,意思就是取消switch的接口)6、在3层交换机上配置静态路由或动态路由与在ROUTE上配置路由方法都是相同的7、配置DHCP中继转发switch(cofig)#interface vlan 2switch(config-if)#ip helper-address 192.168.2.100---------------------------------------------------解决实例;下面的配置命令,可以配置路由器为DHCP服务器,用以给DHCP客户端动态分配ip地址。
思科华为全系列交换机路由器常用命令

思科华为全系列交换机路由器常用命令交换机/路由器配置综合复习交换机/路由器常用命令汇总本课内容交换机常用命令2交换机常用命令交换机常用命令31.交换机常用命令·>Enable进入特权模式·#E某it返回上一级操作模式·#End返回到特权模式·#writememory或copyrunning-configtartup-config保存配置文件·#delflah:config.te某t删除配置文件(交换机及1700系列路由器)·#delflah:vlan.dat删除Vlan配置信息(交换机)·(config)#hotnamewitchA配置设备名称4为witchA1.交换机常用命令·(config)#enableecretlevel10tar配置远程登陆密码为tar·(config)#enableecretlevel150tar配置特权密码为tar·Level1为普通用户级别,可选为1~15,15为最高权限级别;0表示密码不加密·(config)#enableerviceweb-erver开启交换机WEB管理功能·Service可选以下:web-erver(WEB管理)、telnet-erver(远程登陆)等51.交换机常用命令查看信息·#howrunning-config查看当前生效的配置信息·#howinterfacefatethernet0/3查看F0/3端口信息·#howinterfaceerial1/2查看S1/2端口信息·#howinterface查看所有端口信息·#howipinterfacebrief以简洁方式汇总查看所有端口信息·#howipinterface查看所有端口信息·#howverion查看版本信息61.交换机常用命令查看信息·#howmac-addre-table查看交换机当前MAC地址表信息·#howrunning-config查看当前生效的配置信息·#howvlan查看所有VLAN信息·#howvlanid10查看某一VLAN(如VLAN10)的信息·#howinterfacefatethernet0/1witchport查看某一端口模式(如F0/1)·#howaggregateport1ummary查看聚合端7口AG1的信息1.交换机常用命令查看信息·#howpanning-tree查看生成树配置信息·#howpanning-treeinterfacefatethernet0/1查看该端口的生成树状态·#howport-ecurity查看交换机的端口安全配置信息·#howport-ecurityaddre查看地址安全绑定配置信息·#howipacce-litlitname查看名为litname的列表的配置信息8·#howacce-lit1.交换机常用命令端口的基本配置·(config)#Interfacefatethernet0/3进入F0/3的端口配置模式·(config)#interfacerangefa0/1-2,0/5,0/7-9进入F0/1、F0/2、F0/5、F0/7、F0/8、F0/9的端口配置模式·(config-if)#peed10配置端口速率为10M,可选10,100,auto91.交换机常用命令端口的基本配置·(config-if)#duple某full配置端口为全双工模式,可选full(全双工),half(半双式),auto(自适应)·(config-if)#nohutdown开启该端口·(config-if)#witchportaccevlan10将该端口划入VLAN10中,用于VLAN·(config-if)#witchportmodetrunk将该端口设为trunk模式,可选模式为acce,trunk·(config-if)#port-group1将该端口划入聚合端口AG1中,用于聚合端口101.交换机常用命令聚合端口的创建·(config)#interfaceaggregateport1创建聚合接口AG1·(config-if)#witchportmodetrunk配置并保证AG1为trunk模式·(config)#intf0/23-24·(config-if-range)#port-group1将端口(端口组)划入聚合端口AG1中111.交换机常用命令生成树·(config)#panning-tree开启生成树协议·(config)#panning-treemodetp指定生成树类型为tp可选模式tp,rtp,mtp·(config)#panning-treepriority4096设置交换机的优先级为4096,优先级值小为高。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
思科、华为、H3C这些网络设备的命令还是挺多的,不过我们一般用的路由交换机设备都是最简单的了,先学基本命令,再学其他功能命令。
路由命令是最基本的命令了。
思科、华为、H3C常用命令对比大全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)#line console 0 /进入控制口的服务模式router(config-line)#password xxx /要设置console的密码router(config-line)#login /使能可以登陆router(config-line)#logging synchronous /日志同步router(config-line)#exec-timeout 0 0 /设置时间溢出为0router(config-line)#line vty 0 4 /进入设置telnet服务模式router(config-line)#password xxx /设置telnet的密码router(config-line)#login /使能可以登陆router(config-line)#exit /保存退出到特权模式router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密2、接口配置:router(config)#interface serial0 /进入接口配置模式serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口)router(config-if)#ip address xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdl/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 地址和掩码给环回口router(config-if)#no shutdown /在物理接口上配置了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信息和状态的小结, 列出接口的状态和全局参数――――――――――――――――――――――――CISCO命令全集-思科命令汇总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 确定一个密码以防止对路由器非授权的访问Enable password 设置本地口令控制不同特权级别的访问Enable secret 为enable password命令定义额外一层安全性Encapsulation frame-relay 启动帧中继封装Encapsulation novell-ether 规定在网络段上使用的Novell独一无二的格式Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco的密码是sap End 退出配置模式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),还可以是加强的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 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 显示配置的协议。