思科、華爲、H3C經常使用命令對比大全

思科、華爲、H3C這些網絡設備的命令仍是挺多的,不過咱們通常用的路由交換機設備都是最簡單的了,先學基本命令,再學其餘功能命令。路由命令是最基本的命令了。 思科、華爲、H3C經常使用命令對比大全windows

   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 {<ip wild>|any}destination  <ip wild>|any}[operate]    rule  {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destination  <ip wild>|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  <ip> [port] inside <ip> port [protocol]    nat server global  <ip> [port] inside <ip> port [protocol]    配置靜態地址轉換
       

cisco經常使用命令解釋安全

視圖模式介紹:服務器

普通視圖 router>網絡

特權視圖 router#    /在普通模式下輸入enable併發

全局視圖 router(config)#   /在特權模式下輸入config t負載均衡

接口視圖 router(config-if)#       /在全局模式下輸入int 接口名稱 例如int s0或int e0dom

路由協議視圖 router(config-route)#     /在全局模式下輸入router 動態路由協議名稱tcp

一、基本配置:ide

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 /對全部在路由器上輸入的口令進行暗文加密

二、接口配置: 

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管理性的關閉接口

 

三、路由配置:

(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上配置,併發布缺省路由信息進入這個區域內的路由器

 

四、保存當前修改/運行的配置:

router#write    /將RAM中的當前配置存儲到NVRAM中,下次路由器啓動就是 

           執行保存的配置

router#Copy running-config startup-config   /命令與write效果同樣

五、通常的經常使用命令

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路由

Username password 規定了在CHAP和PAP呼叫者身份驗證過程當中使用的密碼

Verify 檢驗flash文件

Where 顯示活動鏈接

Which-route OSI路由表查找和顯示結果

Write 運行的配置信息寫入內存,網絡或終端

Write erase 如今由copy startup-config命令替換

相關文章
相關標籤/搜索