華三基本命令對比

很多朋友反映,對華為/思科/華三交換機配置命令有些分不清楚,那麼今天弱電君和大家來看下他們的區別在哪裡,這裡對命令做了個彙總,平時對命令不熟的朋友這次可以看下。

<table><tbody>

CISCO

H3C

HUAWEI

描述

no

undo

undo

取消、關閉當前設置

show

display

display

顯示查看

exit

quit

quit

退回上級

hostname

sysname

sysname

設置主機名

en, config terminal

system-view

system-view

進入全局模式

delete

delete

delete

刪除文件

reload

reboot

reboot

重啟

write

save

save

保存當前配置

username

local-user

local-user

創建用戶

shutdown

shutdown

shutdown

禁止、關閉 端口

show version

display version

display version

顯示當前系統版本

show startup-config

display saved-configuration

display saved-configuration

查看已保存過的配置

show running-config

display current-configuration

display current-configuration

顯示當前配置

no debug all

ctrl+d

ctrl+d

取消所有debug命令

erase startup-config

reset saved-configuration

reset saved-configuration

刪除配置

end

return

return

退到用戶視圖

exit

logout

logout

登出

logging

info-center

info-center

指定信息中心配置信息

line

user-interface

user-interface

進入線路配置(用戶接口)模式

start-config

saved-configuration

saved-configuration

啟動配置

running-config

current-configuration

current-configuration

當前配置

host

ip host

ip host

host名字和ip地址對應

交換部分

enable password

set authentication password simple

set authentication password simple

配置明文密碼

interface type/number

interface type/number

interface type/number

進入接口

interface vlan 1

interface vlan 1

interface vlan 1

進入vlan配置vlan管理地址

interface rang

interface ethID to ID

interface ethID to ID

定議多個端口的組

enabl esecret

super password

super password

設置特權口令

duplex (half|full|auto)

duplex (half|full|auto)

duplex (half|full|auto)

配置接口狀態

speed (10/100/1000)

speed (10/100/1000)

speed (10/100/1000)

配置端口速率

switchport mode trunk

port link-type trunk

port link-type trunk

配置trunk

vlan ID /no vlan ID

vlan batch ID /undo vlan batch ID

vlan batch ID /undo vlan batch ID

添加、刪除vlan

switchport access vlan

port default vlan ID

port acces vlan ID

將端口接入vlan

show interface

display interface

display interface

查看接口

show vlan ID

display vlan ID

display vlan ID

查看vlan

encapsulation

link-protocol

link-protocol

封裝協議

channel-group 1 mode on

port link-aggregation group 1

port link-aggregation group 1

鏈路聚合

ip routing

默認開啟

默認開啟

開啟三層交換的路由功能

no switchport

不支持

不支持

開啟接口三層功能

vtp domain

GVRP

GVRP

對跨以太網交換機的VLAN進行動態註冊和刪除

spanning-tree vlan ID root primary

stp instance id root primary

stp instance id root primary

stp配置根網橋

spanning-tree vlan ID priority

stp primary vlaue

stp primary vlaue

配置網橋優先級

show spanning-tree

dis stp brief

dis stp brief

查看STP配置

路由部分

ip route 0.0.0.0 0.0.0.0

ip route-static 0.0.0.0 0.0.0.0

ip route-static 0.0.0.0 0.0.0.0

配置默認路由

ip route 目標網段+掩碼 下一跳

ip route-static 目標網段+掩碼 下一跳

ip route-static 目標網段+掩碼 下一跳

配置靜態路由

show ip route

display ip routing-table

display ip routing-table

查看路由表

router rip /network 網段

rip /network 網段

rip /network 網段

啟用rip、並宣告網段

router ospf

ospf

ospf

啟用ospf

network ip 反碼 area <area-id>

area <area-id>

area <area-id>

配置OSPF區域

no auto-summary

rip split-horizon

rip split-horizon

配置RIP V2水平分割

show ip protocol

display ip protocol

display ip protocol

查看路由協議

access-list 1-99 permit/deny IP

rule id permit source IP

rule id permit source IP

標準訪問控制列表

access-list 100-199 permit/deny protocol source IP+反碼 destination IP+反碼 operator operan

rule {normal|special}{permit|deny}{tcp|udp}source {|any}destination |any}[operate]

rule {normal|special}{permit|deny}{tcp|udp}source {|any}destination |any}[operate]

擴展訪問控制列表

standby group-number ip virtual-ip

vrrp vrid number virtual-ip

vrrp vrid number virtual-ip

配置HSRP組

standby group-number priority

vrrp vrid number priority

vrrp vrid number priority

配置HSRP優先級

standby group-number preempt

vrrp vrid number preempt-mode

vrrp vrid number preempt-mode

配置HSRP佔先權

standby group-number track



配置端口跟蹤

ip nat inside source static

nat server global [port] inside port [protocol]

nat server global [port] inside port [protocol]

配置靜態地址轉換

/<tbody>/<table>

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.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩碼

router(config-if)#enca hdl/ppp 捆綁鏈路協議 hdlc 或者 ppp 思科缺省串口封裝的鏈路層協議是HDLC所以在show run配置的時候接口上的配置沒有,如果要封裝為別的鏈路層協議例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr

router(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 /廣播轉單播報文,指定鄰居的接ip

igrp協議

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 /配置路由的id

router(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)#exit

router(config)#

router(config-router)#exit

router(config)#

router(config-line)#exit

router(config)#

router(config)#exit

router#

exit命令 /從接口、協議、line等視圖模式下退回到全局配置模式,或從全局配置模式退回到特權模式

router(config-if)#end

router(config-router)#end

router(config-line)#end

router#

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 ACL

Access-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中的當前配置存儲到NVRAM

Copy running-config tftp 將RAM中的當前配置存儲到網絡TFTP服務器上

Copy tftp flash 從TFTP服務器上下載新映像到Flash

Copy 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 退出所有配置模式或者關閉一個激活的終端會話和終止一個EXEC

Exit 終止任何配置模式或關閉一個活動的對話和結束EXEC

format 格式化設備

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 允許路由器缺省使用DNS

Ip 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路由器配置模式下,在網絡上啟動加強的IGRP

Network 指定一個和路由器直接相連的網絡地址段

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和password

Protocol 對一個IP路由選擇協議進行定義,該協議可以是RIP,內部網關路由選擇協議(IGRP),開放最短路徑優先(OSPF),還可以是加強的IGRP

Pwd 顯示當前設備名

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 顯示配置的協議。這條命令顯示任何配置了的第3層協議的狀態

Show running-config 顯示RAM中的當前配置信息

Show spantree 顯示關於虛擬局域網(VLAN)的生成樹信息

Show stacks 監控和中斷程序對堆棧的使用,並顯示系統上一次重啟的原因

Show startup-config 顯示NVRAM中的啟動配置文件

Show ststus 顯示ISDN線路和兩個B信道的當前狀態

Show version 顯示系統硬件的配置,軟件的版本,配置文件的名稱和來源及引導映像

Shutdown 關閉一個接口

Telnet 開啟一個telect連接

Term ip 指定當前會話的網絡掩碼的格式

Term ip netmask-format 規定了在show命令輸出中網絡掩碼顯示的格式

Timers basic 控制著IGRP以多少時間間隔發送更新信息

Trace 跟蹤IP路由

最新弱電資料更新—弱電工程各系統施工報價清單(12月21日)


分享到:


相關文章: