導航:首頁 > 程序命令 > 思科交換機的命令是什麼

思科交換機的命令是什麼

發布時間:2023-03-27 03:29:16

❶ Cisco常用的路由器交換機配置命令

cisco製造的路由器設備、交換機和其他設備承載了全世界80%的互聯網通信,成為矽谷中新經濟的傳奇,那麼你了解Cisco常用的路由器交換機配置命令嗎?下面是我整理的一些關於Cisco常用的路由器交換機配置命令的相關資料,供你參考。

Cisco常用的路由器支持的命令:

路由器顯示命令:

router#show run ;顯示配置信息

router#show interface ;顯示介面信息

router#show ip route ;顯示路由信息

router#show cdp nei ;顯示鄰居信息

router#reload ;重新起動

路由器口令設置:

router>enable ;進入特權模式

router#config terminal ;進入全局配置模式

router(config)#hostname ;設置交換機的主機名

router(config)#enable secret xxx ;設置特權加密口令

router(config)#enable password xxb ;設置特權非密口令

router(config)#line console 0 ;進入控制台口

router(config-line)#line vty 0 4 ;進入虛擬終端

router(config-line)#login ;要求口令驗證

router(config-line)#password xx ;設置登錄口令xx

router(config)#(Ctrl+z) ; 返回特權模式

router#exit ;返回命令

路由器配置:

router(config)#int s0/0 ;進入Serail介面

router(config-if)#no shutdown ;激活當前介面

router(config-if)#clock rate 64000 ;設置同步時鍾

router(config-if)#ip address ;設置IP地址

router(config-if)#ip address second ;設置第二個IP

router(config-if)#int f0/0.1 ;進入子介面

router(config-subif.1)#ip address ;設置子介面IP

router(config-subif.1)#encapsulation dot1q ;綁定vlan中繼協議

router(config)#config-register 0x2142 ;跳過配置文件

router(config)#config-register 0x2102 ;正常使用配置文件

router#reload ;重新引導

路由器文件操作:

router# running-config startup-config ;保存配置

router# running-config tftp ;保存配置到tftp

router# startup-config tftp ;開機配置存到tftp

router# tftp flash: ;下傳文件到flash

router# tftp startup-config ;下載配置文件

ROM狀態:

Ctrl+Break ;進入ROM監控狀態

rommon>confreg 0x2142 ;跳過配置文件

rommon>confreg 0x2102 ;恢復配置文件

rommon>reset ;重新引導

rommon> xmodem: flash: ;從console傳輸文件

rommon>IP_ADDRESS=10.65.1.2 ;設置路由器IP

rommon>IP_SUBNET_MASK=255.255.0.0 ;設置路由器掩碼

rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP伺服器IP

rommon>TFTP_FILE=c2600.bin ;指定下載的文件

rommon>tftpdnld ;從tftp下載

rommon>dir flash: ;查看快閃記憶體內容

rommon>boot ;引導IOS

靜態路由:

ip route ;命令格式

router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;靜態路由舉例

router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默認路由舉例

動態路由:

router(config)#ip routing ;啟動路由轉發

router(config)#router rip ;啟動RIP路由協議。

router(config-router)#network ;設置發布路由

router(config-router)#negihbor ;點對點幀中繼用。

幀中繼命令:

router(config)#frame-relay switching ;使能幀中繼交換

router(config-s0)#encapsulation frame-relay ;使能幀中繼

router(config-s0)#fram-relay lmi-type cisco ;設置管理類型

router(config-s0)#frame-relay intf-type DCE ;設置為DCE

router(config-s0)#frame-relay dlci 16 ;

router(config-s0)#frame-relay local-dlci 20 ;設置虛電路號

router(config-s0)#frame-relay interface-dlci 16 ;

router(config)#log-adjacency-changes ;記錄鄰接變化

router(config)#int s0/0.1 point-to-point ;設置子介面點對點

router#show frame pvc ;顯示永久虛電路

router#show frame map ;顯示映射

基本訪問控制列表:

router(config)#access-list permit|deny

router(config)#interface ;default:deny any

router(config-if)#ip access-group in|out ;defaultut

例1:

