導航:首頁 > 程序命令 > 思科的保存配置命令是什麼

思科的保存配置命令是什麼

發布時間:2022-11-13 19:42:25

㈠ Cisco路由器配置命令

Cisco路由器配置命令大全

為方便考生復習思科路由器的配置,以下是我為大家整理的Cisco路由器配置命令,歡迎閱讀與收藏。

1. switch配置命令

(1)模式轉換命令

用戶模式----特權模式, 使用命令"enable"

特權模式----全局配置模式, 使用命令"config t"

全局配置模式----介面模式, 使用命令"interface+介面類型+介面號"

全局配置模式----線控模式, 使用命令"line+介面類型+介面號"

注:

用戶模式:查看初始化的信息.

特權模式:查看所有信息、調試、保存配置信息

全局模式:配置所有信息、針對整個路由器或交換機的所有介面

介面模式:針對某一個介面的配置

線控模式:對路由器進行控制的介面配置

(2)配置命令

show running config 顯示所有的配置

show versin 顯示版本號和寄存器值

shut down 關閉介面

no shutdown 打開介面

ip add +ip地址 配置IP地址

secondary+IP地址 為介面配置第二個IP地址

show interface+介面類型+介面號 查看介面管理性

show controllers interface 查看介面是否有DCE電纜

show history 查看歷史記錄

show terminal 查看終端記錄大小

hostname+主機名 配置路由器或交換機的標識

config memory 修改保存在NVRAM中的啟動配置

exec timeout 0 0 設置控制台會話超時為0

service password-encryptin 手工加密所有密碼

enable password +密碼 配置明文密碼

ena sec +密碼 配置密文密碼

line vty 0 4/15 進入telnet介面

password +密碼 配置telnet密碼

line aux 0 進入AUX介面

password +密碼 配置密碼

line con 0 進入CON介面

password +密碼 配置密碼

bandwidth+數字 配置帶寬

no ip address 刪除已配置的IP地址

show startup config 查看NVRAM中的配置信息

run-config atartup config 保存信息到NVRAM

write 保存信息到NVRAM

erase startup-config 清除NVRAM中的配置信息

show ip interface brief 查看介面的謫要信息

banner motd # +信息 + # 配置路由器或交換機的描素信息

description+信息 配置介面聽描素信息

vlan database 進入VLAN資料庫模式

vlan +vlan號+ 名稱 創建VLAN

switchport access vlan +vlan號 為VLAN為配介面

interface vlan +vlan號 進入VLAN介面模式

ip add +ip地址 為VLAN配置管理IP地址

vtp+service/tracsparent/client 配置SW的VTP工作模式

vtp +domain+域名 配置SW的VTP域名

vtp +password +密碼 配置SW的密碼

switchport mode trunk 啟用中繼

no vlan +vlan號 刪除VLAN

show spamming-tree vlan +vlan號 查看VLA怕生成樹議

2. 路由器配置命令

ip route+非直連網段+子網掩碼+下一跳地址 配置靜態/默認路由

show ip route 查看路由表

show protocols 顯示出所有的被動路由協議和介面上哪些協議被設置

show ip protocols 顯示了被配置在路由器上的路由選擇協議, 同時給出了在路由選擇協議中使用的定時器等信息

router rip 激活RIP協議

路由器的幾個基本命令:

Router>enable 進入特權模式

Router#disable 從特權模式返回到用戶模式

Router#configure terminal 進入到全局配置模式

Router(config)#interface ethernet 1 進入到路由器編號為1的乙太網口

exit 返回上層模式

end 直接返回到特權模式

========================================================

注意:

1、CISCO CATALYST(交換機),如果在初始化時沒有發現「用戶配置」文件,就會自動載入Default Settings(默認配置)文件,進行交換機初始化,以確保交換機正常工作。

2、CISCO Router(路由器)在初始化時,如果沒有發現「用戶配置」文件,系統會自動進入到「初始化配置模式」(系統配置對話模式,SETUP模式, STEP BY STEP CONFIG模式),不能正常工作!

========================================================

1、CONSOLE PORT(管理控制台介面):距離上限制,獨占的方式。剛開始配置的時候一般使用這個。

2、AUX port(輔助管理介面):可以掛接MODEM實現遠程管理,獨占的方式。

3、Telnet:多人遠程管理(決定於性能,VTY線路數量)不安全。後期維護,遠程管理登陸。

========================================================

注意:

交換機、路由器配置命令都是回車後立即執行,立即生效的。在運行中的機器上修改命令的時候要特別注意。

========================================================

