糯米文學吧

位置:首頁 > IT認證 > 思科認證

CiscoIOS基本命令集

思科製造的路由器、交換機和其他設備承載了全球80%的互聯網通信,成為硅谷中新經濟的傳奇。過去20多年,思科幾乎成為了“互聯網、網絡應用、生產力”的同義詞,思科公司在其進入的每一個領域都成為市場的領導者。那麼作為思科的學習者,你知道思科有哪些基本的命令嗎?下面跟yjbys小編一起來看看吧!

CiscoIOS基本命令集

  一、 基本路由器的檢驗命令

show version

show processes

show protocols

show mem

show ip route

show startup-config

show running-config

show flash

show interfaces

  二、 基本路由配置命令

進入:config terminal/memory/network

配置網絡時常採用的命令:copy和load

1. 標識:hostname 標識名

2. 啟動標識:banner 啟動標識

3. 接口:interface 端口號

4. 密碼:line 0 6

login

passwd 口令

enable password/secret 口令

5. 接口:

1)配置端口

interface 端口號

clock rate 時鐘速率(64000)/* 在串口中配置 */

bandwidth 帶寬(缺省56) /* 在串口中配置 */

media-type 介質類型 /* 在以太網口上 */

early-token release /* 在令牌環網口上 */

ring-speed 16 /* 在令牌環網口上 */

no shutdown

write memory

2)檢驗端口

show interfaces

show controllers

6. 配置環境

1) 引導方式

boot system flash IOS-filename

boot system tftp IOS-filename tftp-address

boot system rom

2) 配置Register值

config-register 0x2102

7. 查看鄰居路由

show cdp interface

show cdp neighbors [detail]

show cdp entry routerA

8. IP Address 配置

Ip address 網絡地址 掩碼

Ip host 主機名 address

Ip name-server 服務器地址1 服務器地址2 ……

Ip domain-lookup nsap

Show hosts

Ping 主機名/IP地址

Trace 主機名/IP地址

  三、 IP 路由

1. 靜態路由

ip routing

ip route 目標網絡號 掩碼 端口號 [permanent]

2. 缺省路由

ip default-network 網絡號

3. 動態路由

1) RIP配置

Router rip

Network 網絡號

Show ip route

Show ip protocol

Debug ip

2) OSPF 配置

Router ospf 進程號

Redistribute 其它路由協議

Network 端口網絡 反掩碼 area 區域號

Area 區域號 range 網絡號 掩碼

Area 區域號 default-cost 花銷值

Ip ospf priority number

Ip ospf cost 花銷值

Show ip ospf database

3) BGP 配置

Router bgp 自治域號

Redistribute 其它路由協議

Network 網絡號 /* 自治域內 */

Aggregate-address 網絡號 掩碼 summary-only 彙總網絡

Neighbor 相鄰網絡號 remote-as 自治域號 /* 自治域間的網絡 */

  四、 流量控制

1) 被動端口

passive interface 端口號

2) 缺省路由

ip default 網絡號/端口網絡

3) 靜態路由

ip route 目標網絡號 掩碼 端口號

4)ACL過濾表

(全局上) access-list 訪問號1 {permit|deny} 反掩碼號 [ established]

access-list 訪問號2 {permit|deny} IP/TCP協議 源網絡 目的網絡

操作符 參數

(端口上)access-group 訪問號 in|out

distribute-list 訪問號 in|out 端口號

4) Null 0 interface

Ip route address mask null 0

  五、 廣義網配置

1) PPP

Ppp pap sent-usename 封裝

Ppp chap hostname

Ppp chap password

2)X.25

encapsulation x25 [dce]

x25 address

x25 map 協議地址 /*SVC */

x25 pvc pvc號 ip地址 x25地址 /*PVC */

ip switching

x25 route x.121地址 接口 x.121映射地址

2) FrameRelay

Frame-relay local-dlci IP網絡號

Frame-relay map 協議地址

Frame-relay lmi-type ansi

cisco的異步回撥命令集

關鍵詞:

ARA : AppleTalk Remote Access

global configuration : 全局配置模式, conf t 進入。

TACACS +: Terminal Access Controller Access Control System Plus

異步回撥命令:

arap callback

callback forced-wait