router(config)#access-list 4 permit 10.8.1.1

router(config)#access-list 4 deny 10.8.1.0 0.0.0.255

router(config)#access-list 4 permit 10.8.0.0 0.0.255.255

router(config)#access-list 4 deny 10.0.0.0 0.255.255.255

router(config)#access-list 4 permit any

router(config)#int f0/0

router(config-if)#ip access-group 4 in

擴展訪問控制列表:

access-list permit|deny icmp [type]

access-list permit|deny tcp [port]

例3:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo

router(config)#access-list 101 permit ip any any

router(config)#int s0/0

router(config-if)#ip access-group 101 in

例3:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80

router(config)#access-list 102 permit ip any any

router(config)#interface s0/1

router(config-if)#ip access-group 102 out

刪除訪問控制例表:

router(config)#no access-list 102

router(config-if)#no ip access-group 101 in

路由器的nat配置

Router(config-if)#ip nat inside ;當前介面指定為內部介面

Router(config-if)#ip nat outside ;當前介面指定為外部介面

Router(config)#ip nat inside source static [p] [port]

Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1

Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80

Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0

Router(config)#ip nat inside source list 1 pool p1

Router(config)#ip nat inside destination list 2 pool p2

Router(config)#ip nat inside source list 2 interface s0/0 overload

Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary

Router#show ip nat translation

rotary 參數是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。

overload參數用於PAT 將內部IP映射到一個公網IP不同的埠上。

外部網關協議配置

routerA(config)#router bgp 100

routerA(config-router)#network 19.0.0.0

routerA(config-router)#neighbor 8.1.1.2 remote-as 200

配置PPP驗證:

RouterA(config)#username password

RouterA(config)#int s0

RouterA(config-if)#ppp authentication {chap|pap}

3.PIX防火牆命令

Pix525(config)#nameif ethernet0 outside security0 ;命名介面和級別

Pix525(config)#interface ethernet0 auto ;設置介面方式

Pix525(config)#interface ethernet1 100full ;設置介面方式

Pix525(config)#interface ethernet1 100full shutdown

Pix525(config)#ip address inside 192.168.0.1 255.255.255.0

Pix525(config)#ip address outside 133.0.0.1 255.255.255.252

Pix525(config)#global (if_name) natid ip-ip ;定義公網IP區間

Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句

Pix525(config)#global (outside) 1 133.0.0.1 ;例句

Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉設置

Pix525(config)#nat (if_name) nat_id local_ip [netmark]

Pix525(config)#nat (inside) 1 0 0

內網所有主機(0代表0.0.0.0)可以訪問global 1指定的外網。

Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0

內網172.16.5.0/16網段的主機可以訪問global 1指定的外網。

Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式

Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句

Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句

Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8

表示內部ip地址192.168.0.8,訪問外部時被翻譯成133.0.0.1全局地址。

Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8

中間區域ip地址172.16.0.8,訪問外部時被翻譯成133.0.0.1全局地址。

Cisco常用的交換機支持的命令:

交換機基本狀態:

switch: ;ROM狀態, 路由器是rommon>

hostname> ;用戶模式

hostname# ;特權模式

hostname(config)# ;全局配置模式

hostname(config-if)# ;介面狀態

交換機口令設置:

switch>enable ;進入特權模式

switch#config terminal ;進入全局配置模式

switch(config)#hostname ;設置交換機的主機名

switch(config)#enable secret xxx ;設置特權加密口令

switch(config)#enable password xxa ;設置特權非密口令

switch(config)#line console 0 ;進入控制台口

switch(config-line)#line vty 0 4 ;進入虛擬終端

switch(config-line)#login ;允許登錄

switch(config-line)#password xx ;設置登錄口令xx

switch#exit ;返回命令

交換機VLAN設置:

switch#vlan database ;進入VLAN設置

switch(vlan)#vlan 2 ;建VLAN 2

switch(vlan)#no vlan 2 ;刪vlan 2

switch(config)#int f0/1 ;進入埠1

switch(config-if)#switchport access vlan 2 ;當前埠加入vlan 2

switch(config-if)#switchport mode trunk ;設置為干線

switch(config-if)#switchport trunk allowed vlan 1,2 ;設置允許的vlan