Router(config)#hostname ?

WORD This system's network name

在配置模式下修改當前主機的本地標識,例:

------------------

Router(config)#hostname r11

r11(config)#

------------------

r11(config-if)#ip address ?

A.B.C.D IP address

為當前埠設置IP地址,使用前先進入需要配置的埠,例:

------------------

r11(config)#interface ethernet 1

r11(config-if)#ip address 172.16.1.1 255.255.255.0

------------------

r11>show version

r11#show version 觀察IOS版本,設備工作時間,相關介面列表

r11#show running-config 查看當前生效的配置,此配置文件存儲在RAM

r11#show interfaces ethernet 1 查看乙太網介面的狀態,工作狀態等等等...

========================================================

r11#reload 重新載入Router(重啟)

r11#setup 手工進入setup配置模式

r11#show history 查看歷史命令(最近剛用過的命令)

r11#terminal history size<0-256>設置命令緩沖區大小,0 : 代表不緩存

r11# running-config startup-config 保存當前配置

注意概念:

nvram:非易失性內存,斷電信息不會丟失 <-- 用戶配置 <-- 保存著startup-config

ram:隨機存儲器,斷電信息全部丟失 <-- 當前生效配置 <-- 保存著running-config

startup-config:在每次路由器或是交換機啟動時候,會主動載入(默認情況)

========================================================

設置說明和密碼的幾個命令:

r11(config)#banner motd [char c] 同時要以[char c]另起一行結束,描述機器登陸時的說明

r11(config-if)#description 描述介面注釋,需要在埠配置模式下

配置console口密碼:

------------------

r11(config)#line console 0 進入到consolo 0

r11(config-line)#password eliuzd 設置一個密碼為「eliuzd」

r11(config-line)#login 設置login(登陸)時使用密碼

------------------

配置enable密碼:

------------------

r11(config)#enable password cisco 設置明文的enable密碼

r11(config)#enable secret eliuzd 設置暗文的enable密碼(優先於明文被使用)

r11(config)#service password-encryption 加密系統所有明文密碼(功能較弱)

------------------

配置Telnet密碼:

------------------

r11(config)#line vty 0

r11(config-line)#password cisco

r11(config-line)#login

------------------

========================================================

配置虛擬回環介面:(回環介面默認為UP狀態)

(config)# 下,虛擬一個埠

------------------

r11(config)#interface loopback 0 創建一個回環介面loopback 0

r11(config-if)#ip address 192.168.1.1 255.255.255.0 配置它的IP地址

no * 做配置的反向操作(刪除配置)

------------------

=========================================================

路由器 DCE/DTE 僅存在廣域網中

r11#show controllers serial 0 用於查看DCE與DTE的屬性,serial 0路由器廣域網埠

DCE的Router需要配置時鍾頻率

r11(config-if)#clock rate ? 配置DCE介面的時鍾頻率(系統指定頻率)

一般實際情況下,這個不需要自己配置,因為DCE設備都在運營商那。

=========================================================

r11#show interfaces serial 1

查看埠狀態,第一行提示說明

Serial1 is administratively down, Line protocol is down

沒有使用no shutdown命令激活埠

Serial1 is down, Line protocol is down

1、對方沒有no shutdown激活埠

2、線路損壞,介面沒有任何連接線纜

Serial1 is up, line protocol is down

1、對方沒有配置相同的二層協議,Serial介面default encapsulation: HDLC

2、可能沒有配置時鍾頻率

3、可能沒有正確的配置三層地址(可能)

Serial1 is up,line protocol is up

介面工作正常

========================================================

查看CDP信息的幾個命令:

r11#show cdp neighbors 查看CDP的鄰居(不含IP)

r11#show cdp neighbors detail 查看CDP的鄰居(包含三層的IP地址)

r11#show cdp entry * 查看CDP的鄰居(包含三層的IP地址)老命令

r1(config)#no cdp run 在全局配置模式關閉CDP協議(影響所有的介面)

r1(config-if)#no cdp enable 在介面下關閉CDP協議(僅僅影響指定的介面)

r11#clear cdp table 清除CDP鄰居表

r11#show cdp interface serial 1 查看介面的CDP信息

注意兩個提示:

Sending CDP packets every 60 seconds(每60秒發送cdp數據包)

HoldTime 180 seconds(每個cdp數據包保持180秒)

========================================================

r11(config)#ip host 設置靜態的主機名映射

r11#show sessions 查看設置過的映射主機名

========================================================

Telnet *.*.*.* 被telnet的設備,需要設置line vty的密碼,如果需要進入特權模式需要配置enable密碼

