华为思科常见命令对照
发布日期:2019-02-11 09:54:43
发布者:
华为:sys
思科:enable
华为:sysnamejhj1
思科:hostnamejhj1
华为:vlan10descjf5(在没有该vlan的情况下,该命令是创建vlan;当有该vlan的情况下,该命令是进入到该vlan)
Porte0/1加入一个指定的端口到ID为10的vlan
Porte0/1toe0/3加入连续的三个端口到ID为10的vlan
思科:vlandatabase创建vlan
Vlan10namejf5
interfacerangefastEthernet0/1-10
switchportaccessvlan10
华为:intvlan10
Ipaddress192.168.10.1255.255.255.0//为该vlan配置IP
思科:同上
华为:quit//返回上一级
思科:exit
华为:save//保存命令
思科:write
华为:aclnumber2000//基本acl
rulepermitsource10.1.0.00.0.255.255
ruledenysourceany//华为设备会在acl的末尾加上permitany
思科:access-list1permit10.1.0.00.0.255.255
access-list1denyany//默认会加上,可省略
//扩展ACL
华为:扩展访问控制列表操作符的含义
equalportnumber等于
greater-thanportnumber大于
less-thanportnumber小于
not-equalportnumber不等
rangeportnumber1portnumber2区间
华为:
rulepermitipsource10.0.0.10.0.0.0destination202.0.0.10.0.0.0
ruledenyipsourceanydestinationany
rulepermittcpsourceanydestination10.0.0.10.0.0.0destination-portequalftp
ruledenytcpsourceanydestination10.0.1.00.0.0.255destination-portless-than1000
思科:access-list101permitiphost10.0.0.1host202.0.0.1
Access-list101denyipanyany
access-list101permittcpanyhost10.0.0.1eqftp
access-list101denytcpany10.0.1.00.0.0.255lt1000
华为:nataddress-group133.0.0.1133.0.0.3pool1//指定nat转换的公网地址池
思科:ipnatpoolliu133.0.0.1133.0.0.3netmask255.255.255.0
华为:[Quidway-acl-basic-2001]ints0/0//外部端口e0/1是内部端口
[Quidway-Serial0/0]undoshut
[Quidway-Serial0/0]natoutbound1001address-grouppool1
思科:inte0/1
Ipnatinside
Noshut
exit
Ints0/0
Ipnatoutside
Noshutdown
exit
Ipnatinsidesourcelist1poolliuoverload
华为:[Quidway-Serial0]natserverglobal202.38.160.101inside10.110.10.121tcp
[Quidway-Serial0]natserverglobal202.38.160.102inside10.110.10.2wwwtcp
[Quidway-Serial0]natserverglobal202.38.160.1028080inside10.110.10.3wwwtcp
思科:ipnatinsidesourcestatictcp10.110.10.121202.38.160.10121
Ipnatinsidesourcestatictcp10.110.10.380202.38.160.1028080
华为:[S3026A]interfaceethernet0/8
[S3026A-Ethernet0/8]portlink-typetrunk
[S3026C-Ethernet0/1]porttrunkpermitvlanall
思科:inte0/8
Switmodetrunk
华为:[Quidway]user-interfacevty04//telnet密码设置
[Quidway-ui-vty0-4]authentication-modepassword
[Quidway-ui-vty0-4]setauthentication-modepasswordsimple222
思科:Router#conft
Router(config)#linevty04
Router(config-line)#password222
华为:[Quidway]superpasswrod123456//特权模式密码设置
思科:enablepassword123456
华为:[Quidway]displaycurrent-configuration
思科:showrun
华为:[Quidway]iproute-static129.1.0.01610.0.0.2
//16相当于掩码的前16位都是1,如11111111.11111111.00000000.00000000
//16在这里的另外一种写法就是255.255.0.0,两种等效。
[Quidway]iproute-static129.1.0.0255.255.0.010.0.0.2
思科:iproute129.1.0.0255.255.0.010.0.0.2
华为:
interfacevlan1
ipaddress10.65.1.8255.255.0.0
quit
iproute-static0.0.0.00.0.0.010.65.1.2
ipdefault-gateway10.65.1.2
思科:intvlan1
Ipadd10.65.1.8255.255.0.0
Exit
iproute0.0.0.00.0.0.010.65.1.2
ipdefault-gateway10.65.1.2
华为:[Router]copyflashtftp
思科:copyflash:tftp:
华为路由器:
[Quidway]interfaceethernet0/0
[Quidway-Ethernet0/0]ipaddr10.65.1.2255.255.255.0
[Quidway-Ethernet0/0]undoshutdown
思科:
Inte0/0
Ipaddr10.65.1.2255.255.255.0
Noshutdown
华为:[RouterB]ripversion2multicast
[RouterB-rip]network10.0.0.0
思科:Router(config)#routerip
Router(config-router)#version2
Router(config-router)#network10.0.0.0