一直想开博客写点自己学习中的心得或者发发学习中所做的笔记,以此也算督促自己养成勤记笔记的习惯,以下所写都是自己在配置cisco路由器时的笔记,如果不真确这处,还请大家指正,谢谢!
一、基本介绍:
cisco路由器分为几类配置模式,如下:
User EXEC 启动后默认的模式 Router> 利用logout命令退出
Privileged EXEC 从User模式下敲入enable命令 Router# 退出到上一模式用exit,logout,disable
Global configuration 在上一模式下敲入configure terminal Router(config)# 退出到上一模式用exit,end,Ctrl-z
Interface configuration 在上一模式下敲入interface type number Router(config-if)# 退到Global模式利用exit,退出
例如:interface serial 0/0 到privileged模式利用Ctrl-z
在各种命令行模式下会有一套不同的操作命令可以敲入?来显示当前模式下可以执行的命令,例如:
Router> ?
如果要补充完整一个命令,可以如下操作:
Router> s?
对于一个命令需要的参数变量,可以如下查看:
Router> show ? (注:中间加空格)
在我们对路由器的一系列设置完成以后,需要敲入copy running-config startup-congfig命令来把我们的设置保存到nonvolatile
random-access memory(NVRAM),这样在系统重启或者断电时,这些设置不会丢失,例如:
Router# copy running-config startup-config
Building configuration...
会花几分钟时间,保存好以后会显示:
[OK]
Router#
如果要取消我们之前的一个命令设置,可以用no命令,例如:no ip routing
二、启动配置
1、启动路由器电源以后,会有一连串的信息显示在你的屏幕上,这时候不要从键盘上敲入任何字符,以免打断信息的显示而导致
路由器断电,这些信息的显示可能会花几分钟的时间。
2、当下列信息显示出来时,输入yes开始初始化配置日志:
Would you like to enter the initial configuration dialog? [yes/no]:
3、当下列信息出现时,按回车查看当前接口情况:
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/0 unassigned NO unset up up
Serial0/0 unassigned NO unset up down
BRI0/0 unassigned NO unset up up
Serial0/1 unassigned NO unset up down
Serial0/2 unassigned NO unset up down
4、为路由器输入一个主机名:
Configuring global parameters:
Enter host name [Router]: 2600
The enable secret is a password used to protect access to privileged EXEC and
configuration modes. This password, after entered, becomes encrypted in the configuration.
5、输入一个可用的secret password.
Enter enable secret: xxxx
The enable password is used when you do not specify an enable secret password, with some
older software versions, and some boot images.
6、输入一个与第五步不一样的密码,这个密码的安全性没有第五步的密码高,在查看配置文件时能看到此步设置的密码:
Enter enable password: guessme
The virtual terminal password is used to protect access to the router over a network
interface.
7、输入虚拟中断的密码,这个密码用来阻止未经授权的访问路由器,未授权的访问是指通过端口而不是控制台端口
Enter virtual terminal password: guessagain
8、Respond to the following prompts as appropriate for your network:
Configure SNMP Network Management? [yes]:
Community string [public]:
Configure LAT? [no]:
Configure AppleTalk? [no]:
Configure DECnet? [no]:
Configure IP? [yes]:
Configure IGRP routing? [yes]:
Your IGRP autonomous system number [1]: 15
Configure CLNS? [no]:
Configure IPX? [no]:
Configure Vines? [no]:
Configure XNS? [no]:
Configure Apollo? [no]:
Configure bridging? [no]:
9、Configure the ISDN switch type used by the Basic Rate Interface (BRI) module:
BRI interface needs isdn switch-type to be configured
Valid switch types are :
[0] none..........Only if you don't want to configure BRI.
[1] basic-1tr6....1TR6 switch type for Germany
[2] basic-5ess....AT&T 5ESS switch type for the US/Canada
[3] basic-dms100..Northern DMS-100 switch type for US/Canada
[4] basic-net3....NET3 switch type for UK and Europe
[5] basic-ni......National ISDN switch type
[6] basic-ts013...TS013 switch type for Australia
[7] ntt...........NTT switch type for Japan
[8] vn3...........VN3 and VN4 switch types for France
Choose ISDN BRI Switch Type [2]:
10、Configure the asynchronous serial lines for the integrated modems on the modules installed in the router.
(If you want to allow users to dial in through the integrated modems, you must configure the
asynchronous lines.)
Async lines accept incoming modems calls. If you will have
users dialing in via modems, configure these lines.
Configure Async lines? [yes]:
Async line speed [115200]:
Will you be using the modems for inbound dialing? [yes]:
Would you like to put all async interfaces in a group and configure them all at one time?
[yes]:
Allow dial-in users to choose a static IP addresses? [no]:
Configure for TCP header compression? [yes]:
Configure for routing updates on async links? [no]:
Enter the starting address of IP local pool? [X.X.X.X]: 172.20.30.40
Enter the ending address of IP local pool? [X.X.X.X]: 172.20.30.88
You can configure a test user to verify that your
dial-up service is working properly
What is the username of the test user? [user]:
What is the password of the test user? [passwd]:
Will you be using the modems for outbound dialing? [no]:
Configuring interface parameters:
三、配置接口参数:
快速以太网接口配置:
Do you want to configure FastEthernet0/0 interface [yes]:
Use the 100 Base-TX (RJ-45) connector? [yes]:
Operate in full-duplex mode? [no]:
Configure IP on this interface? [no]: yes
IP address for this interface: 6.0.0.1
Number of bits in subnet field [0]:
Class A network is 6.0.0.0, 0 subnet bits, mask is /8
Configure IPX on this interface? [yes]:
IPX network number [1]:
Need to select encapsulation type
[0] sap (IEEE 802.2)
[1] snap (IEEE 802.2 SNAP)
[2] arpa (Ethernet_II)
[3] novell-ether (Novell Ethernet_802.3)
Enter the encapsulation type [2]:
串行接口配置:
输入适合你路由器和网络的参数值,你看到的信息可能会不同:
Do you want to configure Serial0/0 interface? [yes]:
Some encapsulations supported are
ppp/hdlc/frame-relay/lapb/atm-dxi/smds/x25
Choose encapsulation type [ppp]:
No serial cable seen.
Choose mode from (dce/dte) [dte]:
如果串行光缆是DCE,你会看到以下提示:
Serial interface needs clock rate to be set in dce mode.
The following clock rates are supported on the serial interface.
0
1200, 2400, 4800, 9600, 19200, 38400
56000, 64000, 72000, 125000, 148000, 500000
800000, 1000000, 1300000, 2000000, 4000000, 8000000
Choose clock rate from above: [2000000]:
Configure IP on this interface? [yes]:
IP address for this interface: 2.0.0.1
Subnet mask for this interface [255.0.0.0]:
Class A network is 2.0.0.0, 8 subnet bits; mask is /8
Configure IPX on this interface? [no]: yes
IPX network number [8]:
最后保存以上配置:
在第一句的选择中输入yes
Use this configuration? {yes/no} : yes
Building configuration...
Use the enabled mode 'configure' command to modify this configuration.
Press RETURN to get started!