功能Cisco 命令华为命令
进入全局模式#configure terminal
显示当前配置show running-config display current-configuration
显示版本信息show version display version
显示 vlan 信息show vlan display vlan
显示接口信息show interface 接口display interface 接口
交换机路由器hostname 主机名sysname 主机名
命名
修改特权密码enable password 密码 ( 明文 ) super password 密码
enable secret 密码 ( 密文 )
进入接口模式interface 接口interface 接口
进入 vlan 模式interface vlan vlan 号interface vlan vlan 号
给接口配 IP ip address
配 telnet 密码line vty 0 4 user-interface vty 0 4
password 密码authentication-mode password
login set authentication-mode password simple 密码
user privilege level 3
激活端口
关闭端口
退出
创建 VLAN VLAN 中增加端口
当前端口加入到VLAN no shutdown undo shutdown
shutdown shutdown
exit quit
vlan vlan号vlan vlan号
port e0/1
port e0/2 to e0/4
switchport access vlan vlan号port access vlan vlan 号
设置端口工作switchport mode port link-type trunk|access|hybrid
模式trunk|access|dynamic
设 trunk 允许的switchport trunk allowed vlan port trunk permit vlan ID|All
VLAN remove|add ID
指定镜像端口monitor session 1 destination int monitor-port 接口
接口
指定被镜像端monitor session 1 source int 接口port mirror 接口
口both
设置生成树启spanning-tree vlan vlan 号 ( 默认stp enable|disable(默认关闭)
动与否开启 )
端口的聚合interface range f0/1 –4 link-aggregation e0/1 to e0/4 ingress|both channel-group 1 mode on undo link-aggregation e0/1|all
设置主 vlan isolate-user-vlan enable
设置主 vlan 包括isolate-user-vlan
显示路由信息show ip route display ip route
绑定 HDLC 协议默认就是link-protocol hdlc
设静态路由ip route 网络号掩码下一跳 IP/ 接ip route-static 网络号掩码下一跳 IP/ 接口
口
启用 RIP 路由router rip rip
rip work
rip input
rip output
配置路由器的int loopback 0 router idA.B.C.D
ID ip add IP 地址掩码
启动 OSPF 协议router ospf 进程号ospf enable
配置 OSPF 区域net 网络号反向掩码 area int 接口
标准 ACL 命令格access-list 列表号 permit|deny 源acl
式IP rule [normal|special]{permit|deny} [source
反向掩码source-addr source-wildcard|any]
扩展 ACL 配置access-list 列表号 permit|deny 协acl
议源 IP 反向掩码目的 IP 反向掩码rule{normal|special}{permit|deny}{tcp|udp}source
eq 端口号{
名
PPP 设置encapsulation ppp
Pap认证主认证方
(config)#username 用户名
password 密码
(config)#int 串口接口
(config-if)#ppp authentication
pap
被认证方
(config)#int串口接口
(config-if)#ppp pap
sent-username用户名password
密码
Chap 认证主认证方
(config)#username客户端主机名
password密码
(config)#int串口接口
(config-if)#ppp authentication
(config-if)#ppp chap hostname
服务器主机名
被认证方
(config)#username服务器主机名
password密码
(config)#int串口接口
(config-if)#ppp chap hostname
客户端主机名link-protocol ppp
主认证方
local-user用户名password {simple|cipher}密码interface串口接口
ppp authentication-mode pap
被认证方
interface串口接口
ppp pap local-user用户名password {simple|cipher}
密码
主认证方
local-user对方主机名password {simple|cipher}密码interface串口接口
ppp authentication-mode chap
ppp chap user自己主机名
被认证方
interface串口接口
local-user对方主机名password {simple|cipher}密码ppp chap user自己主机名
静态nat (1) 为内外部接口配IP 并激活;interface 接口
(2) 在接口上启用NAT ;nat server global
内部接口:ip nat inside [protocol]
外部接口:ip nat outside
(3) 建立静态地址转换
(config)#ip nat inside source
static 私有IP 公网IP
动态 NAT (1) 为内外部接口配IP 并激活;(1) 建立地址池
(2) 在接口上启用NAT ;nat address-group 公网起始 IP 公网终止 IP pool1
内部接口: ip nat inside (2) 定义内网允许访问外网的ACL
外部接口: ip nat outside acl 列表号
(3) 定义内网允许访问外网的 ACL rule permit source 源 IP 反向掩码rule
(config)#access-list 列表号deny source any
permit 源 IP 反向掩码(3) 实现地址转换
(4) 定义合法 IP 地址池int 公网接口
(config)#ip nat pool 地址池名公nat outbound列表号address-group pool 1
网起始 IP 公网终止 IP
netmask掩码
(5)实现地址转换
(config)#ip nat inside source list
列表号pool地址池名
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 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
华为交换机配置命令手 册及实验 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、其他命令 设置系统时间和时区
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-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
目录第一章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
功能Cisco 命令华为命令 进入全局模式#configure terminal
《2010思科路由协议挑战100问》第二期红盟过客 类型:网络认证大小:1.2M语言:中文评分:8.0 标签: 立即下载 思科、华为、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 /设置时间溢出为0 router(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.xxxxxx.xxx.xxx.xxx /添加ip地址和掩码 router(config-if)#encahdl/ppp捆绑链路协议hdlc或者ppp思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的encappp或者encafr router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段 router(config-if)#ip add xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx /添加ip地址和掩码给环回口 router(config-if)#no shutdown /在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口 3、路由配置: (1)静态路由 router(config)#ip route xxx.xxx.xxx.xxxxxx.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版本
思科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 show start disp saved-configuration
cisco与华为命令比较 功能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
思科、华为、锐捷的交换机端口聚合区别 思科命令行配置: CLI:SW#conf t SW(config)#interface range f1/1 -2 SW(config-if)#channel-group 1 mode desirable/on SW(config-if)#swithport SW(config-if)#switchport mode trunk SW(config-if)#switchport trunk encap dot1q 可以通过 interface port-channel 1 进入端口通道 华为端口聚合配置: 华为交换机的端口聚合可以通过以下命令来实现: S3250(config)#link-aggregation port_num1 to port_num2 {ingress | ingress-egress} 其中port_num1是起始端口号,port_num2是终止端口号。ingress/ingress-egress这个参数选项一般选为ingress-egress。 在做端口聚合的时候请注意以下几点: 1、每台华为交换机只支持1个聚合组 2、每个聚合组最多只能聚合4个端口。 3、参加聚合的端口号必须连续。 对于聚合端口的监控可以通过以下命令来实现: S3026(config)#show link-aggregation [master_port_num] 其中master_port_num是参加聚合的端口中端口号最小的那个端口。 通过这条命令可以显示聚合组中包括哪些端口等一些与端口聚合相关的参数。 锐捷端口聚合配置: Switch#configure terminal Switch(config)#interface range fastethernet 1/1-2 Switch(config-if-range)#port-group 5 Switch(config-if-range)#switchport mode trunk 你可以在全局配置模式下使用命令#interface aggregateport n(n为AP号) 来直接创建一个AP(如果AP n不存在)。 配置aggregate port的流量平衡
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
Navigation] 实例:华为和思科路由器的互联配置 https://www.doczj.com/doc/478499103.html,发布日期:2004-11-28 浏览次数: 724 作者:龙剑飞出处:Pconline 一、概述 思科路由器一度在企业广域网络的应用上占有统治地位,但根据近年CCID的报告显示,在国内,华为与思科在路由和交换设备方面日渐形成旗鼓相当的市场地位;在海外,华为也在不断蚕食思科的市场分额。随着华为路由器在企业中的应用越来越多,实现华为路由器和思科路由器的互连,保护旧有的投资,对使用者具有重大的实用意义。 华为路由器命令行接口配置界面在经过和思科的官司后做了较大的修改,但基本的配置思想还是大体一致的,Cisco的网际操作系统英文缩写为IOS(Internetwork Operating System),华为公司数据通信产品的通用网络操作系统平台的英文缩写为VRP(Versatile Routing Platform,通用路由平台),在配置实现思科和华为路由器的互连过程中应注意使用标准的协议(如OSPF、RIP),不用思科的私有协议(如EIGRP),本文提供一个思科和华为路由器OSPF串口互连的配置实例进行分析。 二、互连示意图
三、配置文件说明 思科路由器配置文件(部分): Current configuration: ! version 12.1 service timestamps debug uptime service timestamps log uptime service password-encryption ! hostname Cisco //定义路由器主机名 ! enable secret 5 $QB$O1nBb A1olUQ JU1JQRUxNe$oHa0 //enable密码! no ip domain-lookup ! interface Loopback0
思科和华为交换机应该是网络项目中大家接触比较多的了,这两种交换机的常用命令各有不同,本文结合网络项目中两种交换机的常用命令从对比的角度帮助大家来学习。 一、调试命令 思科: 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