Cisco路由器配置必用10条命令
1 不让日志消息打扰你的配置过程:
          Router(config)# line con 0

   Router(config-line)# logging synchronous

   Router(config)# line aux 0

   Router(config-line)# logging synchronous

   Router(config)# line vty 0 4

   Router(config-line)# logging synchronous

2 在路由器上配置一个登录帐户并启用
         Router(config)# username root secret  Password   yourpassword       
        Router(config)# line con 0

  Router(config-line)# login local

  Router(config)# line aux 0

  Router(config-line)# login local

  Router(config)# line vty 0 4

  Router(config-line)# login local
3 在路由器上设置一个主机名:Router(config)# hostname  XXX
4 为进入特权模式设置口令(我强烈推荐使用enable secret命令):
          Router(config)# enable secret  Password  yourpassword
5 加密路由器口令 : Router(config)# service password-encryption
6  禁用Web服务: no ip http server
7 配置DNS,或禁用DNS查找:
          禁用DNS的方法:Router(config)# no ip domain-lookup
          正确地配置DNS:ip name-server  yourDomain server IP address
设置路由器时钟,或配置NTP服务器
         首先设置你的时区和夏令时。例子如下:

   Router(config)# clock timezone  yorutime zone

   Router(config)# clock summer-time yourtime zone in summer

   然后,为了确保路由器的事件消息显示正确的时间,设置路由器的时钟,或者配置一个NTP服务器。设置时钟的例子如下:

   Router# clock set 14:11:00 Nov 252008

   如果你已经在网络中有了一个NTP服务器(或可以访问Internet的路由器),你可以命令路由器将之作为时间源。这是你最好的选择,当路由器启动时,它将通过NTP服务器设置时钟。举例如下:

   Router(config)# ntp server  yoruNTP server ip address
 
9 配置命令别名

         举例如下:

   Router(config)# alias exec s sh startup
10 在路由器缓冲区或系统日志服务器中记录系统消息
      
         Router(config)# logging buffered 25367