導航:首頁 > 程序命令 > 思科命令語句

思科命令語句

發布時間:2024-08-02 06:56:36

❶ 思科交換機常用的100個命令

思科交換機常用的100個命令

在思科交換機上的命令有哪些?哪些命令最實用,你知道嗎?下面我為大家分享最常用的思科交換機基本命令,希望能幫助到大家!

1:進入特權模式enable

switch> enable

switch#

2:進入全局配置模式configure terminal

switch> enable

switch#c onfigure terminal

switch(conf)#

3:交換機命名hostname aptech2950 以aptech2950 為例

switch> enable

switch#c onfigure terminal

switch(conf)#hostname aptch-2950

aptech2950(conf)#

4:配置使能口令enable password cisco 以cisco 為例

switch> enable

switch#c onfigure terminal

switch(conf)#hostname aptch2950

aptech2950(conf)# enable password cisco

5:配置使能密碼enable secret ciscolab 以cicsolab 為例

switch> enable

switch#c onfigure terminal

switch(conf)#hostname aptch2950

aptech2950(conf)# enable secret ciscolab

6:設置虛擬區域網vlan 1 interface vlan 1

switch> enable

switch#c onfigure terminal

switch(conf)#hostname aptch2950

aptech2950(conf)# interface vlan 1

aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交換機埠ip 和子網掩



aptech2950(conf-if)#no shut 是配置處於運行中

aptech2950(conf-if)#exit

aptech2950(conf)#ip default-gateway 192.168.254 設置網關地址

7:進入交換機某一埠interface fastehernet 0/17 以17 埠為例

switch> enable

switch#c onfigure terminal

switch(conf)#hostname aptch2950

aptech2950(conf)# interface fastehernet 0/17

aptech2950(conf-if)#

8:查看命令show

switch> enable

switch# show version 察看系統中的所有版本信息

show interface vlan 1 查看交換機有關ip 協議的配置信息

show running-configure 查看交換機當前起作用的配置信息

show interface fastethernet 0/1 察看交換機1 介面具體配置和統計信息

show mac-address-table 查看mac 地址表

show mac-address-table aging-time 查看mac 地址表自動老化時間

9:交換機恢復出廠默認恢復命令

switch> enable

switch# erase startup-configure

switch# reload

10:雙工模式設置

switch> enable

switch#c onfigure terminal

switch2950(conf)#hostname aptch-2950

aptech2950(conf)# interface fastehernet 0/17 以17 埠為例

aptech2950(conf-if)#plex full/half/auto 有full , half, auto 三個可選



11:cdp 相關命令

switch> enable

switch# show cdp 查看設備的cdp 全局配置信息

show cdp interface fastethernet 0/17 查看17 埠的cdp 配置信息

show cdp traffic 查看有關cdp 包的統計信息

show cdp nerghbors 列出與設備相連的cisco 設備

12:csico2950 的密碼恢復

拔下交換機電源線。

用手按著交換機的MODE 鍵,插上電源線

在switch:後執行flash_ini 命令:switch: flash_ini

查看flash 中的文件: switch: dir flash:

把“config.text”文件改名為“config.old”: switch: rename flash: config.text flash: config.old

執行boot: switch: boot

交換機進入是否進入配置的對話,執行no :

進入特權模式察看flash 里的文件: show flash :

把“config.old”文件改名為“config.text”: switch: rename flash: config.old flash: config.text

把“ config.text ” 拷入系統的“ running-configure ”: flash: config.text system :

running-configure

把配置模式重新設置密碼存檔,密碼恢復成功。

13:交換機telnet 遠程登錄設置:

switch>en

switch#c onfigure terminal

switch(conf)#hostname aptech-2950

aptech2950(conf)#enable password cisco 以cisco 為特權模式密碼

aptech2950(conf)#interface fastethernet 0/1 以17 埠為telnet 遠程登錄埠

aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0

aptech2950(conf-if)#no shut

aptech2950(conf-if)#exit

aptech2950(conf)line vty 0 4 設置0-4 個用戶可以telnet 遠程登陸

aptech2950(conf-line)#login

aptech2950(conf-line)#password edge 以edge 為遠程登錄的用戶密碼

主機設置:

ip 192.168.1.2 主機的ip 必須和交換機埠的地址在同一網路



netmask 255.255.255.0

gate-way 192.168.1.1 網關地址是交換機埠地址

運行:

telnet 192.168.1.1

進入telnet 遠程登錄界面

password : edge

aptech2950>en

password: cisco

aptech#

14:交換機配置的重新載入和保存

設置完成交換機的配置後:

aptech2950(conf)#reload

是否保存(y/n) y: 保存設置信息n:不保存設置信息

1.在基於IOS 的.交換機上設置主機名/系統名:

switch(config)# hostname hostname

在基於CLI 的交換機上設置主機名/系統名:

switch(enable) set system name name-string

2.在基於IOS 的交換機上設置登錄口令:

switch(config)# enable password level 1 password

在基於CLI 的交換機上設置登錄口令:

switch(enable) set password

switch(enable) set enalbepass

3.在基於IOS 的交換機上設置遠程訪問:

switch(config)# interface vlan 1

switch(config-if)# ip address ip-address netmask

switch(config-if)# ip default-gateway ip-address

在基於CLI 的交換機上設置遠程訪問:

switch(enable) set interface sc0 ip-address netmask broadcast-address

switch(enable) set interface sc0 vlan

switch(enable) set ip route default gateway

4.在基於IOS 的交換機上啟用和瀏覽CDP 信息:

switch(config-if)# cdp enable

switch(config-if)# no cdp enable

為了查看Cisco 鄰接設備的CDP 通告信息:

switch# show cdp interface [type modle/port]

switch# show cdp neighbors [type mole/port] [detail]

在基於CLI 的交換機上啟用和瀏覽CDP 信息:

switch(enable) set cdp {enable|disable} mole/port

為了查看Cisco 鄰接設備的CDP 通告信息:

switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]

5.基於IOS 的交換機的埠描述:

switch(config-if)# description description-string

基於CLI 的交換機的埠描述:

switch(enable)set port name mole/number description-string

6.在基於IOS 的交換機上設置埠速度:

閱讀全文

與思科命令語句相關的資料

熱點內容
命令與征服4免cd補丁完美版 瀏覽:426
kotlin編譯為native 瀏覽:138
家用編譯機 瀏覽:547
電子加密貨幣最新政策 瀏覽:379
androidcanvas撤銷 瀏覽:269
安卓手機怎麼把圖標全部下移 瀏覽:185
飢荒被伺服器踢出怎麼進 瀏覽:170
c編譯器哪款好 瀏覽:732
快手寶哥發明什麼app 瀏覽:822
張艷玲編譯 瀏覽:66
android展開收起動畫 瀏覽:237
linuxxz文件 瀏覽:160
在游戲中心裏面怎麼玩到解壓神器 瀏覽:484
電腦發到手機裡面照片怎麼解壓 瀏覽:74
虛擬pdf列印機64位 瀏覽:413
支付寶AES加密和解密 瀏覽:379
編譯實驗原理下載 瀏覽:131
加密防偽溯源系統私人定做 瀏覽:222
掃碼給電動車充電的app叫什麼 瀏覽:760
關閉命令提醒 瀏覽:356