天天看點

CISCO router基本配置

基本配置

包括:

1.配置主機名稱

2.配置特權密碼/登陸密碼/使用者資料庫

3.配置使用者資料庫

4.配置TELNET 及CON口

5.配置禁止DNS解析

6.配置接口。能夠遠端登陸

7.配置檔案的儲存。

 Press RETURN to get started!

Router>ena

Router#conf?    當不了解指令的拼寫時可以使用幫助

configure 

Router#configure ?   當不了解指令的組成時可以使用幫助

  terminal  Configure from the terminal

  <cr>

Router#configure terminal  進入控制台配置模式

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#hostname R1    更改ROUTER名為R1

R1(config)#username cisco sec cisco   建立使用者名和密碼資料庫  sec  為secret的縮寫,加密。也可以為password

R1(config)#ena sec cisco         進行特權配置模式密碼,不配置的話TELNET無法使用

R1(config)#banner motd #this cisco router!#    使用者提示語,顯示在進入ROUTER前。

R1(config)#line vty 0 4     配置虛拟連接配接(TELNET)

R1(config-line)#login local   啟用登陸驗證,不啟用的話TELNET不能使用

R1(config-line)#exec-timeout 88 1   設定逾時值為88分鐘1秒

R1(config-line)#exi    退出

R1(config)#line console 0   進入控制台端口

R1(config-line)#login local 

R1(config-line)#exec-timeout 88 1

R1(config-line)#exit

R1(config)#no ip domain-lookup  禁用DNS解析

R1(config)#exi

R1#

%SYS-5-CONFIG_I: Configured from console by console

R1#clock set 15:36:10 mar 6 2011  設定時鐘

R1#show cloc

*15:36:18.94 UTC ??? ?? 6 2011

R1#show ip int brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        unassigned      YES unset  administratively down down

FastEthernet0/1        unassigned      YES unset  administratively down down

Vlan1                  unassigned      YES unset  administratively down down

R1#conf t

R1(config)#interface fastethernet0/0   進入端口F0/0

R1(config-if)#ip add 192.168.1.1 255.255.255.0   配置IP和掩碼

R1(config-if)#no shu   ROUTER端口預設是關閉。需要用no shutdown指令開啟.showdown指令關閉。

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#description neiwang    端口描述:neiwang

R1(config-if)#exi

R1(config)#logging ?  

  A.B.C.D   IP address of the logging host

  buffered  Set buffered logging parameters

  console   Set console logging parameters

  host      Set syslog server IP address and parameters

  on        Enable logging to all enabled destinations

  trap      Set syslog server logging level

  userinfo  Enable logging of user info on privileged mode enabling

R1(config)#lin con 0

R1(config-line)#logging synchronous  它可以阻止那控制台資訊來打斷你目前的輸入,進而使輸入資訊顯得更為簡單易讀。DEBUG時用處就顯現出來了。效果和配置隻在控制台配置模式下

R1(config-line)#exi

R1#copy running-config startup-config    儲存配置指令。 将RAM中正在運作的配置running-config儲存 在NVRAM的startup-config 中

Destination filename [startup-config]?

Building configuration...

[OK]

R1#reload    重新開機ROUTER

本文轉自  還不算暈  51CTO部落格,原文連結:http://blog.51cto.com/haibusuanyun/508165