㈡ 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路由器配置命令及方法:

第一章 路由器配置基礎

一、基本設置方式

二、命令狀態

三、設置對話過程

四、常用命令

五、配置IP定址

六、配置靜態路由

第二章 廣域網協議設置

一、HDLC

二、PPP

三、X.25

四、Frame Relay

五、ISDN

六、PSTN

第三章 路由協議設置

一、RIP協議

二、IGRP協議

三、OSPF協議

四、重新分配路由

五、IPX協議設置

第四章 服務質量及訪問控制

一、協議優先順序設置

二、隊列定製

三、訪問控制

第五章 虛擬區域網(VLAN)路由

一、虛擬區域網(VLAN)

二、交換機間鏈路(ISL)協議

三、虛擬區域網(VLAN)路由實例

第一章:路由器配置基礎

一、基本設置方式

一般來說,可以用5種方式來設置路由器:

1.Console口接終端或運行終端模擬軟體的微機;

2.AUX口接MODEM,通過電話線與遠方的終端或運行終端模擬軟體的微機相連;

3.通過Ethernet上的TFTP伺服器;

4.通過Ethernet上的TELNET程序;

5.通過Ethernet上的SNMP網管工作站。

但路由器的第一次設置必須通過第一種方式進行,此時終端的硬體設置如下:

波特率 :9600

數據位 :8

停止位 :1

奇偶校驗: 無

二、命令狀態

1. router>

路由器處於用戶命令狀態,這時用戶可以看路由器的連接狀態,訪問其它網路和主機,但不能看到和更改路由器的設置內容。

2. router#

在router>提示符下鍵入enable,路由器進入特權命令狀態router#,這時不但可以執行所有的用戶命令,還可以看到和更改路由器的設置內容。

3. router(config)#

在router#提示符下鍵入configure terminal,出現提示符router(config)#,此時路由器處於全局設置狀態,這時可以設置路由器的全局參數。

4. router(config-if)#; router(config-line)#; router(config-router)#;…

路由器處於局部設置狀態,這時可以設置路由器某個局部的參數。

5. >

路由器處於RXBOOT狀態,在開機後60秒內按ctrl-break可進入此狀態,這時路由器不能完成正常的功能,只能進行軟體升級和手工引導。

設置對話狀態

這是一台新路由器開機時自動進入的狀態,在特權命令狀態使用SETUP命令也可進入此狀態,這時可通過對話方式對路由器進行設置。

三、設置對話過程

顯示提示信息

全局參數的設置

介面參數的設置

顯示結果

利用設置對話過程可以避免手工輸入命令的煩瑣,但它還不能完全代替手工設置,一些特殊的設置還必須通過手工輸入的方式完成。

進入設置對話過程後,路由器首先會顯示一些提示信息:

--- System Configuration Dialog ---

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

這是告訴你在設置對話過程中的任何地方都可以鍵入“?”得到系統的幫助,按ctrl-c可以退出設置過程,預設設置將顯示在‘[]’中。然後路由器會問是否進入設置對話:

Would you like to enter the initial configuration dialog? [yes]:

如果按y或回車,路由器就會進入設置對話過程。首先你可以看到各埠當前的狀況:

First, would you like to see the current interface summary? [yes]:

Any interface listed with OK? value "NO" does not have a valid configuration

Interface IP-Address OK? Method Status Protocol

Ethernet0 unassigned NO unset up up

Serial0 unassigned NO unset up up

……… ……… … …… … …

然後,路由器就開始全局參數的設置:

Configuring global parameters:

1.設置路由器名:

Enter host name [Router]:

2.設置進入特權狀態的密文(secret),此密文在設置以後不會以明文方式顯示:

The enable secret is a one-way cryptographic secret used

instead of the enable password when it exists.

Enter enable secret: cisco

3.設置進入特權狀態的密碼(password),此密碼只在沒有密文時起作用,並且在設置以後會以明文方式顯示:

The enable password is used when there is no enable secret

and when using older software and some boot images.

Enter enable password: pass

4.設置虛擬終端訪問時的密碼:

Enter virtual terminal password: cisco

5.詢問是否要設置路由器支持的各種網路協議:

Configure SNMP Network Management? [yes]:

Configure DECnet? [no]:

Configure AppleTalk? [no]:

Configure IPX? [no]:

Configure IP? [yes]:

Configure IGRP routing? [yes]:

Configure RIP routing? [no]:

………

6.如果配置的是撥號訪問伺服器,系統還會設置非同步口的參數:

