华为 思科常见命令对照

华为:sys

思科:enable

 

华为:sysname  jhj1

思科:hostname  jhj1

 

华为:vlan 10desc jf5(在没有该vlan的情况下,该命令是创建vlan;当有该vlan的情况下,该命令是进入到该vlan)

     Port e0/1   加入一个指定的端口到ID为10的vlan

     Port e0/1 to e0/3 加入连续的三个端口到ID为10的vlan

思科:vlandatabase  创建vlan

     Vlan 10 name jf5

     interface range fastEthernet 0/1-10 

     switchport access vlan 10

 

华为:int vlan 10

     Ip address 192.168.10.1 255.255.255.0 //为该vlan配置IP

思科:同上

     

华为:quit   //返回上一级

思科:exit

 

华为:save    //保存命令

思科:write

 

华为:acl number2000    //基本acl

     rule permit source 10.1.0.0 0.0.255.255

     rule deny source any   //华为设备会在acl的末尾加上 permit any

思科:access-list1 permit 10.1.0.0 0.0.255.255

     access-list 1 deny any   //默认会加上,可省略

 

//扩展ACL

华为:扩展访问控制列表操作符的含义

equal portnumber       等于

greater-than portnumber      大于

less-than portnumber       小于

not-equal portnumber       不等

range portnumber1 portnumber2 区间

 

华为:

rulepermit ip source 10.0.0.1 0.0.0.0 destination202.0.0.1 0.0.0.0

ruledeny ip source any destination any

rulepermit tcp source any destination 10.0.0.10.0.0.0 destination-port equal ftp

ruledeny tcp source any destination 10.0.1.00.0.0.255 destination-port less-than 1000

思科:access-list 101 permit ip host 10.0.0.1host 202.0.0.1

      Access-list 101 deny ip any any

      access-list 101 permit tcp any host 10.0.0.1eq ftp

      access-list 101 deny tcp any 10.0.1.00.0.0.255 lt 1000

 

 

 

 

华为:nataddress-group 133.0.0.1 133.0.0.3 pool 1    //指定nat转换的公网地址池

思科:ip nat poolliu 133.0.0.1 133.0.0.3 netmask 255.255.255.0

 

华为:[Quidway-acl-basic-2001]ints0/0  //外部端口   e0/1是内部端口

[Quidway-Serial0/0]undo shut

[Quidway-Serial0/0]nat outbound 1001address-group pool 1

思科:int e0/1

     Ip nat inside

     No shut

     exit

     Int s0/0

     Ip nat outside

     No shutdown

exit

      Ipnat inside source list 1 pool liu overload

 

 

 

华为:[Quidway-Serial0]natserver global 202.38.160.101 inside 10.110.10.1 21 tcp

[Quidway-Serial0]nat server global202.38.160.102 inside 10.110.10.2 www tcp

[Quidway-Serial0]nat server global202.38.160.102 8080 inside 10.110.10.3 www tcp

思科:ip natinside source static tcp 10.110.10.1 21 202.38.160.101 21

Ip nat inside source static tcp10.110.10.3  80  202.38.160.102 8080

 

 

 

 

华为:[S3026A]interfaceethernet0/8

[S3026A-Ethernet0/8]portlink-type trunk

[S3026C-Ethernet0/1]porttrunk permit vlan all

思科:int e0/8

      Swit mode trunk

 

 

  

华为:[Quidway]user-interfacevty 0 4   //telnet密码设置

[Quidway-ui-vty0-4]authentication-mode password

[Quidway-ui-vty0-4]set authentication-mode password simple 222

思科:Router#conf t

Router(config)#linevty 0 4

Router(config-line)#password  222

 

 

华为:[Quidway]superpasswrod 123456   //特权模式密码设置

思科: enable password123456

 

 

华为:[Quidway]display current-configuration

思科:show run

 

 

华为:[Quidway]iproute-static 129.1.0.0  16  10.0.0.2    

//16相当于掩码的前16位都是1,如11111111.11111111.00000000.00000000

//16在这里的另外一种写法就是255.255.0.0,两种等效。

[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2

思科:ip route129.1.0.0 255.255.0.0 10.0.0.2

 

 

 

华为:

interface vlan 1

ip address10.65.1.8 255.255.0.0

quit

ip route-static 0.0.0.00.0.0.0 10.65.1.2

ipdefault-gateway 10.65.1.2

 

思科:int vlan 1

      Ip add 10.65.1.8255.255.0.0

      Exit

      ip route 0.0.0.00.0.0.0 10.65.1.2

ipdefault-gateway 10.65.1.2

 

 

华为:[Router]copy flash tftp

思科:copy flash: tftp:

 

 

 

华为路由器:

[Quidway]interface ethernet0/0

[Quidway-Ethernet0/0]ip addr 10.65.1.2 255.255.255.0

[Quidway-Ethernet0/0]undo shutdown

思科:

Int e0/0

Ip addr 10.65.1.2255.255.255.0

No shutdown

 

 

华为:[RouterB]rip version 2 multicast

[RouterB-rip]network 10.0.0.0

思科:Router(config)#route rip

Router(config-router)#version 2

Router(config-router)#network 10.0.0.0

 

 

 

 

华为多端口操作方法:

[hw_cwc_6]port-group g1   //创建端口组—g1

[hw_cwc_6-port-group-g1]group-member g0/0/1 tog0/0/3   //将端口g0/0/1-g0/0/3加入到该组。

 

[hw_cwc_6-port-group-g1]port link-type access    //将该组的所有端口都设置为access模式

[hw_cwc_6-port-group-g1]port default vlan 200    //将该组的所有端口都加入到ID200vlan中去。

[hw_cwc_6-port-group-g1]undo shutdown   //激活该组中的所有端口

 

[hw_cwc_6-port-group-g1]undo group-member g0/0/1to g0/0/3    //将端口g0/0/1-g0/0/3从该组删除。

[hw_cwc_6-port-group-g1]undo group-memberall-unavailable-interface   //删除该组的所有端口

[hw_cwc_6-port-group-g1]quit    //退出,返回到sys模式

[hw_cwc_6]undo port-groupg1    //删除端口组—g1

 

 

你可能感兴趣的:(路由交换)