Cisco路由器安装向导( 二 )


Configuring interface Ethernet0:Return
Is this interface in use? [yes]:Return
Configure IP on this interface? [yes]:Return
IP address for this interface: 1.1.1.1
Number of bits in subnet field [0]:Return (4)
Class A network is 1.0.0.0, 0 subnet bits; mask is /8
以上是配置以太口0,假设IP地址是1.1.1.1,掩码是255.0.0.0.
Configuring interface Serial0:Return
Is this interface in use? [yes]:Return
Configure IP on this interface? [yes]:Return
Configure IP unnumbered on this interface? [no]:Return
IP address for this interface: 2.1.1.1
Number of bits in subnet field [0]:Return
Class A network is 2.0.0.0, 0 subnet bits; mask is /8
以上是配置串口0,假设IP地址是2.1.1.1,掩码是255.0.0.0.
Configuring interface Serial1:Return
Is this interface in use? [yes]: no
以上是当不需要用串口1时,请敲入no.
The following configuration command script was created:
hostname JSRouter
enable secret 5 $1$Bv.r$j/Zm2B6jw9UTQPxLGZjAz.
enable password cisco1
line vty 0 4
password cisco
snmp-server community public
!

ip routing
!
interface Ethernet0
ip address 1.1.1.1 255.0.0.0
!
interface Serial0
ip address 2.1.1.1 255.0.0.0
!
interface Serial1
shutdown
no ip address
!
router igrp 1
network 1.0.0.0
network 2.0.0.0
!
end
Use this configuration? [yes/no]: yes (5)
确认当前配置后,把当前配置写入NVRAM 中.这样以后开机自动把配置调入内存,不需要重新配置了.
Building configuration...
Use the enabled mode "configure" command to modify this configuration.
Press RETURN to get started!
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to down
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINK-3-UPDOWN: Interface Serial1, changed state to down
%LINK-5-CHANGED: Interface Serial1, changed state to administratively down
%SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 11.2(1), MAJOR RELEASE SOFTWARE (fc1
)
Copyright (c) 1986-1996 by cisco Systems, Inc.
Compiled Mon 30-Sep-96 12:07 by ajchopra
JSRouter>en
Password:(敲入密码,不反显的)
JSRouter#
备注:
Enter enable password:-----这个口令是对于IOS 10.2以下版本适用,在IOS 10.3以上版本均使用secret,不再用password.在配置文件中, secret是加密显示的.
现在我们通常都在IOS 10.3 版本以上,故无需password这个口令.
另外,password和secret不能相同.
在初始配置中,默认的路由协议是IGRP,若敲入yes,则生成IGRP路由协议.假如不想使用IGRP协议,则打No,在配置模式下(conf t)选择路由协议.
自治系统 (autonomous system)-----它是一个域的概念.路由协议在一个 自制系统中可以交换路由信息,而在两个自制系统之间是不能直接传递路由信息的,必须通过类似网际路由协议才能互相通讯.这样就大大地缩小了路由表,减少它占用的带宽量,使网络具有扩展性.
Number of bits in subnet field [0]-----掩码子网的位数.举例说明:
掩码为255.0.0.0的掩码子网位数是0,掩码共8位
掩码为255.255.0.0的掩码子网位数8,掩码共16位
掩码为255.255.255.0的掩码子网位数16,掩码共24位
掩码为255.255.255.252的掩码子网位数22,掩码共30位
Cisco命令系统是即时生效的,也就是说,配置完后立即执行,但若不写入NVRAM 中,关掉电源后就会丢失.你若想保留更改的配置,请敲入write命令.

推荐阅读