switch(config-if)#switchport trunk encap dot1q ;設置vlan 中繼

switch(config)#vtp domain ;設置發vtp域名

switch(config)#vtp password ;設置發vtp密碼

switch(config)#vtp mode server ;設置發vtp模式

switch(config)#vtp mode client ;設置發vtp模式

交換機設置IP地址:

switch(config)#interface vlan 1 ;進入vlan 1

switch(config-if)#ip address ;設置IP地址

switch(config)#ip default-gateway ;設置默認網關

switch#dir flash: ;查看快閃記憶體

交換機顯示命令:

switch#write ;保存配置信息

switch#show vtp ;查看vtp配置信息

switch#show run ;查看當前配置信息

switch#show vlan ;查看vlan配置信息

switch#show interface ;查看埠信息

switch#show int f0/0 ;查看指定埠信息

❷ CISCO交換機的查看配置命令是什麼

1、Router#show startup-config //查看啟動配置文件

啟動配置文件startup-config位於路由器的NVRAM中,可以長期保存。它在啟動路由器時裝入RAM,成為running-config。

2、Router#show version //查看路由器的版本信息

3、Router#show ip interface brief //查看路由器的介面狀態

(2)思科交換機的命令是什麼擴展閱讀:

工作在數據鏈路層。交換機擁有一條很高帶寬的背部匯流排和內部交換矩陣。交換機的所有的埠都掛接在這條背部匯流排上,控制電路收到數據包以後,處理埠會查找內存中的地址對照表以確定目的MAC(網卡的硬體地址)的NIC(網卡)掛接在哪個埠上。

通過內部交換矩陣迅速將數據包傳送到目的埠,目的MAC若不存在,廣播到所有的埠,接收埠回應後交換機會「學習」新的地址,並把它添加入內部MAC地址表中。使用交換機也可以把網路「分段」,通過對照MAC地址表,交換機只允許必要的網路流量通過交換機。

通過交換機的過濾和轉發,可以有效的減少沖突域,但它不能劃分網路層廣播,即廣播域。交換機在同一時刻可進行多個埠對之間的數據傳輸。每一埠都可視為獨立的網段,連接在其上的網路設備獨自享有全部的帶寬,無須同其他設備競爭使用。當節點A向節點D發送數據時,節點B可同時向節點C發送數據,而且這兩個傳輸都享有網路的全部帶寬,都有著自己的虛擬連接。

假使這里使用的是10Mbps的乙太網交換機,那麼該交換機這時的總流通量就等於2×10Mbps=20Mbps,而使用10Mbps的共享式HUB時,一個HUB的總流通量也不會超出10Mbps。

總之,交換機是一種基於MAC地址識別,能完成封裝轉發數據包功能的網路設備。交換機可以「學習」MAC地址,並把其存放在內部地址表中,通過在數據幀的始發者和目標接收者之間建立臨時的交換路徑,使數據幀直接由源地址到達目的地址。

❸ 思科交換機關閉埠命令

思科交換機關閉埠命令是shut down。

思科shutdown是關閉介面,介面狀態會變為DOWN,no shutdown是激活介面,狀態變為UP。

多數Cisco交換機默認具有處於非連接狀態的埠。這表示埠當前沒有連接到任何設備,但如果將其連接到其他正常運行的設備,它將可以建立連接。



Cisco的工作模式

Cisco設備有常用模式為:用戶模式、特權模式、全局模式、埠模式。它們之間呈現出遞進關系:用戶模式->特權模式->全局模式->埠模式。

1、用戶模式

交換機啟動完成後按下Enter鍵,首先進入的就是用戶模式,在些用戶模式下用戶將受到極大的限制,只能用來查看一些統計信息。

Switch>

2、特權模式

