2009年10月30日 星期五

石斑成魚養殖技術

我知道這篇資料很跳TONE....只能說我興趣很廣吧!

一、養殖方式

石斑魚成魚養殖的方式主要有網箱養殖、池塘養殖兩種,以網箱養殖較為普遍。網箱養殖石斑魚是一種集約化的養殖方式,放養密度高,便于管理,生產效益較高,所以發展很快。在介紹成魚養殖技術時,以網箱養殖為主,池塘養殖和室內水泥池養殖可參考網箱養殖。

二、養殖場地選擇

Z通,流速適中,網箱內流速保持在0.20米/秒∼0.75米/秒為好;冬季最低水溫不低于15℃,22℃∼28℃水溫天數不少于200天;水質清新,適宜鹽W;交通條件好,活魚運輸、飼料供應方便。

三、養殖季節

∼200克,在網箱內越冬,一直養到第二年冬前上市。另一種是3月份∼5月份投放體重200克的大規格魚種,到入冬前可養到500克∼700克上市,或甇n大些。

四、養殖密度

海水網箱養殖石斑魚的放養密度在水溫25℃的條件下,以60尾/立方米∼70尾/立方米為好。生產實踐中,在3米×3米×3米的網箱內飼養成魚5較適宜的。浙江象山港海區網箱養殖赤點石斑魚,尾重100克∼150克的放養密度以90尾/平方米∼70尾平方米為宜。

五、飼料與投餌技術

石斑魚屬肉食性魚類,投喂用的主要飼料是鮮度較高的小雜魚。一般根據石斑魚的大小,用切魚機將小雜魚切成適宜的大小后喂養。因飼料魚G5.2:5.0:4.9:4.8:3.1:2.6:1.0。此氨基酸組成模式可為石斑魚配合飼料配置提供參考。赤點石斑魚和青石斑魚對丙氨酸刺激的電生理閾值分別為10摩爾/升∼9.9摩爾/升和10摩爾/升∼9.6摩爾/升,明顯低于其他魚類。這可能與它們生活于底層岩礁間、視覺機能退化而嗅覺機能相@米,顆粒太小食欲不高。

蛓陶膘C天投喂一次,一般在上午9時∼11時進行。11月∼12月、3月∼4月每兩天投喂一次,冬季海水溫度降至20℃以下3天∼4天投喂一次。每次的投喂量約占體重的3%∼5%,水溫適宜時投飼量大些,水溫較低或過高時投飼量減小。在生產中,一般視石斑魚的攝食狀態來決定投飼量,以食欲減弱時為度。每次投喂時,應分批緩緩遍洒,等搶食完前批飼料后再洒下一批,直至喂飽不搶食為止,決不可將飼料一次傾倒入網箱,以免造成飼料浪費和污染環境,石斑魚決不吃沉底的食物。投飼還應講究定質、定量、定時原則。池塘養殖中還應注意搭設飼料台,進行定點投飼,以提高飼料的利用率和便于清理殘料,保持水質的良好。

六、科學管理

選擇合理的網箱和魚排密度,防止缺氧事故的發生。定期清除網箱上附著的污損生物,以保持網箱內外水流暢通。可以采用污損生物預防劑、機械清理和化學處理、搭配飼養污損生物的天敵等方法清除之。定期篩分,保持同一網箱內石斑魚魚體規格的一致。因為魚類具有大魚壓倒小魚生長的作用和飢餓時自相殘食現象,所以應定期篩分,使網箱內石斑魚大小均勻。混養少量鯛科魚類和雜食性魚類。這樣,一是可清除底部殘食和網箱上污損生物;二是因鯛科魚類搶食性強,可激發石斑魚食欲;三是可充分利用水體空間和飼料資源,提高養殖效益。加固鐵錨和纜繩,定期檢查網箱的破損情況,確保安全生產。特別是台風到來之前,更應加強防御,做好安全工作。定期監測水質,保護養殖環境。按國家頒布的第一類海水水質標准來監測養殖用水,利于石斑魚正常生長和肉質鮮美,預防因水質惡化而造成的事故。

〔楊 威〕

2009年10月5日 星期一

[CCNA]了解CISCO

轉載自iThome

IOS(Internetwork Operating System)是Cisco所開發的網路設備作業系統。使用IOS作為作業系統的Cisco設備,一般來說,以路由器和交換器兩種類型為代表。最早的IOS是在1987年,由William Yeager撰寫,目前最新版本的IOS是12.0。

