A. 思科路由器設置方法和常見配置命令
思科路由器設置方法和常見配置命令
思科路由器怎麼設置,是我們經常遇到的問題,下面我准備了關於思科路由器設置方法和常見配置命令,歡迎大家參考學習!
一、基本設置方式
一般來說,可以用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
;B. 靜態路由的配置命令
靜態路由的配置:帶下一跳路由器的靜態路由和帶送出介面的靜態路由。
在介面模式下配置該介面的IP地址(配置該介面的IP地址為192.168.1.1/24):Router(config-if)#ip add 192.168.1.1 255.255.255.0
在路由器的全局配置模式下配置靜態路由(配置非直連網段192.168.10.0/24,下一跳IP為192.168.1.2):Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.2
優點
使用靜態路由的另一個好處是網路安全保密性高。動態路由因為需要路由器之間頻繁地交換各自的路由表,而對路由表的分析可以揭示網路的拓撲結構和網路地址等信息。因此,網路出於安全方面的考慮也可以採用靜態路由。不佔用網路帶寬,因為靜態路由不會產生更新流量。靜態路由適用於中小型網路。
以上內容參考:網路-靜態路由
C. 靜態路由配置命令
配置靜態路由有兩種方式:帶有下一跳路由器的靜態路由和帶有送出介面的靜態路由。
這些命令如下所示:
1.以下一跳路由器為例
A(config)# IP route 192 . 168 . 3 . 0 255 . 255 . 255 . 0 f 0/1(目標網段的IP地址,目的子網掩碼送出介面(路由器A))。
2、帶發送介面
a(config)# ip route 192 . 168 . 3 . 0 255 . 255 . 0 192 . 168 . 2 . 2(目標子網掩碼下的下一個路由器介面的目標網段IP地址)。
擴展信息:
靜態路由命令的優勢:
使用靜態路由的優點是網路的高安全性和保密性。對路由表的分析可以揭示網路拓撲和網路地址。因此,出於安全考慮,網路也可以採用靜態路由。不佔用網路帶寬,因為靜態路由不會產生更新流量。
靜態路由命令的缺點:
大型復雜的網路環境通常不適合靜態路由。一方面,網路管理員很難完全了解整個網路的拓撲結構。另一方面,當網路的拓撲結構和鏈路狀態發生變化時,路由器中的靜態路由信息需要進行大范圍的調整,這是非常困難和復雜的。
來源:網路:靜態路由
密切注意
在路由器的全局配置模式下進入F0/0介面配置模式:Router(config)#int f0/0
在介面模式下配置該介面的IP地址(該介面的IP地址為192.168.1.1/24):路由器(config-if)# IP add 192 . 168 . 1 . 1 255 . 255 . 0
在路由器全局配置模式下配置靜態路由(配置非直接網段192.168.10.0/24,下一跳IP為192.168.1.2):路由器(config)# IP route 192 . 168 . 10 . 0 255 . 255 . 255 . 0 192.0。
擴展信息:
Ip-address和mask是目標Ip地址和掩碼,採用點分十進制格式。由於掩碼的32位中的「1」必須是連續的,所以點分十進制格式掩碼可以由掩碼長度mask-length代替,mask-length是掩碼中連續「1」位的數量。
Interface-name指定該路由的發送介面名稱,gateway-address是該路由的下一跳IP地址(點分十進制格式)。Preference-value是該路由的優先順序,范圍從0到255。拒絕表示為不可到達的路由。黑洞表示黑洞路線。
默認情況下,系統可以獲得連接到路由器的子網的子網路由。如果在配置靜態路由時沒有指定優先順序,默認值為60。如果未指明拒絕或黑洞,則默認為可達路由。
配置靜態路由的注意事項:
當目的IP地址和掩碼都為0.0.0.0時,配置默認路由,即路由表查找失敗時,按照默認路由轉發數據包。
對於優先順序的不同配置,可以靈活應用路由管理策略,比如配置多條路由到同一個目的地,如果指定相同的優先順序,可以實現負載分擔;如果指定不同的優先順序,可以實現路由備份。
配置靜態路由時,您可以指定發送介面或下一跳地址。具體採用哪種方式要看實際情況:對於支持網路地址到鏈路層地址解析的介面或者點對點介面,只需指定發送介面即可;對於NBMA介面,如封裝X.25或幀中繼的介面、撥號埠等。支持點對多點。此時,除了配置ip路由外,還需要在鏈路層建立一條二級路由,即ip地址到鏈路層地址的映射(如撥號器映射ip、x.25映射IP或幀中繼映射IP等。).什麼情況?靜態路由配置無法指定發送介面,但應配置下一跳IP地址。
https://iknow-pic . cdn . BCE Bos . com/78310 a 55 b 319 ebc 418 be 03d 78 f 26 cffc 1 f 1716 BD?x-BCE-process = image % 2f resize % 2Cm _ lfit % 2Cw _ 600% 2Ch _ 800% 2c limit _ 1% 2f quality % 2Cq _ 85% 2f format % 2Cf _ auto
D. 思科路由器基礎配置命令
基礎配置命令如下
一、1.router(config)#router rip 啟動rip進程
2.router(conifg-router)#network 172.17.0.0指定rip協議的主網路
3.router(config-router)#passive-interface f0/1把f0/1配置成passive埠
4.router(config-router)#neighbor 172.17.12.67 以單波方式通告rip更新給路由器
5.router(config-if)#ip address 192.168.83.244 255.255.255.0 主ip地址
router(config-if)#ip address 10.33.55.1 255.255.255.0 secondary輔助ip地址
二、1.router(config-router)#version 2將rip配置成版本2
2.router(config-ip)#ip rip send version 1隻發rip 1數據包
router(config-ip)#ip rip receive version 2隻接收rip 2數據包
3.router(config-router)#no auto-summary 關閉匯總功能
4.router(config-if)#no ip split-horizon關閉水平分割
5.router#show ip ospf database router 192.168.30.10顯示路由器LSA通告
router#show ip ospf database network 192.168.17.18顯示網路LSA通告
router#show ip ospf database summary 172.16.121.0顯示網路匯總LSA通告
router#show ip ospf database asbr-summary顯示ASBR匯總LSA通告
router#show ip ospf database external 10.83.10.0顯示自主系統外部LSA通告
router#show ip ospf database nssa-external顯示NSSA外部LSA通告
三、1.router(config)#router ospf 10配置ospf進程id
2.router(config)#interface loopback0
router(config-if)#ip address 192.168.10.1 255.255.255.0配置loopback0介面
3.router(config-router)#area 1 stub 配置stub區域
4.router(config-router)#area 1 stub no-summary配置totally stubby區域
5.router(config-router)#area 1 nssa配置nssa區域
6.router(config-router)#area 25 range 172.16.0.0 255.240.0.0 配置地址匯總
7.router(config-router)#area 100 virtual-link 192.168.100.33 配置虛鏈路
四、1.router(config)#standby 172 ip 172.16.10.254加入備份組172 指定虛擬IP 地址
2.router(config-if)#standby 47 priority 150配置HSRP的優先順序150
3.router(config-if)#standby 47 preempt 配置HSRP的佔先權
4.router(config-if)#standby 47 ip time 2 9 2表示HELLO時間,9表示保持時間
5.router(config)#interface s0
6.router(config-if)#standby 47 track s0 100配置跟蹤埠s0並在埠down時減少100
7.router#show standby brief 查看HSRP的狀態
8.router#no debuge all關閉調試功能
五、1.router(config-if)#ip access-group 1 in 訪問列表的入
router(config-if)#ip access-group 1 out訪問列表的出
2.router(config)#access-list 1 premit 192.168.10.0 0.0.0.255 允許192.168.10.0的網段通過
router(config)#access-list 1 deny 192.168.10.0 2.0.0.255 拒絕192.168.10.2的主機通過
3.router(config)#access-list 1 premit any ;any表示0.0.0.0 255.255.255.255
router(config)#access-list 1 premit host 172.30.16.29 ;host表示0.0.0.0
4.router(config)#access-list 101 deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 21拒絕來自172.16.4.0去往172.16.3.0的FTP流量
5.router(config)#ip access-list extended cisco創建名為cisco的命名訪問控制列表
六、靜態地址轉換1.配置外部埠的IP地址
Router(config)#interface s0
Router(config-if)#ip address 61.159.62.129 255.255.255.248
2.配置內部埠的IP地址
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
3.靜態地址轉換
Router(config)#ip nat inside source static 192.168.100.2 61.159.62.130
4.在內部和外部埠上啟用NAT
Router(config)#interafce s0
Router(config-if)#ip nat outside
Router(config)#interafce e0
Router(config-if)#ip nat inside
七、動態NAT配置1.配置外部埠的IP地址
Router(config)#interface s0
Router(config-if)#ip address 61.159.62.129 255.255.255.248
2.配置內部埠的IP地址
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
3.定義內部網路允許訪問外部網路
Router(config)#access-list 1 permit 192.168.100.0 0.0.0.255
4.定義合法的IP地址池
Router(config)#ip nat pool chen 61.159.62.129 61.159.62.190 netmask 255.255.255.248
5.實現網路地址轉換
Router(config)#ip nat inside source list 1 pool chen
6.在內部和外部埠上啟用NAT
Router(config)#interafce s0
Router(config-if)#ip nat outside
Router(config)#interafce e0
Router(config-if)#ip nat inside
八、PAT的配置1.配置外部埠的IP地址
Router(config)#interface s0
Router(config-if)#ip address 61.159.62.129 255.255.255.248
2.配置內部埠的IP地址
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
3.定義內部網路允許訪問外部網路
Router(config)#access-list 1 permit 192.168.100.0 0.0.0.255
4.定義合法的IP地址池
Router(config)#ip nat pool chen 61.159.62.129 61.159.62.190 netmask 255.255.255.248
5.實現復用IP地址轉換
Router(config)#ip nat inside source list 1 pool chen overload
6.在內部和外部埠上啟用NAT
Router(config)#interafce s0
Router(config-if)#ip nat outside
Router(config)#interafce e0
Router(config-if)#ip nat inside
E. 華為路由器IP性能配置命令
華為路由器IP性能配置命令
H3C CAS雲計算管理平台融合了華三通信在網路安全領域的積累,通過對IEEE 802.1Qbg(EVB)標準的支持,為虛擬機在安全、可視、可監管的環境下運行奠定了基礎。下面是我整理的華為路由器IP性能配置命令,希望大家認真閱讀!
clear ip counters
清除IP統計信息。
clear ip counters
【命令模式】
特權用戶模式
【使用指南】
在某些特殊情況下,需要清除IP統計信息,重新進行統計。
【舉例】
清除IP統計信息。
Quidway#clear ip counters
【相關命令】
show ip interface,show ip traffic
4.5.2 ifquelen ip
配置IP接收隊列長度。
ifquelen ip queue-length
【參數說明】
queue-length為介面隊列長度。
【命令模式】
全局配置模式
【使用指南】
配置IP接收隊列長度,會影響系統運行效率,最好在技術支持人員的指導下進行。
【舉例】
配置IP的接收隊列為70。
Quidway(config)#ifquelen ip 70
【相關命令】
show ip interface
4.5.3 ifquelen arp
配置ARP接收隊列長度。
ifquelen arp queue-length
【參數說明】
queue-length為介面隊列長度。
【命令模式】
全局配置模式
【使用指南】
配置ARP接收隊列長度,可能會影響到乙太網口運行效率,最好在技術支持人員的指導下配置。
【舉例】
配置ARP的接收隊列長度為70。
Quidway(config)#ifquelen arp 70
【相關命令】
show ip interface
4.5.4 ip tcp header-compression
允許或禁止介面上TC 文頭壓縮。
[ no ] ip tcp header-compression
【預設情況】
介面上預設為禁止TCP報文頭壓縮。
【命令模式】
介面配置模式
【使用指南】
在低速廣域網線路上運行PPP協議時,由於TCP報文頭佔全部傳輸數據的很大比例,這時可以對TCP報文頭壓縮以提高數據傳輸效率。
【舉例】
在PPP介面Serial0上允許TCP報文頭壓縮。
Quidway(config-if-Serial0)#ip tcp header-compression
【相關命令】
encapsulation ppp
4.5.5 show ip cache
顯示IP路由緩沖。
show ip cache
【命令模式】
特權用戶模式
【使用指南】
顯示IP最近使用過的'路由,幫助用戶進行故障診斷。
【舉例】
Quidway#show ip cache
Route to destination 129.102.100.141:
Destination NetMask Type Interface GateWay
129.102.100.141 255.255.255.255 direct Ethernet0
上面顯示信息表示最近剛使用過的路由是到達129.102.100.141的路由。該路由是一條直接路由,輸出介面為Ethernet0。
【相關命令】
ip route
4.5.6 show ip interface
顯示IP介面信息。
show ip interface [ interface-type interface-number ]
【參數說明】
interface-type為介面類型。
interface-number為介面編號。
【預設情況】
如果不指定介面,則預設顯示全部IP介面信息。
【命令模式】
特權用戶模式
【使用指南】
該命令輸出介面上全部與IP有關的信息,有助於故障診斷。
【舉例】
Quidway#show ip interface serial 0
Interface is Serial0, Index is 2
ifFlags=8004 $#@60;NBMA,MULTICAST$#@62;
protocol is x25 dte ietf, MTU is 1500, speed is 64000 bps
input queue is 0/75/0 (current/max/drops)
output queue is 0/75/0 (current/max/drops)
0 packets input, 0 bytes, 0 multicasts
0 input packets dropped, 0 no protocols, 0 input errors
0 packets output, 0 bytes, 0 multicasts, 0 output errors
上面顯示信息表示介面Serial0 編號為2;處於NBMA模式,支持組播;該介面封裝的鏈路層協議是X.25協議,最大傳輸單元是1500位元組,傳輸速率為64000bps。再以下的信息主要反映了該介面報文的收發情況,比如說接收和發送隊列的最大長度、當前隊列中報文數和由於隊列滿而丟棄報文數,接收和發送的報文數,接收和發送的組播報文數,不能識別的報文數等等。
【相關命令】
show interface
4.5.7 show ip traffic
顯示IP流量統計信息。
show ip traffic
【命令模式】
特權用戶模式
【使用指南】
該命令顯示IP收發和拆包、組包的統計信息,有助於故障診斷。
【舉例】
Quidway#show ip traffic
IP statistics:
Rcvd: 1370 total, 1349 local destination
0 format errors, 0 checksum errors
0 unknown protocol, 0 bad options
Frags: 0 fragment rcvd, 0 fragment dropped
0 reassembled, 0 timeouts
0 fragmented, 0 couldnt fragment, 0 fragment sent
Sent: 359 generated, 0 forwarded, 0 raw ip packets
0 dropped, 0 no route, 0 Compress fails
ICMP statistics:
Rcvd: 0 format errors, 0 checksum errors
0 redirects, 0 unreachable, 14 echo, 0 echo reply
0 mask requests, 0 mask replies, 0 quench
0 parameter, 0 timestamp, 0 info request
Sent: 0 redirects, 0 unreachable, 0 echo, 14 echo reply
0 mask requests, 0 mask replies, 0 quench
0 parameter problem, 0 timestamp, 0 info reply
以上顯示信息包括:
IP 統計信息:
接收:接收到1664 個報文,其中1638 個報文送給上層協議,沒有報文格式錯,沒有報文校驗錯,沒有未知協議報文,沒有報文選項錯。
分片:沒有收到分片,沒有丟棄分片,重裝成功的分片數為0,超時分片為數為0;分組成功的報文數為0,不能被分組的報文數為0,被創建發送分片數為0。
發送:產生報文470 個,被轉發報文數為0,產生原始IP報文數為0,被丟棄報文數為0,無法路由的報文的報文數為0,壓縮失敗的報文數為0。
ICMP統計信息:
接收:接收到格式錯報文數為0,校驗字錯報文數為0,重定向報文數為0,不可達報文數為0,echo請求報文16個, echo應答報文數為0,掩碼請求報文數為0,掩碼應答報文數為0,源站抑制報文數為0,參數錯報文數為0,時間戳請求報文數為0,信息請求報文數為0。
發送:發送重定向報文數為0,目的站不可達報文數為0,echo請求報文數為0,echo應答報文16 個,掩碼請求報文數為0,掩碼應答報文數為0,源站抑制報文數為0,參數錯報文數為0,時間戳請求報文數為0,信息應答報文數為0。
【相關命令】
show interface,show ip interface,clear ip counters
4.5.8 show tcp brief
顯示TCP連接狀態。
show tcp brief
【命令模式】
特權用戶模式
【使用指南】
該命令顯示全部TCP連接狀態,使用戶隨時監控TCP連接。
【舉例】
Quidway#show tcp brief
LocalAddress LocalPort ForeignAddress ForeignPort State
129.102.100.142 23 129.102.001.092 1038 ESTABLISHED
000.000.000.000 23 000.000.000.000 0 LISTEN
以上顯示信息表示:一個TCP連接已經建立,該TCP連接的本地IP地址為129.102.100.142,本地埠號為23,遠地IP地址為129.102.1.92,遠地埠號為1038,另外本地有一個對23號埠監聽的伺服器。
【相關命令】
show client
4.5.9 tcp finwait-time
配置TCP finwait定時器。
tcp finwait-time time-value
【參數說明】
time-value為TCP finwait定時器值,單位秒,范圍76~3600。
【預設情況】
TCP finwait定時器預設為675秒。
【命令模式】
全局配置模式
【使用指南】
當TCP的連接狀態由FIN_WATI_1變為FIN_WAIT_2時啟動finwait定時器。若finwait定時器超時前仍未收到FIN報文,則TCP連接被終止。
對該參數的配置最好在技術支持人員的指導下進行。
【舉例】
配置TCP finwait定時器的值為675秒。
Quidway(config)#tcp finwait-time 675
【相關命令】
tcp synwait-time,tcp window-size
4.5.10 tcp synwait-time
配置TCP synwait定時器。
tcp synwait-time time-value
【參數說明】
time-value為TCP synwait 定時器值,單位秒,范圍2~600。
【預設情況】
TCP synwait定時器預設值為75秒。
【命令模式】
全局配置模式
【使用指南】
當發送syn報文時,TCP啟動synwait定時器,若synwait超時前未收到回應報文,則TCP連接將被終止。
對該參數的配置最好在技術支持人員的指導下進行。
【舉例】
配置TCP synwait定時器為75秒。
Quidway(config)#tcp synwait-time 75
【相關命令】
tcp finwait-time,tcp window-size
4.5.11 tcp window-size
配置面向連接Socket的收發緩沖區大小。
tcp window-size window-size
【參數說明】
window-size為面向連接Socket的收發緩沖區大小,單位K位元組,范圍1~32。
【預設情況】
面向連接Socket的收發緩沖區大小預設為4K位元組。
【命令模式】
全局配置模式
【使用指南】
對該參數的配置最好在技術支持人員的指導下進行。
【舉例】
配置面向連接Socket的收發緩沖區大小為4K位元組。
Quidway(config)#tcp window-size 4
【相關命令】
tcp finwait-time,tcp synwait-time
;
F. 華為路由器配置命令
學習華為交換機,就要記得配置基本命令,下面yjbys為大家分享的是華為路由器基本配置命令,希望對大家學習華為有所幫助!
一、計算機命令
PCAlogin:root;使用root用戶
password:linux;口令是linux
#shutdown-hnow;關機
#init0;關機
#logout;用戶注銷
#login;用戶登錄
#ifconfig;顯示IP地址
#ifconfigeth0netmask;設置IP地址
#ifconfigeht0netmaskdown;禁用IP地址
#routeadd0.0.0.0gw;設置網關
#routedel0.0.0.0gw;刪除網關
#routeadddefaultgw;設置網關
#routedeldefaultgw;刪除網關
#route;顯示網關
#ping;發ECHO包
#telnet;遠程登錄
二、華為路由器交換機配置命令:交換機命令
[Quidway]discur;顯示當前配置
[Quidway]displaycurrent-configuration;顯示當前配置
[Quidway]displayinterfaces;顯示介面信息
[Quidway]displayvlanall;顯示路由信息
[Quidway]displayversion;顯示版本信息
[Quidway]superpassword;修改特權用戶密碼
[Quidway]sysname;交換機命名
[Quidway]interfaceethernet0/1;進入介面視圖
[Quidway]interfacevlanx;進入介面視圖
[Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址
[Quidway]iproute-static0.0.0.00.0.0.010.65.1.2;靜態路由=網關
[Quidway]rip;三層交換支持
[Quidway]local-userftp
[Quidway]user-interfacevty04;進入虛擬終端
[S3026-ui-vty0-4]authentication-modepassword;設置口令模式
[S3026-ui-vty0-4]setauthentication-modepasswordsimple222;設置口令
[S3026-ui-vty0-4]userprivilegelevel3;用戶級別
[Quidway]interfaceethernet0/1;進入埠模式
[Quidway]inte0/1;進入埠模式
[Quidway-Ethernet0/1]plex{half|full|auto};配置埠工作狀態
[Quidway-Ethernet0/1]speed{10|100|auto};配置埠工作速率
[Quidway-Ethernet0/1]flow-control;配置埠流控
[Quidway-Ethernet0/1]mdi{across|auto|normal};配置埠平接扭接
[Quidway-Ethernet0/1]portlink-type{trunk|access|hybrid};設置埠工作模式
[Quidway-Ethernet0/1]portaccessvlan3;當前埠加入到VLAN
[Quidway-Ethernet0/2]porttrunkpermitvlan{ID|All};設trunk允許的VLAN
[Quidway-Ethernet0/3]porttrunkpvidvlan3;設置trunk埠的PVID
[Quidway-Ethernet0/1]undoshutdown;激活埠
[Quidway-Ethernet0/1]shutdown;關閉埠
[Quidway-Ethernet0/1]quit;返回
[Quidway]vlan3;創建VLAN
[Quidway-vlan3]portethernet0/1;在VLAN中增加埠
[Quidway-vlan3]porte0/1;簡寫方式
[Quidway-vlan3]portethernet0/1toethernet0/4;在VLAN中增加埠
[Quidway-vlan3]porte0/1toe0/4;簡寫方式
[Quidway]monitor-port;指定鏡像埠
[Quidway]portmirror;指定被鏡像埠
[Quidway]portmirrorint_listobserving-portint_typeint_num;指定鏡像和被鏡像
[Quidway]descriptionstring;指定VLAN描述字元
[Quidway]description;刪除VLAN描述字元
[Quidway]displayvlan[vlan_id];查看VLAN設置
[Quidway]stp{enable|disable};設置生成樹,默認關閉
[Quidway]stppriority4096;設置交換機的優先順序
[Quidway]stproot{primary|secondary};設置為根或根的備份
[Quidway-Ethernet0/1]stpcost200;設置交換機埠的花費
[Quidway]link-aggregatione0/1toe0/4ingress|both;埠的聚合
[Quidway]undolink-aggregatione0/1|all;始埠為通道號
[SwitchA-vlanx]isolate-user-vlanenable;設置主vlan
[SwitchA]isolate-user-vlansecondary;設置主vlan包括的子vlan
[Quidway-Ethernet0/2]porthybridpvidvlan;設置vlan的pvid
[Quidway-Ethernet0/2]porthybridpvid;刪除vlan的pvid
[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged;設置無標識的vlan
如果包的vlanid與PVId一致,則去掉vlan信息.默認PVID=1。
所以設置PVID為所屬vlanid,設置可以互通的'vlan為untagged.
三、華為路由器交換機配置命令:路由器命令
[Quidway]displayversion;顯示版本信息
[Quidway]displaycurrent-configuration;顯示當前配置
[Quidway]displayinterfaces;顯示介面信息
[Quidway]displayiproute;顯示路由信息
[Quidway]sysnameaabbcc;更改主機名
[Quidway]superpasswrod123456;設置口令
[Quidway]interfaceserial0;進入介面
[Quidway-serial0]ipaddress;配置埠IP地址
[Quidway-serial0]undoshutdown;激活埠
[Quidway]link-protocolhdlc;綁定hdlc協議
[Quidway]user-interfacevty04
[Quidway-ui-vty0-4]authentication-modepassword
[Quidway-ui-vty0-4]setauthentication-modepasswordsimple222
[Quidway-ui-vty0-4]userprivilegelevel3
G. 路由配置命令
只有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 ;default:out
例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 <DESTINATIONIP
wild>[type]
access-list permit|deny tcp <DESTINATIONIP
wild>[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] <私有IP><公網IP> [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全局地址
H. 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密碼
I. H3C路由器常用配置命令
1、system-view 進入系統視圖模式
2、sysname R1 為設備命名為R1
3、display ip routing-table 顯示當前路由表
4、 language-mode Chinese|English 中英文切換
5、interface Ethernet 0/0 進入乙太網埠視圖
6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子網掩碼
7、 undo shutdown 打開乙太網埠
8、 shutdown 關閉乙太網埠
9、 quit 退出當前視圖模式
10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置靜態路由
11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默認的路由
H3C S3100 Switch
H3C S3600 Switch
H3C MSR 20-20 Router
##########################################################################################
1、調整超級終端的顯示字型大小;
2、捕獲超級終端操作命令行,以備日後查對;
3、 language-mode Chinese|English 中英文切換;
4、復制命令到超級終端命令行,粘貼到主機;
5、交換機清除配置 : reset save ; reboot ;
6、路由器、交換機配置時不能掉電,連通測試前一定要
檢查網路的連通性,不要犯最低級的錯誤。
7、192.168.1.1/24 等同 192.168.1.1 255.255.255.0;在配置交換機和路由器時, 192.168.1.1 255.255.255.0 可以寫成:
192.168.1.1 24
8、設備命名規則:地名-設備名-系列號例:PingGu-R-S3600
H3C交換機的一些簡單配置
2009-11-25 18:49
這里使用的H3C交換機是H126A,僅僅只做了最基本的'配置以滿足使用。
配置中可以通過display current-configura命令來顯示當前使用的配置內容。
# 配置VLAN 1
system-view
System View: return to User View with Ctrl+Z.
[Sysname]vlan 1
[Sysname-vlan1] quit
[Sysname]management-vlan 1
[Sysname]interface Vlan-interface 1
[Sysname-Vlan-interface1] ip address 10.0.1.201 255.255.255.0
# 顯示VLAN 介面1 的相關信息。
display ip interface Vlan-interface 1
# 創建VLAN(H3C不支持cisco的VTP,所以只能添加靜態VLAN)
system-view
System View: return to User View with Ctrl+Z.
[H3C_TEST]vlan 99
[H3C_TEST-vlan99]name seicoffice
[H3C_TEST-vlan99]quit
# 把交換機的端埠劃分到相應的Vlan中
[H3C_TEST]interface ethernet1/0/2//進入埠模式
[H3C_TEST-Ethernet1/0/2]port link-type access //設置埠的類型為access
[H3C_TEST-Ethernet1/0/2]port access vlan 99//把當前埠劃到vlan 99
[H3C_TEST]vlan 99
[H3C_TEST-vlan99]port ethernet1/0/1 to ethernet1/0/24//把以及網埠1/0/1到1/0/24劃到vlan99
[H3C_TEST-vlan99]quit
[H3C_TEST-GigabitEthernet1/2/1]port trunk permit vlan 1 99 // {ID|All} 設置trunk埠允許通過的VLAN
-------------------------------------------------------------------------------------------------------
# 配置本地用戶
system-view
System View: return to User View with Ctrl+Z.
[Sysname]local-user h3c
New local user added.
[Sysname-luser-h3c]service-type telnet level 3
[Sysname-luser-h3c]password simple h3c
# 配置歡迎信息
[H3C_TEST]header login %Welcome to login h3c!%
# 配置用戶認證方式telnet(vty 0-4)
[H3C_TEST]user-interface vty 0 4
[H3C_TEST-ui-vty0-4]authentication-mode scheme
[H3C_TEST-ui-vty0-4]protocol inbound telnet
[H3C_TEST-ui-vty0-4]super authentication-mode super-password
[H3C_TEST-ui-vty0-4]quit
[H3C_TEST]super password level 3 simple h3c //用戶登陸後提升許可權的密碼
# 配置Radius策略
[H3C_TEST]radius scheme radius1
New Radius scheme
[H3C_TEST-radius-radius1]primary authentication 10.0.1.253 1645
[H3C_TEST-radius-radius1]primary accounting 10.0.1.253 1646
[H3C_TEST-radius-radius1]secondary authentication 127.0.0.1 1645
[H3C_TEST-radius-radius1]secondary accounting 127.0.0.1 1646
[H3C_TEST-radius-radius1]timer 5
[H3C_TEST-radius-radius1]key authentication h3c
[H3C_TEST-radius-radius1]key accounting h3c
[H3C_TEST-radius-radius1]server-type extended
[H3C_TEST-radius-radius1]user-name-format without-domain
# 配置域
[H3C_TEST]domain h3c
[H3C_TEST-isp-h3c]authentication radius-scheme radius1 local
[H3C_TEST-isp-h3c]scheme radius-scheme radius1 local
[H3C_TEST]domain default enable h3c
# 配置在遠程認證失敗時,本地認證的key
[H3C_TEST]local-server nas-ip 127.0.0.1 key h3c
J. 華為路由器配置命令大全
華為路由器是世界一流的品牌,很多人都不太明白裡面的一些命令,下文是我為大家提供的華為路由器配置命令大全,歡迎大家閱讀。
華為路由器配置命令大全
基本命令en 進入特權模式conf 進入全局配置模式in s0 進入 serial 0 埠配置ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩碼,電信分配enca hdlc/ppp 捆綁鏈路協議 hdlc 或者 pppip unn e0 exit 回到全局配置模式in e0 進入
基本命令
en 進入特權模式
conf 進入全局配置模式
in s0 進入 serial 0 埠配置
ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩碼,電信分配
enca hdlc/ppp 捆綁鏈路協議 hdlc 或者 ppp
ip unn e0
exit 回到全局配置模式
in e0 進入以太介面配置
ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩碼,電信分配
exit 回到全局配置模式
ip route 0.0.0.0 0.0.0.0 s 0 添加路由表
ena password 口令
write
exit
以上根據中國電信 ddn 專線多數情況應用
普通用戶模式
enable 轉入特權用戶模式
exit 退出配置
help 系統幫助簡述
language 語言模式切換
ping 檢查網路主機連接及主機是否可達
show 顯示系統運行信息
telnet 遠程登錄功能
tracert 跟蹤到目的地經過了哪些路由器
特權用戶模式
#
clear 清除各項統計信息
clock 管理系統時鍾
configure 進入全局配置模式
debug 開啟調試開關
disable 返回普通用戶模式
download 下載新版本軟體和配置文件
erase 擦除FLASH中的配置
exec-timeout 打開EXEC超時退出開關
exit 退出配置
first-config 設置或清除初次配置標志
help 系統幫助簡述
language 語言模式切換
monitor 打開用戶屏幕調試信息輸出開關
no 關閉調試開關
ping 檢查網路主機連接及主機是否可達
reboot 路由器重啟
setup 配置路由器參數
show 顯示系統運行信息
telnet 遠程登錄功能
tracert 跟蹤到目的地經過了哪些路由器
unmonitor 關閉用戶屏幕調試信息輸出開關
write 將當前配置參數保存至FLASH MEM中
全局配置模式
aaa-enable 使能配置AAA(認證,授權和計費)
access-list 配置標准訪問表
arp 設置靜態ARP人口
華為路由器的相關 文章 :
1. 華為路由器怎麼隱藏你的WIFI信號
2. 如何解決華為路由器設置好了不能用
3. 華為路由器設置wifi的詳細方法
4. 華為路由器詳細介紹
5. 華為無線路由器的設置方法