Configure Async lines? [yes]:

1) 設置線路的最高速度:

Async line speed [9600]:

2) 是否使用硬體流控:

Configure for HW flow control? [yes]:

3) 是否設置modem:

Configure for modems? [yes/no]: yes

4) 是否使用默認的modem命令:

Configure for default chat s cript? [yes]:

5) 是否設置非同步口的PPP參數:

Configure for Dial-in IP SLIP/PPP access? [no]: yes

6) 是否使用動態IP地址:

Configure for Dynamic IP addresses? [yes]:

7) 是否使用預設IP地址:

Configure Default IP addresses? [no]: yes

8) 是否使用TCP頭壓縮

Configure for TCP Header Compression? [yes]:

9) 是否在非同步口上使用路由表更新:

Configure for routing updates on async links? [no]: y

10) 是否設置非同步口上的其它協議。

接下來,系統會對每個介面進行參數的設置。

1.Configuring interface Ethernet0:

1) 是否使用此介面:

Is this interface in use? [yes]:

2) 是否設置此介面的IP參數:

Configure IP on this interface? [yes]:

3) 設置介面的IP地址:

IP address for this interface: 192.168.162.2

4) 設置介面的IP子網掩碼:

Number of bits in subnet field [0]:

Class C network is 192.168.162.0, 0 subnet bits; mask is /24

在設置完所有介面的參數後,系統會把整個設置對話過程的結果顯示出來:

The following configuration command s cript was created:

hostname Router

enable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1

enable password pass

…………

請注意在enable secret後面顯示的是亂碼,而enable password後面顯示的是設置的內容。

顯示結束後,系統會問是否使用這個設置:

Use this configuration? [yes/no]: yes

如果回答yes,系統就會把設置的結果存入路由器的NVRAM中,然後結束設置對話過程,使路由器開始正常的工作。

四、常用命令

1. 幫助

在IOS操作中,無論任何狀態和位置,都可以鍵入“?”得到系統的幫助。

2. 改變命令狀態

任務 命令

進入特權命令狀態 enable

退出特權命令狀態 disable

進入設置對話狀態 setup

進入全局設置狀態 config terminal

退出全局設置狀態 end

進入埠設置狀態 interface type slot/number

進入子埠設置狀態 interface type number.subinterface [point-to-point | multipoint]

進入線路設置狀態 line type slot/number

進入路由設置狀態 router protocol

退出局部設置狀態 exit

3. 顯示命令

任務 命令

查看版本及引導信息 show version

查看運行設置 show running-config

查看開機設置 show startup-config

顯示埠信息 show interface type slot/number

顯示路由信息 show ip router

4. 拷貝命令

用於IOS及CONFIG的備份和升級

5. 網路命令

任務 命令

登錄遠程主機 telnet hostname|IP address

網路偵測 ping hostname|IP address

路由跟蹤 trace hostname|IP address

6. 基本設置命令

任務 命令

全局設置 config terminal

設置訪問用戶及密碼 username username password password

設置特權密碼 enable secret password

設置路由器名 hostname name

設置靜態路由 ip route destination subnet-mask next-hop

啟動IP路由 ip routing

啟動IPX路由 ipx routing

埠設置 interface type slot/number

設置IP地址 ip address address subnet-mask

設置IPX網路 ipx network network

激活埠 no shutdown

物理線路設置 line type number

啟動登錄進程 login [local|tacacs server]

設置登錄密碼 password password

五、配置IP定址

1. IP地址分類

IP地址分為網路地址和主機地址二個部分,A類地址前8位為網路地址,後24位為主機地址,B類地址16位為網路地址,後16位為主機地址,C類地址前24位為網路地址,後8位為主機地址,網路地址范圍如下表所示:

種類 網路地址范圍

A 1.0.0.0 到126.0.0.0有效 0.0.0.0 和127.0.0.0保留

B 128.1.0.0到191.254.0.0有效 128.0.0.0和191.255.0.0保留

C 192.0.1.0 到223.255.254.0有效 192.0.0.0和223.255.255.0保留

D 224.0.0.0到239.255.255.255用於多點廣播

E 240.0.0.0到255.255.255.254保留 255.255.255.255用於廣播

2. 分配介面IP地址

任務 命令

介面設置 interface type slot/number

為介面設置IP地址 ip address ip-address mask

掩瑪(mask)用於識別IP地址中的網路地址位數,IP地址(ip-address)和掩碼(mask)相與即得到網路地址。

3. 使用可變長的子網掩碼