Internetwork Operating System
Cisco網路設備採用的作業系統
IOS(Internetwork Operating System)是Cisco所開發的網路設備作業系統,最早的IOS是在1987年,由William Yeager撰寫,目前最新版本的IOS是12.0。
使用IOS作為作業系統的Cisco設備,一般來說,以路由器和交換器兩種類型為代表,另外在其他類型的設備,像是PIX防火牆,我們也可以看到IOS的身影。
Cisco的網路設備產品線相當完整,因此使用IOS的設備也相對不少,如果你對於這套作業系統所提供的功能與操作方式,能夠有辦法全盤了解,那麼對於那些擁有多臺不同功能Cisco設備的企業網路環境而言,便能很輕易地透過相同的方式加以管理。
由原廠所提供的IOS檔案,在命名方式上也有特定意義。從檔案名稱的結構,我們就可以粗略了解這個IOS檔案是使用在何種類型的Cisco設備,以及提供了那些功能。仔細分析IOS的命名規則,可拆解成AAAAA-BBBB-CC-DDDD.EE五大部分。
舉例來說,一個檔名為「c2500-is-l.123.22.bin」的IOS檔案,從IOS檔案名稱從最前方的c2500字串,我們可以知道這是適用於 2500系列路由器的IOS,「is-l」指出此IOS具備了那些功能,123.22則是代表版本編號,意為IOS 12.3版,至於最末端的22,則可解釋成此版本IOS的第22個維護版本。文⊙楊啟倫
Catalyst Operation System
Catalyst作業系統
CatOS(Catalyst Operating System)主要使用在一些型號較早的Cisco交換器。它的前身是Crescendo Communications開發的「XDI」作業系統,1993年Cisco收購該公司之後,就將XDI更名為Catalyst Operating System。
Cisco後來也對於一些原本使用CatOS的設備提供IOS版本的韌體,讓企業用戶可以透過相同的方式,管理網路環境當中不同功能的Cisco設備。
Native IOS
原生IOS
Native IOS就是一般我們所泛稱的IOS,目前新推出的Cisco網路設備,大多是以Native IOS作為底層的作業系統。
CLI(Command Line Interface)是IOS的標準設定方式,我們必須使用Rollover Cable連接電腦與設備,才能開啟終端機介面,並以輸入指令的方式管理設備;IOS的指令集允許使用者以簡寫的方式輸入指令,換句話說,在IOS可辨識的情況下,隨使用者習慣任意縮短。
Command Line Modes
命令列指令模式
IOS的CLI(Command Line)可以簡略分成4種主要的操作模式:User Exec Mode、Privilege Exec Mode、Global Configure Mode,以及Interface Configure Mode。
User Exec Mode只能用來查看設備目前的運作狀態,Privilege Exec Mode可以進行一些簡單的設定,Global Configure Mode允許使用者對設備進行全面性的設定,至於Interface Configure Mode則是用來設定特定的介面功能。
Rollover Cable
反接線
Cisco原廠的Rollover Cable,外觀和一般用來連接網路設備的DB9接頭RS232線材不同,線材的一端是RJ45接頭,用來連接設備,另外一端則是DB9公接頭,用來連接電腦,中間的線材主體呈扁平狀,實質上是一條網路線。
Rollover Cable可以自行製作,將網路線的2端各別依照白橘、橘、白藍、藍、白綠、綠、白棕、棕,以及相反的順序排列,然後接到RJ45轉DB9的轉接頭即可使用。
Trivial File Transfer Protocol
簡單檔案傳輸協定
TFTP(Trivial File Transfer Protocol)是一種經常被網路設備使用的檔案傳輸協定。和傳統的FTP協定相比,它的特色在於省略了帳號驗證的步驟,只要成功連接伺服器,就可以存取檔案。
IOS的更新方式主要是透過TFTP,將IOS的BIN壓縮檔上傳到設備的Flash記憶體,反之,我們也可以利用TFTP將設備既有的IOS檔案匯出,備份到電腦硬碟。
Running-Config
執行時期設定檔
當Cisco網路設備載入IOS之後,會將儲存在NVRAM記憶體底下的Startup-Config設定檔載入到系統記憶體,成為Running-Config,設備會依據Running-Config的設定值,關閉、啟動各項功能。
當使用者在設備的CLI做完設定之後,必須執行copy running-config startup-config,將設定寫入Startup-Config,否則設備一旦關機,先前所做的各項設定將會消失不見。
Startup-Config
啟動時期設定檔
Startup-Config記錄的是設備啟動之後所開啟、關閉的各項功能設定,由於NVRAM具備可重複讀寫的特性,因此在Running-Config所做的設定,可透過指令方式寫入Startup-Config,下次設備重新啟動時便可繼續使用。
在CLI的文字介面下,欲將一臺使用IOS的Cisco網路設備還原成預設值,方法就是執行erase startup-config,透過刪除Running-Config的方式,清除設備的各項設定。
Setup Mode
設定模式
一臺全新出廠,或者是回復成預設值的Cisco設備,本身不帶有Startup-Config,因此在初次啟動時,會進入Setup Mode,也就是以設定精靈的方式,在CLI的文字介面下快速引導使用者完成一份Startup-Config設定檔。
Setup Mode主要以問答方式讓使用者進行設定,對於熟悉Cisco設備操作的人來說,一般都會略過這個步驟,直接進入Privilege Mode、Global Mode模式設定功能。
AUX Port
輔助設定埠
從遠端網路管理Cisco路由器透過2種模式:AUX和Telnet。AUX是一種利用數據機撥號登入設備的管理方式,在Cisco路由器的面板可以看到一個標示為AUX的RJ45網路埠,就是用來連接數據機之用。
如果企業網路的架構龐大,IT人員位於外地,或者是路由器交由他人代管,那麼就有機會在機房看到連接在AUX埠的數據機設備。