在用戶模式下輸入enable(可簡寫為en(命令就可以進入特權模式,用戶在該模式下可以查看並修改Cisco設備的配置。

Switch>en

Switch#

3、全局配置模式在特權模式下輸入config terminal(可簡寫conf t)命令即可,用戶在該模式下可修改交換機的全局配置。如修改主機名。

Switch#conf t

Switch(config)#

4、介面模式

在全局配置模式下輸入interface fastethernet 0/1(可簡寫int f0/1)就可以進入到介面模式,在這個模式下所做的配置都是針對f0/1這個介面所設定的。如設定IP等

Switch(config)#int f0/1

Switch(config-if)#

退回到上一模式用exit命令

❹ 求:思科3640交換機查看vlan命令和配置命令和配置乙太網介面命令.

1、查看vlan命令:

Switch#show vlan#查看vlan資料庫,vlan信息和所屬介面

2、配置VLAN命令(交換機配置VLAN,並給將埠加入到該VLAN為例):

cisco-sw1(config)#vlan 2

cisco-sw1(config-vlan)#name test

cisco-sw1(config-vlan)#exit

cisco-sw1(config)#interface fastEthernet 0/1

cisco-sw1(config-if)#switchport mode access

cisco-sw1(config-if)#switchport access vlan 2

(4)思科交換機的命令是什麼擴展閱讀:

思科交換機其他查看和配置命數世令:

1、Switch#show running-config#查看運行配置,可以通過回車鍵逐行顯示,也可通過空格鍵逐頁顯示

2、Switch#show version#查看設備軟體版本信息

3、Switch#show clock#查看培畢拿系統時鍾也可用於查看log日誌後對應時鍾分析異常log的發起時間

4、Switch#show log#查看日誌,如介面異常關閉,鏈路的通斷,主備機切換

5、Switch#show interface#查看介面詳細狀態,如IP地址、MAC地址、帶寬負載及輸入輸出速率等

6、Switch#show interface description#快速查看介面連接狀態與描述

7、Switch#show interface status#快速查看介面狀態及配搭所屬vlan及速率雙工

8、Switch#show cdp neighbor#查看CDP鄰居,CDP協議屬於思科私有協議,只能用於查看思科設備,可以查看設備的物理鏈路狀態和連接介面管理地址

9、Switch#show mac-addess-table [dynamic]#查看交換機的MAC地址,括弧裡面是可選項

❺ 思科交換機常用的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 的交換機上設置埠速度:

❻ 思科2960交換機配置命令都有哪些

思科2960交換機配置命令如下:

1、access: 主要用來接入終端設備,如PC機、伺服器、列印伺服器等。

2、trunk: 主要用在連接其它交換機,以便在線路上承載多個vlan。

3、multi: 在一個線路中承載多個vlan,但不像trunk,它不對承載的數據打標簽。主要用於接入支持多vlan的伺服器或者一些網路分析設備。現在基本不使用此類介面,在cisco的網路設備中,也基本不支持此類介面了。


(6)思科交換機的命令是什麼擴展閱讀:

交換機口令設置:

1、switch>enable;進入特權模式、switch#configterminal;進入全局配置模式、switch(config)#hostname;設置交換機的主機名。

2、switch(config)#enablesecretxxx;設置特權加密口令、switch(config)#enablepasswordxxa;設置特權非密口令。

3、switch(config)#lineconsole0;進入控制台口、switch(config-line)#linevty04;進入虛擬終端。

4、switch(config-line)#login;允許登錄、switch(config-line)#passwordxx;設置登錄口令xx、switch#exit;返回命令。

❼ 思科交換機進特權模式的命令是什麼

router #

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

router > enable

router #c onfigure terminal

router (conf)#

3:交換機命名 hostname routera 以routerA為例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routera (conf)#

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

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# enable password cisco

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

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# enable secret ciscolab

6:進入路由器某一埠 interface fastehernet 0/17 以17埠為例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# interface fastehernet 0/17

routerA (conf-if)#

進入路由器的某一子埠 interface fastethernet 0/17.1 以17埠的1子埠為例

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

routerA (conf)# interface fastehernet 0/17.1

7:設置埠ip地址信息

router > enable

router #c onfigure terminal

router(conf)#hostname routerA

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

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

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

routerA (conf-if)#exit

8:查看命令 show

router > enable

router # 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地址表自動老化時間

show controllers serial + 編號 查看串口類型

show ip router 查看路由器的路由表

9:cdp相關命令

router > enable

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

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

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

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

10:csico2600的密碼恢復

重新啟動路由器,在啟動過程中按下win+break鍵,使路由器進入rom monitor

在提示符下輸入命令修改配置寄存器的值,然後重新啟動路由器

remmon1>confreg 0x2142

remmon2>reset

重新啟動路由器後進入setup模式,選擇「no」,退回到exec模式,此時路由器原有的配置仍然保存在startup-config中,為使路由器恢復密碼後配置不變把startup-config中配置保存到running-config中,然後重新設置enable密碼,並把配置寄存器改回 0x2102:

router>enable

router# startup-config running-config

router#c onfigure terminal

router(conf)#enable password cisco

router(conf)#c onfig-register 0x2102

保存當前配置到startup-config , 重新啟動路由器。

router # running-config startup-config

router #reload

11:路由器telnet遠程登錄設置:

router>en

router #c onfigure terminal

router (conf)#hostname routerA

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

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

routerA (conf-if)#ip address 192.168.1.1 255.255.255.0

routerA (conf-if)#no shut

routerA (conf-if)#exit

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

routerA (conf-line)#login

routerA (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

routera>en

password: cisco

routera#

12:配置路由器的標識 banner $?????$

在全局配置的模式下利用「banner」命令可以配置路由器的提示信息,所有連接到路由器的終端會收到。

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#banner motd $This is aptech company』 router ! Please don』t change the

configuration without permission!$

13:配置介面標識 description ???

介面標識用於區分路由器的各個介面。

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#interface fastethernet 0/1 以0/1 介面為例

routerA(conf-if)# description this is a fast Ethernet port used to connecting the company』s intranet!

14:配置超時

超時適用於設置在多長時間沒有對console進行配置,自動返回exec會話時間。默認為10分鍾。

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#line console 0

routerA(conf-if)#e xec-timeout 0 0 第一個「0」代表分鍾,第二個「0」代表秒

15:配置串口參數

兩台路由器通過串口連接需要一個做為DTE,一個做為DCE。DCE設備要向DTE設備提供時鍾頻率和帶寬。

DCE配置:

router>en

router #c onfigure terminal

router (conf)#hostname routerA

routerA(conf)#interface serial 0/0

routerA(conf_if)#clock rate 64000 提供時鍾頻率為64000

routerA(conf_if)#bandwidth 64 提供帶寬為64

DTE配置:路由器串口配置ip地址

router>en

router #c onfigure terminal

router (conf)#hostname routerB

routerB(conf)#interface serial 0/0

routerB(conf_if)#ip address 192.168.1.1 255.255.255.0

16:靜態路由的配置

配置路由器A的主機名和介面參數

router>enable

router#c onfigure terminal

router(conf)#hostname routerA

routerA(conf)#interface fastethernet 0/1 路由器A的1埠為兩路由器的連接埠

routerA(conf-if)#ip address 192.168.2.1 255.255.255.0

routerA(conf-if)#no shutdown

routerA(conf-if)#exit

routerA(conf)# interface fastethernet 0/0 路由器A的0埠為與主機的連接埠

routerA(conf-if)#ip address 192.168.1.2 255.255.255.0

routerA(conf-if)#no shutdown

主機A的ip地址為 192.168.1.1

255.255.255.0

192.168.1.2

配置路由器B的主機名和介面參數

router>enable

router#c onfigure terminal

router(conf)#hostname routerB

routerB(conf)#interface fastethernet 0/0 路由器B的0埠為兩路由器的連接埠

routerB(conf-if)#ip address 192.168.2.2 255.255.255.0

routerB(conf-if)#no shutdown

routerB (conf-if)#exit

routerB(conf)# interface fastethernet 0/1 路由器B的1埠為與主機的連接埠

routerB(conf-if)#ip address 192.168.3.1 255.255.255.0

主機B的ip地址為 192.168.3.2

255.255.255.0

192.168.3.1

配置路由器A的靜態路由表

routerA(conf)#ip router 192.168.3.0 255.255.255.0 192.168.2.2

配置路由器B的靜態路由表

routerA(conf)#ip router 192.168.1.0 255.255.255.0 192.168.2.1

在routerA和routerB上配置默認路由

routerA(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.2

routerA(conf)#ip classless

routerB(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.1

routerB(conf)#ip classless

在routerA和routerB上配置動態路由(RIP)

routerA(conf)#router rip

routerA(conf)#network 192.168.1.0

routerA(conf)#network 192.168.2.0

routerB(conf)# router rip

routerB(conf)#network 192.168.2.0

routerB(conf)#network 192.168.3.0

2. 路由器支持的命令:

路由器顯示命令:

router#show run ;顯示配置信息

router#show interface ;顯示介面信息

router#show ip route ;顯示路由信息

router#show cdp nei ;顯示鄰居信息

router#reload ;重新起動

路由器口令設置:

router>enable ;進入特權模式

router#config terminal ;進入全局配置模式

router(config)#hostname ;設置交換機的主機名

router(config)#enable secret xxx ;設置特權加密口令

router(config)#enable password xxb ;設置特權非密口令

router(config)#line console 0 ;進入控制台口

router(config-line)#line vty 0 4 ;進入虛擬終端

router(config-line)#login ;要求口令驗證

router(config-line)#password xx ;設置登錄口令xx

router(config)#(Ctrl+z) ;

返回特權模式

❽ 思科交換機路由器常規配置命令大全

你還在為不知道而煩惱么?接下來是我為大家收集的教程,希望能幫到大家。

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

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

配置網路時常採用的命令:和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.動態路由

1RIP配置

Router rip

Network 網路號

Show ip route

Show ip protocol

Debug ip

2OSPF 配置

Router ospf 程序號

Redistribute 其它路由協議

Network 埠網路 反掩碼 area 區域號

Area 區域號 range 網路號 掩碼

Area 區域號 default-cost 花銷值

Ip ospf priority number

Ip ospf cost 花銷值

Show ip ospf database

3BGP 配置

Router bgp 自治域號

Redistribute 其它路由協議

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

Aggregate-address 網路號 掩碼 summary-only 匯總網路

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

四、流量控制

1被動埠

passive interface 埠號

2預設路由

ip default 網路號/埠網路

3靜態路由

ip route 目標網路號 掩碼 埠號

4ACL過濾表

全域性上 access-list 訪問號1 {permitdeny} 反掩碼號 [ established]

access-list 訪問號2 {permitdeny} IP/TCP協議 源網路 目的網路

操作符 引數

埠上access-group 訪問號 inout

distribute-list 訪問號 inout 埠號

4Null 0 interface

Ip route address mask null 0

五、廣義網配置

1PPP

Ppp pap sent-usename 封裝

Ppp chap hostname

Ppp chap password

2X.25

encapsulation x25 [dce]

x25 address

x25 map 協議地址 /*SVC */

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

ip switching

x25 route x.121地址 介面 x.121對映地址

3FrameRelay

Frame-relay local-dlci IP網路號

Frame-relay map 協議地址

Frame-relay lmi-type ansi

❾ cisco配置交換機使能加密口令是什麼命令是什麼

命令為:lineconsole0。

如下參考:

1.首先點擊電腦打開思科軟體。使用控制台電纜將計算機連接到路由器。

閱讀全文

與思科交換機的命令是什麼相關的資料

熱點內容
如何在蘋果平板上設置app切換 瀏覽:706
帶著金手指到民國 瀏覽:593
les肉電影 瀏覽:821
嬰兒武打片 瀏覽:642
師徒訓誡小說推薦 瀏覽:548
好後綴演算法 瀏覽:19
關閉終端的命令 瀏覽:511
有聲黃讀 瀏覽:542
三大頂級動作片推薦胸大的女人電影 瀏覽:367
哺乳期誘惑電影 瀏覽:706
哪些雲伺服器可以搭建郵件伺服器 瀏覽:687
美國試禁忌當上演員 瀏覽:304
hqss/vod/index.asp 瀏覽:404
男主很帥的歐美大尺度電影 瀏覽:356
怎麼消除安卓的系統通知 瀏覽:478
程序員3萬4是稅後嗎 瀏覽:868
javagui窗口 瀏覽:522
風月片網站動漫 瀏覽:289
電影拉幫套 瀏覽:745
鴉王電影國語版 瀏覽:600