華為 思科常見命令對照
華為: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 //將該組的所有埠都加入到ID為200的vlan中去。
[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