Cisco Router Configuration Tutorial

Acknowledgments
The following sources where extremely useful:

  • Leinwand, Pinsky, and Culpepper. Cisco Router Configuration. Indianapolis, Indiana: Cisco Press, 1998.
  • Cisco Systems, Inc., http://www.cisco.com

Disclaimer
This document carries no explicit or implied warranty. Nor is there any guarantee that the information contained in this document is accurate. It is offered in the hopes of helping others, but you use it at your own risk. The author will not be liable for any damages that occur as a result of using this document.

Conventions
Important terms and concepts, when they are introduced, may be displayed in bold. Commands included in the body of the text will be displayed in this font. All names and addresses used in examples are just that, examples, and should not be used on your network. Do not type them in verbatim when configuring your system. Finally, in some examples where the command rquires an IP address as an argument, the IP address may be represented in this way, xx.xx.xx.xx, or aa.bb.cc.dd. You will never actually use these strings when configuring your system. They are mearly a convention of this document to specify that you should substitute the appropriate IP address at that point.



1. What this document covers

There are several methods available for configuring Cisco routers. It can be done over the network from a TFTP server. It can be done through the menu interface provided at bootup, and it can be done from the menu interface provided by using the command setup. This tutorial does not cover these methods. It covers configuration from the IOS command-line interface only. Useful for anyone new to Cisco routers, and those studying for CCNA.

Note that this tutorial does not cover physically connecting the router to the networks it will be routing for. It covers operating system configuration only.

1.1 Reasons for using the command-line

The main reason for using the command-line interface instead of a menu driven interface is speed. Once you have invested the time to learn the command-line commands, you can perform many operations much more quickly than by using a menu. This is basically true of all command-line vs. menu interfaces. What makes it especially efficient to learn the command-line interface of the Cisco IOS is that it is standard across all Cisco routers. Also, some questions on the CCNA exam require you to know command-line commands.

2. Getting started with Cisco

Initially you will probably configure your router from a terminal. If the router is already configured and at least one port is configured with an IP address, and it has a physical connection to the network, you might be able to telnet to the router and configure it across the network. If it is not already configured, then you will have to directly connect to it with a terminal and a serial cable. With any Windows box you can use Hyperterminal to easily connect to the router. Plug a serial cable into a serial (COM) port on the PC and the other end into the console port on the Cisco router. Start Hyperterminal, tell it which COM port to use and click OK. Set the speed of the connection to 9600 baud and click OK. If the router is not on, turn it on.

If you wish to configure the router from a Linux box, either Seyon or Minicom should work. At least one of them, and maybe both, will come with your Linux distribution.

Often you will need to hit the Enter key to see the prompt from the router. If it is unconfigured it will look like this:

