IOS软件中使用安装模式配置路由器
2.4 实验3:使用安装模式配置路由器
安装(Setup)模式可以从特权执行模式下使用setup命令进入,或者当一台路由器NVRAM中没有配置文件时,开机自动进入安装模式的对话。
本节演示使用安装模式来配置路由器。
1.实验目的
通过本实验。读者可以把握以下技能:
使用安装模式对路由器做基本的配置;
理解安装模式中所要求配置项目的含义;
观察安装模式下的路由器显示内容。
2.设备需求与线缆连接要求
本实验的设备与线缆连接要求和实验1完全相同,请参见实验1的有关图示和说明,在此不再赞述。
3.实验配置及监测结果
在给PC机和路由器加电后,开始进行实验。
本实验是在路由器NVRAM中没有配置文件的情况下进行的。假如VNRAM中已有配置文件存在。可在特权执行模式下发出erase nvram或whte erase命令清空NVRAM,再用reload命令重新启动路由器,然后进行实验。
实验过程见配置清单2-1。
配置清单2-1使用安装模式配置路由器(含说明)
---System Configuration Dialog---
Continue with configuration dialog? [yes/no]: y (键入y或yes继续进行以话)
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 '[]'.
Basic management setup configures only enough connectivity
for management of the system, extended setup will ask you
to configure each interface on the system
Would you like to enter basic management setup? [yes/no]: y (键入y或yes进入基本治理设置)
Configuring global parameters:
Enter host name [Router]:Router1 (给路由器命名为Router1)
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.
Enter enable secret: cisco (键入enable secret,即加密的口令)
The enable password is used when you do not specify an
enable secret password, with some older software versions, and
some boot images.
Enter enable password: cisco1
(键入 enable password,当enable secret和enable password同时配置时,只有enable secret生效)
The virtual termina1 password is used to protect
access to the router over a network interface.
Enter virtual termina1 password: cisco2 (键入vty password用于对telnet访问进行认证)
Configure SNMP Network Management? [no]: (不配置SNMP )
Current interface summary (以下显示当前接口的汇总信息)
Interface IP-Address OK? Method Status Protocol
Ethemet0 unassigned YES unset administratively down down
Ethernet1 unassigned YES unset administratively down down
Serial0 unassigned YES unset administratively down down
Serial1 unassigned YES unset administratively down down
Enter interface name used to connect to the
management network from the above interface summary: ethernet0 (键入作为治理接口的接口名)
Configuring interface EthemetO:
Configure IP on this interface? [no]: y (对Ethernet0进IP配置)
IP address for this interface: 192.168.1.1 (键入IP地址)
Subnet mask for this interface [255.255.255.0] : (键入子网掩码,或按回车键使用默认值)
Class C network is 192.168.1.0, 24 subnet bits; mask is /24
The following configuration command script was created:
(以下列出了刚刚输入的配置清单)
hostname Router1
enable secret 5 $1$iOgz$y37cZ7pU3pHghZLYDnbnZ.
enable password ciscol
line vty 0 4
password cisco2
no snmp-server
!
no ip routing
!
interface Ethemet0
no shutdown
ip address 192.168.1.1255.255.255.0
no mop enabled
!
interface Ethernet1
shutdown
no ip address
!
interface Seria10
shutdown
no ip address
!
interface Seria11
shutdown
no ip address
!
end
[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
Enter your selection [2]: (按回车键使用默认值,将配置存入NVRAM)
Building configuration...
02:01:47: %LINK-3-UPDOWN: Interface EthemetO, changed state to up
02:01:49: %LINEPROTO-5-UPDOWN: Line protocol on Interface EthemetO, changed state to up[OK]
Use the enabled mode 'configure* command to modify this configuration.
Routeri#
通过以上的Setup对话过程,路由器己经完成基本的配置,此时完全可以通过Telnet对它进行更全面的配置,而无需直接用Console电缆连接进行配置了。这也就意味着我们不必一直守在路由器旁边进行调试,而是可以通过网络对它进行进一步的配置。
上述对话中,假如配置了SNMP协议相关项目的话,我们还可以通过网管软件对该路由器进行相应的配置和监测。