ppp callback

script arap-callback

script callback

service exec-callback

異步回撥命令

這一章描述了用於配置Cisco IOS回撥異步設備的命令集。例子可參考 "Dial

Solutions Configuration Guide " 中的"Configuring Asynchronous callbac

k" 一章。

callback

用於 enable 一個ARA client 回撥請求, 在global configuration下使用。

語法描述:

此命令沒有參數和關鍵詞。

默認狀態:

回撥默認為不允許。

使用指導:

此命令首先出現在Cisco IOS 11.1中。 enable 路由器接受ARA客户端的回撥請求

首先必須enable AppleTalk routing,然後在line 上enable automatic ARA st

artup.你能在局域用户鑑定或TACACS+中使用這個命令。

相關命令:

arap authentication

autoselect ara

callback forced-wait

ppp authentication

ppp callback

service exec-callback

username

back forced-wait

用於命令Cisco IOS 在回撥客户端前等待一段時間。在global configuration下

使用

語法描述:

此命令沒有參數或關鍵詞。

默認:

等待時間沒有設置。

使用指導:

此命令首先出現在 Cisco IOS 11.1中。用這個命令使路由器在驗證好用户並斷

線後,在開始撥號前等待一段時間。

相關命令:

arap callback

chat-script

debug callback

ppp callback

service exec-callback

username

callback

用於使一個ppp客户端能撥入異步口並要求回撥。在異步口配置模式下使用。

ppp callback {accept | initiate}

語法分析:

accept : 接受RFC1570-兼容的ppp客户端發來的回撥請求

initate: 接受非RFC1570兼容的ppp客户端發來的回撥請求

默認:

異步口回撥請求默認為不接受

相關命令:

arap callback

autoselect ppp

callback-forced-wait

ppp authentication

username

pt arap-callback

指定一個用於ARA客户端回撥的腳本,在line 配置模式下使用,用no命令disnab

le.如:

script arap-callback regexp (regexp 是參數)

no script arap-callback

語法分析:

regexp 是一個關於modem撥號的腳本,名字與regexp相同的第一個腳本將被使用

.

默認:

沒有腳本分配給終端線。

使用指導:

此命令首先出現在Cisco IOS 11.1中。這個命令指定了回撥ARA客户端的撥號腳本

,用cchat script 命令創建撥號腳本, script arap-callback 命令僅作用於物理

終端(TTY)線上,在虛擬終端(VTY)線上不起作用。配置例子如下:

line 4

script arap-callback usr4

其中usr4是一個撥號腳本。

相關命令:

chat-script

script activation

script callback

script connection

script dialer

script reset

script startup

start-chat

5. script callback

用於指定一個向客户端回撥的腳本。在line配置模式下使用,用no移除。

script callback regexp

no script callback

其他與 script arap-callback同。

6. service exec-callback

用於向exec級的用户回撥。沒有參數。

相關命令:

arap callback

callback forced-wait

debug callback

debug confmodem

ppp callback

username

show,ping,trace&debug 命令介紹

show命令:

show interface---顯示接口統計信息。

一些常用的show interface命令:

show interface ethernet

show interface tokenring

show interface serial

show controllers---顯示接口卡控制器統計信息。

一些常用的show controllers命令:

show controllers cxbus

show controllers e1

show running-config---顯示當前路由器正在運行的配置。

show startup-config---顯示存在NVRAM配置。

show flash---Flash memory內容。

show buffers---顯示路由器中buffer pools統計信息。

show memory---路由器使用內存情況的統計信息,包括空閒池統計信息。

show processes---路由器活動進程信息。

show version---顯示系統硬件,軟件版本,配置文件和啟動的系統映象。

用 debug 命令

在超級用户模式下的debug命令能夠提供端口傳輸信息,節點產生的錯誤消息,診斷

協議包和其它有用的troubleshooting數據。

注意:使用debug命令要注意,它會佔用系統資源,引起一些不可預測現象。終止使

用debug命令請用no debug all命令。

Debug命令默認是顯示在控制枱端口上的,可用log buffer命令把輸出定向到buff

ers裏面。若是telnet過去的,可用Router#terminal monitor監控到控制枱信息。

標籤:CiscoIOS 命令集