Router>

If it has been previously configured with a hostname, it will look like this:

hostname of router>

If you have just turned on the router, after it boots it will ask you if you wish to begin initial configuration. Say no. If you say yes, it will put you in the menu interface. Say no.

2.1 Modes

The Cisco IOS command-line interface is organized around the idea of modes. You move in and out of several different modes while configuring a router, and which mode you are in determines what commands you can use. Each mode has a set of commands available in that mode, and some of these commands are only available in that mode. In any mode, typing a question mark will display a list of the commands available in that mode.

Router>?

2.2 Unprivileged and privileged modes

When you first connect to the router and provide the password (if necessary), you enter EXEC mode, the first mode in which you can issue commands from the command-line. From here you can use such unprivileged commands as ping, telnet, and rlogin. You can also use some of the show commands to obtain information about the system. In unprivileged mode you use commands like, show version to display the version of the IOS the router is running. Typing show ? will diplay all the show commands available in the mode you are presently in.

Router>show ?

You must enter privileged mode to configure the router. You do this by using the command enable. Privileged mode will usually be password protected unless the router is unconfigured. You have the option of not password protecting privileged mode, but it is HIGHLY recommended that you do. When you issue the command enable and provide the password, you will enter privileged mode.

To help the user keep track of what mode they are in, the command-line prompt changes each time you enter a different mode. When you switch from unprivileged mode to privileged mode, the prompt changes from:

Router>

to

Router#

This would probably not be a big deal if there were just two modes. There are, in fact, numerous modes, and this feature is probably indispensable. Pay close attention to the prompt at all times.