通過使用可變長的子網掩碼可以讓位於不同介面的同一網路編號的網路使用不同的掩碼,這樣可以節省IP地址,充分利用有效的IP地址空間。

如下圖所示:

Router1和Router2的E0埠均使用了C類地址192.1.0.0作為網路地址,Router1的E0的網路地址為192.1.0.128, 掩碼為255.255.255.192, Router2的E0的網路地址為192.1.0.64,掩碼為255.255.255.192,這樣就將一個C類網路地址分配給了二個網,既劃分了二個子網,起到了節約地址的作用。

4. 使用網路地址翻譯(NAT)

NAT(Network Address Translation)起到將內部私有地址翻譯成外部合法的全局地址的功能,它使得不具有合法IP地址的用戶可以通過NAT訪問到外部Internet.

當建立內部網的時候,建議使用以下地址組用於主機,這些地址是由Network Working Group(RFC 1918)保留用於私有網路地址分配的`.

?; Class A:10.1.1.1 to 10.254.254.254

?; Class B:172.16.1.1 to 172.31.254.254

?; Class C:192.168.1.1 to 192.168.254.254

命令描述如下:

任務 命令

定義一個標准訪問列表 access-list access-list-number permit source [source-wildcard]

定義一個全局地址池 ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} [type rotary]

建立動態地址翻譯 ip nat inside source {list {access-list-number | name} pool name [overload] | static local-ip global-ip}

指定內部和外部埠 ip nat {inside | outside}

如下圖所示,

路由器的Ethernet 0埠為inside埠,即此埠連接內部網路,並且此埠所連接的網路應該被翻譯,Serial 0埠為outside埠,其擁有合法IP地址(由NIC或服務提供商所分配的合法的IP地址),來自網路10.1.1.0/24的主機將從IP地址池 c2501中選擇一個地址作為自己的合法地址,經由Serial 0口訪問Internet。命令ip nat inside source list 2 pool c2501 overload中的參數overload,將允許多個內部地址使用相同的全局地址(一個合法IP地址,它是由NIC或服務提供商所分配的地址)。命令 ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192定義了全局地址的范圍。

設置如下:

ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192

interface Ethernet 0

ip address 10.1.1.1 255.255.255.0

ip nat inside

!

interface Serial 0

ip address 202.200.10.5 255.255.255.252

ip nat outside

!

ip route 0.0.0.0 0.0.0.0 Serial 0

access-list 2 permit 10.0.0.0 0.0.0.255

! Dynamic NAT

!

ip nat inside source list 2 pool c2501 overload

line console 0

exec-timeout 0 0

!

line vty 0 4

end

六、配置靜態路由

通過配置靜態路由,用戶可以人為地指定對某一網路訪問時所要經過的路徑,在網路結構比較簡單,且一般到達某一網路所經過的路徑唯一的情況下採用靜態路由。

任務 命令

建立靜態路由 ip route prefix mask {address | interface} [distance] [tag tag] [permanent]

Prefix :所要到達的目的網路

mask :子網掩碼

address :下一個跳的IP地址,即相鄰路由器的埠地址。

interface :本地網路介面

distance :管理距離(可選)

tag tag :tag值(可選)

permanent :指定此路由即使該埠關掉也不被移掉。

以下在Router1上設置了訪問192.1.0.64/26這個網下一跳地址為192.200.10.6,即當有目的地址屬於 192.1.0.64/26的網路范圍的數據報,應將其路由到地址為192.200.10.6的相鄰路由器。在Router3上設置了訪問 192.1.0.128/26及192.200.10.4/30這二個網下一跳地址為192.1.0.65。由於在Router1上埠Serial 0地址為192.200.10.5,192.200.10.4/30這個網屬於直連的網,已經存在訪問192.200.10.4/30的路徑,所以不需要在Router1上添加靜態路由。

Router1:

ip route 192.1.0.64 255.255.255.192 192.200.10.6

Router3:

ip route 192.1.0.128 255.255.255.192 192.1.0.65

ip route 192.200.10.4 255.255.255.252 192.1.0.65

同時由於路由器Router3除了與路由器Router2相連外,不再與其他路由器相連,所以也可以為它賦予一條默認路由以代替以上的二條靜態路由,

ip route 0.0.0.0 0.0.0.0 192.1.0.65

即只要沒有在路由表裡找到去特定目的地址的路徑,則數據均被路由到地址為192.1.0.65的相鄰路由器。

;

㈣ 思科交換機的配置保存命令

1、首先打開思科交換CLI,從特權模式進入全局配置模式,如下圖所示。

㈤ 思科交換機保存設置的命令

(1) Switch# running-config startup-config 這個命令的意思是把當前設備的運行配置保存到flash中去,以便下一次重啟後系統能夠還原到當前配置。
(2) switch#write 保存配置信息。

㈥ cisco保存設置

文件備份總是最重要的,cisco保存設置呢?我為大家帶來cisco安全配置命令大全,需要的朋友可以參考下!

這類交換機/路由器的配置保存命令是 Switch#write; 還有 Switch# running-config startup-config。二個都可以。

保存到本地

(1)你本機要接到交換機,記得交換機配置管理IP地址:192.168.117.11;

(2)要是直連交換機的話,本機和交換機必須在同一網段:192.168.117.113,要是不在同一網 段:192.168.112.113,網路得通,也就是要有路由;

(3)在交換機上線ping本地IP地址,一定要通;

(4)本地安裝3CDaemon軟體,帶有TFTP功能的軟體均可,配置好download path,否則報錯;

(5)TFTP使用69埠,最好關閉防火牆軟體,網路放行69埠

這樣我們就可以開始了:

JN-SW1# running-config tftp #這里是正在運行的配置到本地

Address or name of remote host []? 192.168.112.113 #本地的IP地址

Destination filename [jn-sw1-confg]? #這里默認即可

!!

3327 bytes copied in 1.283 secs (2593 bytes/sec) #有感嘆號和這個時間提示,就表示成功了

這里只是保存running-config到本地,舉一反三,同樣也可以保存startup-config和flash中的IOS到本地,那上傳就是反過來嘍。

以上內容就是關於cisco保存設置教程了,希望大家喜歡。

㈦ cisco基本配置命令

Cisco 的交換機產品以「Catalyst 」為商標,包含1900 、2800 、2900 、3500 、4000 、5000 、5500 、6000 、8500 等十多個系列。

基本配置命令如下:

1、Switch>enable 進入特權模式

2、Switch #config terminal 進入全局配置模式

3、Switch(config)#hostname 設置交換機的主機名

4、Switch(config)#enable password 進入特權模式的密碼(明文形式保存)

5、Switch(config)#enablesecret 加密密碼(加密形式保存) (優先)

6、Switch(config)#ipdefault-gateway 配置交換機網關

7、Switch(config)#showmac-address-table 查看MAC地址

8、Switch(config)loggingsynchronous 阻止控制台信息覆蓋命令行上的輸入

9、Switch(config)no ipdomain-lookup 關閉DNS查找功能

10、Switch(config)exec-timeout 00 阻止會話退出

(7)思科的保存配置命令是什麼擴展閱讀

cisco常用配置命令:

一、使用Telnet遠程式管理

1、Switch(config)#line vty 0 4 進入虛擬終端

2、Switch (config-line)# password 設置登錄口令

3、Switch(config-line)# login 要求口令驗證

二、控制台口令

1、switch(config)#lineconsole 0 進入控制台口

2、switch(config-line)# password xx

3、switch(config-line)#設置登錄口令login 允許登錄

三、恢復出廠配置

Switch(config)#erasestartup-config

Switch(config)delete vlan.dat

㈧ 思科交換機裡面的配置怎麼保存

1、在介面配置模式下使用 do wr 或者是 do running-config startup-config
2、在全局配置模式下使用不帶do的命令(以上兩個)
3、導出的話,可以用TFTP,或者FTP直接下載。 你也可以用軟體CRT中執行show start-config,顯示初始配置信息。執行show running-config 來顯示當前運行信息。然後直接復制黏貼到文檔就行了。

㈨ 思科交換機的配置保存命令

1、首先打開思科交換CLI,從特權模式進入全局配置模式,如下圖所示。

㈩ 思科路由器設置方法和常見配置命令

思科路由器設置方法和常見配置命令

思科路由器怎麼設置,是我們經常遇到的問題,下面我准備了關於思科路由器設置方法和常見配置命令,歡迎大家參考學習!

一、基本設置方式

一般來說,可以用5種方式來設置Cisco思科路由器:

1.Console口接終端或運行終端模擬軟體的微機;

2.AUX口接MODEM,通過電話線與遠方的終端或運行終端模擬軟體的微機相連;

3.通過Ethernet上的TFTP伺服器;

4.通過Ethernet上的TELNET程序;

5.通過Ethernet上的SNMP網管工作站。

但Cisco思科路由器的第一次設置必須通過第一種方式進行,一般用超級終端通過com口進行控制。此時終端的硬體設置如下:

波特率 :9600

數據位 :8

停止位 :1

奇偶校驗: 無

二、命令操作

Cisco思科路由器所用的操作系統是IOS.共有以下幾種狀態:

1、router>

在router>提示符下,Cisco思科路由器處於用戶命令狀態,這時用戶可以看Cisco思科路由器的連接狀態,訪問其它網路和主機,但不能看到和更改Cisco思科路由器的設置內容。此時輸入?並回車,可以查看到在此狀態下可以用的命令。(IOS允許你在任何時候用這種方式查看在某種狀態下可以用的命令)。在敲入enable並回車後,按照系統提示輸入密碼,(在新的Cisco思科路由器第一次進行調試的時候不需要輸入密碼,直接回車即可)進入#提示符,就可以對Cisco思科路由器進行各種操作了。

2、router#

Cisco思科路由器進入特權命令狀態router#後,不但可以執行所有的用戶命令,還可以看到和更改Cisco思科路由器的設置內容。此時就可以對Cisco思科路由器的名字、密碼等進行設置。

3、router(config)#

在router#提示符下鍵入configure terminal,出現提示符router(config)#,此時Cisco思科路由器處於全局設置狀態,這時可以設置Cisco思科路由器的全局參數。

4、router(config-if)#;

router(config-line)#;

router(config-router)#;…

Cisco思科路由器處於局部設置狀態,這時可以設置Cisco思科路由器某個局部的參數。

5、Cisco思科路由器處於RXBOOT狀態,在開機後60秒內按ctrl-break可進入此狀態,這時Cisco思科路由器不能完成正常的功能,只能進行軟體升級和手工引導。在此狀態下,可以進行口令恢復。

三、常用命令

1.幫助

在IOS操作中,無論任何狀態和位置,都可以鍵入“?”得到系統的幫助。系統會顯示此時可以使用的命令。

2.改變命令狀態

任務命令

進入特權命令狀態enable

退出特權命令狀態disable

進入設置對話狀態Setup

進入全局設置狀態config terminal

退出全局設置狀態End

進入埠設置狀態interface type slot/number

進入子埠設置狀態interface type number.subinterface [point-to-point | multipoint]

進入線路設置狀態line type slot/number

進入路由設置狀態router protocol

退出局部設置狀態Exit

3.顯示命令

任務命令

查看版本及引導信息show version

查看運行設置show running-config

查看開機設置show startup-config

顯示埠信息show interface type slot/number

顯示路由信息show ip router

4.拷貝命令

用於IOS及CONFIG的備份和升級

5.網路命令

任務命令

登錄遠程主機telnet hostname|IP address

網路偵測ping hostname|IP address

路由跟蹤Trace hostname|IP address

6.基本設置命令

任務命令

全局設置config terminal

設置訪問用戶及密碼username username password password

設置特權密碼enable secret password

設置Cisco思科路由器名hostname name

設置靜態路由ip route destination subnet-mask next-hop

啟動IP路由ip routing

啟動IPX路由Ipx routing

埠設置interface type slot/number

設置IP地址ip address address subnet-mask

設置IPX網路Ipx network network

激活埠no shutdown

物理線路設置line type number

啟動登錄進程login [local|tacacs server]

設置登錄密碼password password

本文描述了如何進行思科路由器的基本設置,基本的命令操作以及常用命令進行操作和總體的.設置,並講述了一些基本的服務設置。

四、總體設置

在router#特權命令狀態下,可以用setup對Cisco思科路由器進行總體設計,利用這個設計過程可以省略手工設置的煩瑣。但它還不能完全代替手工設置,一些特殊的設置還必須通過手工輸入的方式完成。

進入設置對話過程後,Cisco思科路由器首先會顯示一些提示信息:

--- System Configuration Dialog ---

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

這是告訴你在設置對話過程中的任何地方都可以鍵入“?”得到系統的幫助,按ctrl-c可以退出設置過程,預設設置將顯示在‘[]’中。然後Cisco思科路由器會問是否進入設置對話:

Would you like to enter the initial configuration dialog? [yes]:

如果按y或回車,Cisco思科路由器就會進入設置對話過程。首先你可以看到各埠當前的狀況:

First, would you like to see the current interface summary? [yes]:

Any interface listed with OK? value "NO" does not have a valid configuration

InterfaceIP-AddressOK?MethodStatusProtocol

Serial0unassignedNOunsetupup

……………………………

然後,Cisco思科路由器就開始全局參數的設置:

Configuring global parameters:

1.設置Cisco思科路由器名:

Enter host name [Router]:

2.設置進入特權狀態的密文(secret),此密文在設置以後不會以明文方式顯示:

The enable secret is a one-way cryptographic secret used

instead of the enable password when it exists.

Enter enable secret: cisco

3.設置進入特權狀態的密碼(password),此密碼只在沒有密文時起作用,並且在設置以後會以明文方式顯示:

The enable password is used when there is no enable secret

and when using older software and some boot images.

Enter enable password: pass

4.設置虛擬終端訪問時的密碼:

Enter virtual terminal password: cisco

5.詢問是否要設置Cisco思科路由器支持的各種網路協議:

Configure SNMP Network Management? [yes]:

Configure DECnet? [no]:

Configure AppleTalk? [no]:

Configure IPX? [no]:

Configure IP? [yes]:

Configure IGRP routing? [yes]:

Configure RIP routing? [no]:

………

6.如果配置的是撥號訪問伺服器,系統還會設置非同步口的參數:

Configure Async lines? [yes]:]

1)設置線路的最高速度:

Async line speed [9600]:

2)是否使用硬體流控:

Configure for HW flow control? [yes]:

3)是否設置modem:

Configure for modems? [yes/no]: yes

4)是否使用默認的modem命令:

Configure for default chat script? [yes]:

5)是否設置非同步口的PPP參數:

Configure for Dial-in IP SLIP/PPP access? [no]: yes

6)是否使用動態IP地址:

Configure for Dynamic IP addresses? [yes]:

7)是否使用預設IP地址:

Configure Default IP addresses? [no]: yes

是否使用TCP頭壓縮:

Configure for TCP Header Compression? [yes]:

9)是否在非同步口上使用路由表更新:

Configure for routing updates on async links? [no]: y

10)是否設置非同步口上的其它協議。接下來,系統會對每個介面進行參數的設置。

1.Configuring interface Ethernet0:

1)是否使用此介面:

Is this interface in use? [yes]:

2)是否設置此介面的IP參數:

Configure IP on this interface? [yes]:

3)設置介面的IP地址:

IP address for this interface: 192.168.162.2

4)設置介面的IP子網掩碼:

Number of bits in subnet field [0]:

Class C network is 192.168.162.0, 0 subnet bits; mask is /24

在設置完所有介面的參數後,系統會把整個設置對話過程的結果顯示出來:

The following configuration command script was created:

hostname Router

enable secret 5 $W5Oh$p6J7tIgRMBOIKVXVG53Uh1

enable password pass

…………

請注意在enable secret後面顯示的是亂碼,而enable password後面顯示的是設置的內容。就是說,secret密碼的優先順序比較高,在兩個密碼都設了的情況下,secret密碼起作用。

顯示結束後,系統會問是否使用這個設置:

Use this configuration? [yes/no]: yes

如果回答yes,系統就會把設置的結果存入Cisco思科路由器的NVRAM中,然後結束設置對話過程,使Cisco思科路由器開始正常的工作。

五、廣域網協議設置

PPP

PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的繼承者,它提供了跨過同步和非同步電路實現Cisco思科路由器到Cisco思科路由器(router-to-router)和主機到網路(host-to-network)的連接。

CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用於在PPP封裝的串列線路上提供安全性認證。使用CHAP和PAP認證,每個Cisco思科路由器通過名字來識別,可以防止未經授權的訪問。

任務命令

設置PPP封裝encapsulation ppp1

設置認證方法ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]

指定口令username name password secret

設置DCE端線路速度clockrate speed

;
閱讀全文

與思科的保存配置命令是什麼相關的資料

熱點內容
python中1到100怎麼算 瀏覽:765
小度我想看程序員 瀏覽:504
bs刷裝備建立後文件夾沒有 瀏覽:79
找漫畫看應該下載什麼app 瀏覽:182
如何在vps上搭建自己的代理伺服器 瀏覽:744
nginxphp埠 瀏覽:403
內臟pdf 瀏覽:152
怎麼看雲伺服器架構 瀏覽:85
我的世界國際服為什麼登不進伺服器 瀏覽:997
微盟程序員老婆 瀏覽:931
intellij創建java 瀏覽:111
java連接odbc 瀏覽:39
啟動修復無法修復電腦命令提示符 瀏覽:359
手機編程是什麼 瀏覽:98
山東移動程序員 瀏覽:165
蘇州java程序員培訓學校 瀏覽:479
單片機液晶驅動 瀏覽:856
魔拆app里能拆到什麼 瀏覽:132
新預演算法的立法理念 瀏覽:146
wdcpphp的路徑 瀏覽:136