路由器的一般配置和简单调试(4)
选择封装方式(默认的封装方式是HDLC,您可根据与您的路由器相连选用的封装类型来决定用什么样的封装类型
No serial cable seen.
Choose mode from (dce/dte) [dte]:
学习啦在线学习网 (因为没有连串口线所以会让您选择设备类型)
Configure IP on this interface? [yes]: y
(在接口上配置IP)
学习啦在线学习网 Configure IP unnumbered on this interface? [no]:
IP address for this interface: 172.16.0.5
配置该接口的IP地址(在此地址为172.16.0.5)
Subnet mask for this interface [255.255.0.0] : 255.255.255.252
学习啦在线学习网 配置该接口的子网掩码.(默认的是255.255.0.0,可以手工输入修改为255.255.255.252)
学习啦在线学习网 Class B network is 172.16.0.0, 30 subnet bits; mask is /30
(以下配置同上)
学习啦在线学习网 Do you want to configure FastEthernet0/1 interface? [yes]:
Use the 100 Base-TX (RJ-45) connector? [yes]:
学习啦在线学习网 Operate in full-duplex mode? [no]: y
Configure IP on this interface? [yes]: y
学习啦在线学习网 IP address for this interface: 172.16.0.9
学习啦在线学习网 Subnet mask for this interface [255.255.0.0] : 255.255.255.252 Class B network is 172.16.0.0, 30 subnet bits; mask is /30
The following configuration command script was created:
(把您的配置显示出来)
学习啦在线学习网 hostname aaa
enable secret 5 $ul/V$ezbZFgvzGHD.YPSieC0Ew/
enable password RouterA
line vty 0 4
password ccc
no snmp-server
!
ip routing
no bridge 1
!
学习啦在线学习网 interface FastEthernet0/0
media-type 100BaseX
full-duplex
学习啦在线学习网 ip address 192.168.0.1 255.255.255.0
!
学习啦在线学习网 interface Serial0/0
encapsulation hdlc
学习啦在线学习网 ip address 172.16.0.5 255.255.255.252
!
interface FastEthernet0/1
media-type 100BaseX
学习啦在线学习网 full-duplex
ip address 172.16.0.9 255.255.255.252
dialer-list 1 protocol ip permit
学习啦在线学习网 dialer-list 1 protocol ipx permit
!
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]: 2
学习啦在线学习网 选择2保存设置并存入NVRAM中
学习啦在线学习网 Building configuration...
[OK] Use the enabled mode 'configure' command to modify this configuration.
Press RETURN to get started!
路由器重新启动
00:00:08: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down
学习啦在线学习网 00:00:08: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
学习啦在线学习网 00:00:08: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
学习啦在线学习网 00:00:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
00:00:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
00:00:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
学习啦在线学习网 00:03:18: %IP-5-WEBINST_KILL: Terminating DNS process
学习啦在线学习网 00:03:24: %SYS-5-RESTART: System restarted --
学习啦在线学习网 Cisco Internetwork Operating System Software
IOS (tm) 3600 Software (C3640-I-M), Version 12.1(2)T, RELEASE SOFTWARE (fc1)
学习啦在线学习网 Copyright (c) 1986-2000 by cisco Systems, Inc.
学习啦在线学习网 Compiled Tue 16-May-00 12:26 by ccai
RouterA>
进入用户模式
RouterA>en
学习啦在线学习网 Password:
RouterA#
进入全局模式
RouterA#sh run
查看现在运行的配置
学习啦在线学习网 Building configuration...
Current configuration:
!
学习啦在线学习网 version 12.1
学习啦在线学习网 service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname RouterA
!
enable secret 5 $ul/V$ezbZFgvzGHD.YPSieC0Ew/
enable password bbb
!
memory-size iomem 25
ip subnet-zero
!
学习啦在线学习网 interface FastEthernet0/0
ip address 192.168.0.1 255.255.255.0
speed auto
学习啦在线学习网 full-duplex
!
学习啦在线学习网 interface Serial0/0
学习啦在线学习网 ip address 172.16.0.5 255.255.255.252
clockrate 2000000
!
学习啦在线学习网 interface FastEthernet0/1
学习啦在线学习网 ip address 172.16.0.9 255.255.255.252
speed auto
full-duplex
!
ip classless
no ip http server
!
学习啦在线学习网 dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
!
line con 0
学习啦在线学习网 transport input none
line aux 0
line vty 0 4
学习啦在线学习网 password ccc
login
!
end
学习啦在线学习网 现在您就完成了了一个新路由器的基本配置,接下来就可以进行进一步的详细配置了