日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

思科CISCO常用命令汇总

發布時間:2023/12/10 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 思科CISCO常用命令汇总 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

視圖模式介紹

?

??1.普通視圖router>?

??2.特權視圖router#?/?在普通模式下輸入enable

??3.全局視圖router(config)#/ 在特權模式下輸入configt

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

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

?

?

?

?

?

1基本配置:

?

1. router>enable ??? ? ??/?進入特權模式

2. router#conft ??? ? ??/ 進入全局配置模式

3. router(config)#hostname ?xxx ??

?/設置設備名稱就好像給我們的計算機起個名字

4. router(config)#enable password xxx?/設置特權口令

5. ?router(config)#no ip ?domain ?lookup ?

/不允許路由器缺省使用DNS解析命令?

6. router(config)#Service password-encryption

/對所有在路由器上輸入的口令進行暗文加密?

7. router(config)#line ?vty ?0 ?4 ? ? ? /進入設置telnet服務模式

?router(config-line)#password ? xxx ? ?/設置 ?telnet 的密碼

?router(config-line)#login ? ? ? /使能可以登陸

8. router(config)#line ?con ?0 ? ? /進入控制口的服務模式

router(config-line)#password xxx ? /要設置 ?console?的密碼 ? ? ? ?router(config-line)#login ? ? ? ?/使能可以登陸

?

?

?

?

?

2接口配置

?

1.?router(config)# int ?s0

/ ?進入接口配置模式serial 0?端口配置?(如果是模塊化的路由器前面加上槽 位編號,例如serial0/0?代表這個路由器的0?槽位上的第一個接口)

2.router(config-if)#ip add xxx.xxx.xxx.xxx ? xxx.xxx.xxx.xxx

? /?添加 ?ip?地址和掩碼

3.router(config-if)#enca ? hdlc

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

/建立環回口(邏輯接口?)模擬不同的本機網段

router(config-if)#ip ?add ?xxx.xxx.xxx.xxx ? xxx.xxx.xxx.xxx

/ ?添加ip ?地址和掩碼給環回口在物理接口 上配置了ip?地址后用no shut?啟用這個物理接口反之可以用shutdown?管理性的關閉接口

?

?

3路由配置

?

1.靜態路由

router(config)#ip ?route ?xxx.xxx.xxx.xxx ?xxx.xxx.xxx.xxx ?下一跳或自己的接口

2.缺省路由

router(config)#ip route 0.0.0.0 0.0.0.0 s0添加缺省路由

3.動態路由rip?協議

router(config)#router ?rip ? ?/啟動?rip?協議

router(config-router)#network ?xxx.xxx.xxx.xxx ? /宣告自己的網段router(config-router)#version ?2 ? /轉 換為?rip2?版本

router(config-router)#noauto-summary ?

? ? ? ? ? /關閉自動匯總功能,ripV2才有作用

router(config-router)#passive-in?接?口?名?

?/?啟?動?本?路?由?器?的?那?個?接?口?為?被?動?接?口

router(config-router)#neixxx.xxx.xxx.xxx/廣播轉單播報文,指定鄰居的接 ip

4.動態路由eigrp?協議

router(config)#router eigrp ?xxx ? ?/啟動 ?eigrp?協議

router(config-router)#network ?xxx.xxx.xxx.xxx ? /宣告自己的網段

router(config-router)#variance ? xxx ? ? /調整倍數因子,使用不等價的負載均衡eigrp?協議

router(config-router)#noauto-summary ?/關閉自動匯總功能ospf?協議

5.動態路由ospf協議

router(config)router ?ospf ?xxx ?/啟動協議

router(config-router)network xxx.xxx.xxx.xxx ?xxx.xxx.xxx.xxx(反掩碼)area ? xxx

/?宣告自己的接口 或網段在ospf?的區域中可以把不同接口宣告在不同區域中

?

?

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

?

1.router#write

/將?RAM?中的當前配置存儲到NVRAM?中,下次路由器啟動就是執行保存的配置

2.router#Copy ? running-config ? ?startup-config ??

?/命令與write?效果一樣

?

?

?

5一般常用命令

?

1.exit命令

router(config-if)#exit

router(config)# router

(config-router)#exit

router(config)#

router(config-line)#exit

router(config)# router

(config)#exit

router#

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

2.end命令

router(config-if)#end?

router(config-router)#end

router(config-line)#end

router#

end?命令?/?從任何視圖直接回到特權模式

3.logout

router#Logout

/?退出當前路由器登陸模式相對與windows?的注銷

4.reload命令

router#reload

/ ?重新啟動路由器?(熱啟動)冷啟動就是關閉路由器再打開電源開關

5.show?命令

特權模式下:router#show ip route

/查看當前的路由表router#cleariproute*/清楚當前的路由表?

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 topology

/查看 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常用命令汇总的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。