Within privileged mode there are many sub-modes. In this document I do not closely follow Cisco terminology for this hierarchy of modes. I think that my explanation is clearer, frankly. Cisco describes two modes, unprivileged and privileged, and then a hierarchy of commands used in privileged mode. I reason that it is much clearer to understand if you just consider there to be many sub-modes of privileged mode, which I will also call parent mode. Once you enter privileged mode (parent mode) the prompt ends with a pound sign (#). There are numerous modes you can enter only after entering privileged mode. Each of these modes has a prompt of the form:

Router(arguments)#

They still all end with the pound sign. They are subsumed within privileged mode. Many of these modes have sub-modes of their own. Once you enter priliged mode, you have access to all the configuration information and options the IOS provides, either directly from the parent mode, or from one of its submodes.

3. Configuring your Cisco Router

If you have just turned on the router, it will be completely unconfigured. If it is already configured, you may want to view its current configuration. Even if it has not been previously configured, you should familiarize yourself with the show commands before beginning to configure the router. Enter privileged mode by issuing the command enable, then issue several show commands to see what they display. Remember, the command show ? will display all the showcommands aavailable in the current mode. Definately try out the following commands:

Router#show interfaces
Router#show ip protocols
Router#show ip route
Router#show ip arp

When you enter privileged mode by using the command enable, you are in the top-level mode of privileged mode, also known in this document as "parent mode." It is in this top-level or parent mode that you can display most of the information about the router. As you now know, you do this with the show commands. Here you can learn the configuration of interfaces and whether they are up or down. You can display what IP protocols are in use, such as dynamic routing protocols. You can view the route and ARP tables, and these are just a few of the more important options.

As you configure the router, you will enter various sub-modes to set options, then return to the parent mode to display the results of your commands. You also return to the parent mode to enter other sub-modes. To return to the parent mode, you hit ctrl-z. This puts any commands you have just issued into affect, and returns you to parent mode.

3.1 Global configuration (config)

To configure any feature of the router, you must enter configuration mode. This is the first sub-mode of the parent mode. In the parent mode, you issue the command config.

Router#config
Router(config)#

As demonstrated above, the prompt changes to indicate the mode that you are now in.

In connfiguration mode you can set options that apply system-wide, also refered to as "global configurations." For instance, it is a good idea to name your router so that you can easily identify it. You do this in configuration mode with the hostname command.

Router(config)#hostname ExampleName
ExampleName(config)#

As demonstrated above, when you set the name of the host with the hostname command, the prompt immediately changes by replacing Router with ExampleName. (Note: It is a good idea to name your routers with an organized naming scheme.)

Another useful command issued from config mode is the command to designate the DNS server to be used by the router:

ExampleName(config)#ip name-server aa.bb.cc.dd
ExampleName(config)#ctrl-Z
ExampleName#

This is also where you set the password for privileged mode.

ExampleName(config)#enable secret examplepassword
ExampleName(config)#ctrl-Z
ExampleName#

Until you hit ctrl-Z (or type exit until you reach parent mode) your command has not been put into affect. You can enter config mode, issue several different commands, then hit ctrl-Z to activate them all. Each time you hit ctrl-Z you return to parent mode and the prompt:

ExampleName#

Here you use show commands to verify the results of the commands you issued in config mode. To verify the results of the ip name-server command, issue the command show host.

3.2 Configuring Cisco router interfaces

Cisco interface naming is straightforward. Individual interfaces are referred to by this convention:

media type slot#/port#

"Media type" refers to the type of media that the port is an interface for, such as Ethernet, Token Ring, FDDI, serial, etc. Slot numbers are only applicable for routers that provide slots into which you can install modules. These modules contain several ports for a given media. The 7200 series is an example. These modules are even hot-swapable. You can remove a module from a slot and replace it with a different module, without interrupting service provided by the other modules installed in the router. These slots are numbered on the router.

Port number refers to the port in reference to the other ports in that module. Numbering is left-to-right, and all numbering starts at 0, not at one.

For example, a Cisco 7206 is a 7200 series router with six slots. To refer to an interface that is the third port of an Ethernet module installed in the sixth slot, it would be interface ethernet 6/2. Therefor, to display the configuration of that interface you use the command:

ExampleName#show interface ethernet 6/2

If your router does not have slots, like a 1600, then the interface name consists only of:

media type port#

For example:

ExampleName#show interface serial 0

Here is an example of configuring a serial port with an IP address:

ExampleName#config
ExampleName(config)#interface serial 1/1
ExampleName(config-if)#ip address 192.168.155.2 255.255.255.0
ExampleName(config-if)#no shutdown
ExampleName(config-if)#ctrl-Z
ExampleName#

Then to verify configuration:

ExampleName#show interface serial 1/1

Note the no shutdown command. An interface may be correctly configured and physically connected, yet be "administratively down." In this state it will not function. The command for causing an interface to be administratively down is shutdown.

ExampleName(config)#interface serial 1/1
ExampleName(config-if)#shutdown
ExampleName(config-if)#ctrl-Z
ExampleName#show interface serial 1/1

In the Cisco IOS, the way to reverse or delete the results of any command is to simply put no infront of it. For instance, if we wanted to unassign the IP address we had assigned to interface serial 1/1:

ExampleName(config)#interface serail 1/1
ExampleName(config-if)#no ip address 192.168.155.2 255.255.255.0
ExampleName(config-if)ctrl-Z
ExampleName#show interface serial 1/1

Configuring most interfaces for LAN connections might consist only of assigning a network layer address and making sure the interface is not administratively shutdown. It is usually not necessary to stipulate data-link layer encapsulation. Note that it is often necessary to stipulate the appropriate data-link layer encapsulation for WAN connections, such as frame-relay and ATM. Serial interfaces default to using HDLC. A discussion of data-link protocols is outside the scope of this document. You will need to look up the IOS command encapsulation for more details.

3.3 Configuring Cisco Routing

IP routing is automatically enabled on Cisco routers. If it has been previously disabled on your router, you turn it back on in config mode with the command ip routing.

ExampleName(config)#ip routing
ExampleName(config)#ctrl-Z

There are two main ways a router knows where to send packets. The administrator can assign static routes, or the router can learn routes by employing a dynamic routing protocol.

These days static routes are generally used in very simple networks or in particular cases that necessitate their use. To create a static route, the administrator tells the router operating system that any network traffic destined for a specified network layer address should be forwarded to a similiarly specified network layer address. In the Cisco IOS this is done with the ip route command.

ExampleName#config
ExampleName(config)#ip route 172.16.0.0 255.255.255.0 192.168.150.1
ExampleName(config)#ctrl-Z
ExampleName#show ip route

Two things to be said about this example. First, the packet destination address must include the subnet mask for that destination network. Second, the address it is to be forwarded to is the specified addres of the next router along the path to the destination. This is the most common way of setting up a static route, and the only one this document covers. Be aware, however, that there are other methods.

Dynamic routing protocols, running on connected routers, enable those routers to share routing information. This enables routers to learn the routes available to them. The advantage of this method is that routers are able to adjust to changes in network topologies. If a route is physically removed, or a neighbor router goes down, the routing protocol searches for a new route. Routing protocols can even dynamically choose between possible routes based on variables such as network congestion or network reliability.

There are many different routing protocols, and they all use different variables, known as "metrics," to decide upon appropriate routes. Unfortunately, a router needs to be running the same routing protocols as its neighbors. Many routers can, however, run mutliple protocols. Also, many protocols are designed to be able to pass routing information to other routing protocols. This is called "redistribution." The author has no experience with trying to make redistribution work. There is an IOS redistribute command you can research if you think this is something you need. This document's compagnion case study describes an alternative method to deal with different routing protocols in some circumstances.

Routing protocols are a complex topic and this document contains only this superficial description of them. There is much to learn about them, and there are many sources of information about them available. An excelent source of information on this topic is Cisco's website, http://www.cisco.com.

This document describes how to configure the Routing Information Protocol (RIP) on Cisco routers. From the command-line, we must explicitly tell the router which protocol to use, and what networks the protocol will route for.

ExampleName#config
ExampleName(config)#router rip
ExampleName(config-router)#network aa.bb.cc.dd
ExampleName(config-router)#network ee.ff.gg.hh
ExampleName(config-router)#ctrl-Z
ExampleName#show ip protocols

Now when you issue the show ip protocols command, you should see an entry describing RIP configuration.

3.4 Saving your Cisco Router configuration

Once you have configured routing on the router, and you have configured individual interfaces, your router should be capable of routing traffic. Give it a few moments to talk to its neighbors, then issue the commands show ip route and show ip arp. There should now be entries in these tables learned from the routing protocol.

If you turned the router off right now, and turned it on again, you would have to start configuration over again. Your running configuration is not saved to any perminent storage media. You can see this configuration with the command show running-config.

ExampleName#show running-config

You do want to save your successful running configuration. Issue the command copy running-config startup-config.

ExampleName#copy running-config startup-config

Your configuration is now saved to non-volatile RAM (NVRAM). Issue the command show startup-config.

ExampleName#show startup-config

Now any time you need to return your router to that configuration, issue the command copy startup-config running-config.

ExampleName#copy startup-config running-config

3.5 Example Cisco Router configuration
  1. Router>enable
  2. Router#config
  3. Router(config)#hostname N115-7206
  4. N115-7206(config)#interface serial 1/1
  5. N115-7206(config-if)ip address 192.168.155.2 255.255.255.0
  6. N115-7206(config-if)no shutdown
  7. N115-7206(config-if)ctrl-z
  8. N115-7206#show interface serial 1/1
  9. N115-7206#config
  10. N115-7206(config)#interface ethernet 2/3
  11. N115-7206(config-if)#ip address 192.168.150.90 255.255.255.0
  12. N115-7206(config-if)#no shutdown
  13. N115-7206(config-if)#ctrl-z
  14. N115-7206#show interface ethernet 2/3
  15. N115-7206#config
  16. N115-7206(config)#router rip
  17. N115-7206(config-router)#network 192.168.155.0
  18. N115-7206(config-router)#network 192.168.150.0
  19. N115-7206(config-router)#ctrl-z
  20. N115-7206#show ip protocols
  21. N115-7206#ping 192.168.150.1
  22. N115-7206#config
  23. N115-7206(config)#ip name-server 172.16.0.10
  24. N115-7206(config)#ctrl-z
  25. N115-7206#ping archie.au
  26. N115-7206#config
  27. N115-7206(config)#enable secret password
  28. N115-7206(config)#ctrl-z
  29. N115-7206#copy running-config startup-config
  30. N115-7206#exit

4. Troubleshooting your Cisco router

Inevitably, there will be problems. Usually, it will come in the form of a user notifying you that they can not reach a certain destination, or any destinattion at all. You will need to be able to check how the router is attempting to route traffic, and you must be able to track down the point of failure.

You are already familiar with the show commands, both specific commands and how to learn what other show commands are available. Some of the most basic, most useful commands you will use for troubleshooting are:

ExampleName#show interfaces
ExampleName#show ip protocols
ExampleName#show ip route
ExampleName#show ip arp

4.1 Testing connectivity

It is very possible that the point of failure is not in your router configuration, or at your router at all. If you examine your router's configuration and operation and everything looks good, the problem might be be farther up the line. In fact, it may be the line itself, or it could be another router, which may or may not be under your administration.

One extremely useful and simple diagnostic tool is the ping command. Ping is an implementation of the IP Message Control Protocol (ICMP). Ping sends an ICMP echo request to a destination IP address. If the destination machine receives the request, it responds with an ICMP echo response. This is a very simple exchange that consists of:

Hello, are you alive?

Yes, I am.

ExampleName#ping xx.xx.xx.xx

If the ping test is successful, you know that the destination you are having difficulty reaching is alive and physically reachable.

If there are routers between your router and the destination you are having difficulty reaching, the problem might be at one of the other routers. Even if you ping a router and it responds, it might have other interfaces that are down, its routing table may be corrupted, or any number of other problems may exist.

To see where packets that leave your router for a particular destination go, and how far, use the trace command.

ExampleName#trace xx.xx.xx.xx

It may take a few minutes for this utility to finish, so give it some time. It will display a list of all the hops it makes on the way to the destination.

4.2 debug commands

There are several debug commands provided by the IOS. These commands are not covered here. Refer to the Cisco website for more information.

4.3 Hardware and physical connections

Do not overlook the possibility that the point of failure is a hardware or physical connection failure. Any number of things can go wrong, from board failures to cut cables to power failures. This document will not describew troubleshooting these problems, except for these simple things.

Check to see that the router is turned on. Also make sure that no cables are loose or damaged. Finally, make sure cables are plugged into the correct ports. Beyond this simple advice you will need to check other sources.

4.4 Out of your control

If the point of failure is farther up the line, the prolem might lie with equipment not under your administration. Your only option might be to contact the equipment's administrator, notify them of your problem, and ask them for help. It is in your interest to be courtious and respectful. The other administrator has their own problems, their own workload and their own priorities. Their agenda might even directly conflict with yours, such as their intention to change dynamic routing protocols, etc. You must work with them, even if the situation is frustrating. Alienating someone with the power to block important routes to your network is not a good idea.

5. References

Cisco 基本指令

Config 模式
router(config)# namehost abc 更改 hostname 為 abc
router(config)# no ip domain-lookup        當所下的指令並非為 Router 指令時,不會導致 10 多秒的 Broadcast,如範例 1
router(config)# ip name-server 168.95.1.1  設定 DNS IP,若不指定時,則下 no ip name-server 168.95.1.1
router(config)# enable password gavin 設定 Enable 模式的 Password 為 gavin
範例1
Route# ls
Translating "ls"...domain server (255.255.255.255)
Translating "ls"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
Ethernet 模式
1. router# conf t  進入 config 模式
2. router(config)# int e0        進入 Ethernet0 模式
3. router(config-if)# ip address 100.100.100.100 255.255.255.0 設定閘道器 Ethernet0 IP及Submask
4. router(config-if)# no ip directed-broadcast
5. router(config-if)# no shutdown        原預設值為 shutdown 不啟動狀態,若要啟動 Ethernet0,則須設 no shutdown
補充:
設定第二組 IP 在同一個 Ethernet0
router(config-if)# ip address 200.200.200.200 255.255.255.0 secondary
移除第二組 IP 在同一個 Ethernet0
router(config-if)# no ip address 200.200.200.200 255.255.255.0 secondary
6. router(config-if)# [ ctrl + z ]   離開 Ethernet 0 模式,回到 Enable 模式
7. router# show run        顯示目前設定
Serial 模式
1. router# config t
2. router(config)# int s0 進入 Serial0 模式
3. router(config-if)# ip add 111.111.111.111 255.255.255.252 設定 Serial0 IP及Submask
4. router(config-if)# no ip directed-broadcast
5. router(config-if)# no shutdown        原預設值為 shutdown 不啟動狀態,若要啟動 Serial0,則須設 no shutdown
6. router(config-if)# encapsulation ppp        設定 ppp(點對點全雙工) 模式,若為 HDLC 則為半雙工,且要與對方 Router 的協定一樣
7. router(config-if)# description HQ(R) <--> Branch Office(R) 設定 Serial0 描述名稱
8. router(config-if)# [ ctrl+ z ]  離開 Serial 0 模式,回到 Enable 模式
9. router#
IP Classless 模式
1. router# conf t   進入 config 模式
2. router(config)# ip classless        進入 ip classless 模式
3. router(config)# ip route 0.0.0.0 0.0.0.0 s0        將所有未知之 IP 送往 S0
Line 模式
設定 telnet 密碼

1. router# conf t 進入 config 模式
2. router(config)# line vty 0 4 進入 Telnet vty 0 到 vty 4 的密碼設定模式
3. router(config-line)# password gavin 將 Terlnet 密碼設為 gavin
取消 telnet 密碼
1. router(config-line)# no password        取消密碼
Console 模式
設定 Console 密碼
1. router# conf t   進入 config 模式
2. router(config)# line con 0  進入 Console 密碼設定模式
3. router(config-line)# password gavin 將 Console 密碼設為 gavin
取消 Console 密碼
1. router(config-line)# no password        取消密碼
router# wr 寫入 NVram
router# copy run start        寫入 NVram(Copy running-config startup-config)
router# sh int e0        查看 Ethernet 第0 Port (E0) 狀態及流量
router# sh int s0        查看 Serial 第0 Port (S0) 狀態及流量
router# sh ip int brief        查看整體 interface 狀態
router# sh run        查看整體 Router 配置狀態
設定 SNMP 密碼
snmp-server community gavin ro 設定 SNMP 密碼為 gavin,並權限為 read only

神奇恢復Cisco路由器密碼

一、Cisco 路由器密碼類別
1﹒有效密碼密碼(enabled secret password): 是一種安全級別最高的加密密碼,適用於Cisco IOS 10.3 (2) 以後的版本,在路由器的配置表中以密碼的形式出現。
2﹒有效密碼(enabled password):安全級別次高的非加密密碼。當有效密碼密碼沒設定時,使用該密碼。
3﹒終連接埠令(console password):用於防止非法或未授權用戶修改路由器配置,在用戶透過主控終端對路由器進行設定時,使用該密碼。

二、密碼恢復原理
1﹒內部記憶體種類(以2500系列為例)。Cisco 路由器保存了幾種不同的配置參數,並存放在不同的記憶體模組中。
Cisco2500系列路由器的記憶體:ROM、閃存(flash memory)、不可變RAM(NVRAM)、RAM和動態記憶體(DRAM)等五種。作用如下:
內 存 類 別
作 用
ROM
存放系統的引導程式。類似PC機的BIOS,是一種隻讀存儲器,系統掉電程式不會丟失。
閃存
存放Cisco IOS的鏡像,類似PC機的硬碟,是一種可擦寫、可程式設計的ROM, 系統掉電數據不會丟失。
NVRAM
存放配置文件(即Startup-config)
RAM
存放目前系統使用配置(即Running-config)
DRAM
主要包含路由表、ARP緩存、fast-switch緩存、數據包緩存等,也包含正在執行的配置文件。系統掉電該記憶體數據回丟失。
一般地,路由器啟動時,首先運行ROM中的程式,進行系統自檢及引導,然後運行FLASH中的IOS ,並在NVRAM中尋找路由器配置,並裝入DRAM中。
2﹒密碼恢復的關鍵在於對配置登記碼(Configuration Register Value)進行修改,從而讓路由器從不同的記憶體中調用不同的參數表進行啟動。有效密碼存放在NVRAM 中,因此修改密碼的實質是將登記碼進行修改,從而讓路由器跳過NVRAM 中的配置表,直接進入ROM 模式,然後對有效密碼和終連接埠令進行修改或者重新設定有效加密密碼( 因為有效加密密碼為加密亂碼,無法進行恢復,隻可以刪掉或改寫),完成後再將登記碼恢復(如忘記恢復路由器重起後修改的配置可能回丟失)。
Configuration Register Value及其含義
Configuration Register Value
含 義
0x2102
缺省設定
bit13=0x2000
Flash引導失敗5次後,自動從Rom引導
bit8=0x0100
關閉Break鍵
Boot field=0x2
從Flash中引導正常運行模式
0x2101
bit13=0x2000
Flash引導失敗5次後,自動從Rom引導
bit8=0x0100
關閉Break鍵
Boot field=0x1
進入Boot Rom運行模式。Router(boot)>
0x142
bit8=0x0040
進入 Rom Monitor運行模式。> 或 ROMMON>
Boot field=0x2
從Flash中引導正常運行模式。

推到 Twitter!
推到 Plurk!
推到 Facebook!