CCNA笔记:IOS介绍(二)
精品资源~临风文档。
CCNA笔记:IOS介绍(二)
只有enable secret是加密的,当你在特权模式下输入sh running-config显示DRAM的配置文件时,其他密码将被罗列出来:
Router#sh run
) (略
!
enable secret jhdflkdfg$#sdf
enable password 123
对密码进行加密:在全局配置模式下使用service password-encryption命令
Banners
banner类似标语,问候语.最常用的是MOTD(message of the day),分界符用于分隔信息,但是分隔符不能出现在MOTD信息中,如下:
Router(config)#banner motd #
The Router is mine
#
Router(config)#^Z(Ctrl+Z)
1
Router#exit
Router con0 is now available
Press RETURN to get started
Router>
其他的3种banner:
1.exec banner
2.incoming banner
3.login banner
Router Interfaces
配置router的接口,一般命令模式采用:interface type
number的格式,比如:
Router(config)#int ethernet 0
但是Cisco的2600,3600,4000和7000等系列采用了物
理卡槽和模块化的端口机制.因此,命令变化为:interface
type slot/port,比如:
Router(config)#int fastethernet 0
% Imcomplete command
Router(config)#int fastethernet 0?
/
Router(config)#int fastethernet 0/?
<0-1>Fastethernet interface number
Router(config)#int fastethernet 0/1
2
配置连接器的介质类型,使用media-type命令,不过这个
一般是自动检测,如下:
Router(config)#int fa 0/0
Router(config-if)#media-type ?
100BaseX Use RJ45 for -TXSC F0 for –FX
MII Use MII connector
Bring Up an Interface
打开和关闭1个接口,分别使用shutdown和no shutdown命令,当你关闭某个接口的时候,使用sh interfaces命令可
以查看接口状态,并且你将看到以下输出:
Router#sh int e0
Ethernet0 is administratively down,line protocol is
down
接口是关闭的,所以你要手动打开它,如下:
Router#conf t
Router(config)#int e0
Router(config-if)#no shut
Router(config-if)#^Z
Ethernet is up,line protocol is up
Configuring an IP Address on an Interface
给某个接口配置IP地址,使用ip address [address] [mask]命令,如下:
3
Router(config-if)#ip address 172.16.10.2 255.255.255.0
记得把接口打开:
如果你需要在1个接口添加第二个子网地址,在末尾使用
secondary参数,这将替换现有IP地址,如下:
Router(config-if)#ip address 172.16.20.2 255.255.255.0 secondary
来验证下:
interface Ethernet0
ip address 172.16.20.2 255.255.255.0 secondary
ip address 172.16.10.2 255.255.255.0
Serial Interface Commands
Serial口一般是连接在CSU/DSU等类型的提供时钟频率
的设备上.但是,假如你在个实验环境里采用了背对背配置,
那么1端将作为DCE设备提供时钟频率.默认Cisco的router都是DTE,所以你必须让1个serial接口来提供时钟频率,采
用的命令是:clock rate,如下:
Router(config)#int s0
Router(config-if)#clock rate ?
Speed (bits per second)
1200
56000
4
64000
Router(config-if)#clock rate 64000
% Error: This commands applies only to DCE interfaces
Router(config-if)#int s1
确定serial接口是否是DCE线缆使用sh controllers命令,如下:
Router>sh controllers s 0
HD unit 0, idb=0x297DE8, driver structure at
0x29F3A0
Buffer size 1524 HD unit 0, V.35 DCE cable
Cisco的router的默认serial连接带宽是
T-1(1.544Mbps).有的路由
协议
离婚协议模板下载合伙人协议 下载渠道分销协议免费下载敬业协议下载授课协议下载
要以带宽做为度来进行衡量,
所以,我们给它配置带宽,使用bandwidth命令,注意参数单位
是kb,如下:
Router(config-if)#bandwidth ?
<1-10000000>Bandwidth in kilobits
Router(config-if)#bandwidth 64
Hostnames
给router配置主机名,使用hostname命令,这个是本地
标志,不影响router在Internet上的工作,注意回车立即生
效,如下:
5
Router(config)#hostname Noko
Noko(config)#hostname Noco
Noco(config)#
Descriptions
description命令:本地标志,可以给接口加描述,以便用
于区分,如下:
Noco(config)#int e0
Noco(config-if)#description Sales LAN
Noco(config-if)#^Z
Noco#sh int e0
Description: Sales LAN
Viewing and Saving Configurations
将running-config(DRAM)的文件复制到
startup-config(NVRAM)里,使用copy running-config startup-config命令:
Noco#copy run start
可以使用erase startup-config命令删除
startup-config文件,如下:
Noco#erase startup-config
Noco#sh start
%% Non-volatile configuration memory is not present
假如在这个情况下在特权模式使用reload命令重新启动
6
router,将进入setup模式
Verifying Your Configuration
ping:采用了ICMP echo requests和replies
traceroute:使用ICMP和IP TTL来跟踪包所经过的路径
Verifying with the show ip interface Command
show ip interface:提供router接口的层3信息,包括:
1.接口状态
2.IP地址和掩码
3.访问列表(access-list)信息
4.一些其他的基本的IP信息
Using the show ip interface brief Command
show ip interface brief:和show ip interface类似,
只是提供简洁点的
总结
初级经济法重点总结下载党员个人总结TXt高中句型全总结.doc高中句型全总结.doc理论力学知识点总结pdf
信息
Using the show controllers Command
sh controllers:显示物理接口的信息,还提供serial口
线缆信息,如下:
Router#sh controllers serial 0/0
buffer size 1524 HD unit 0, V.35 DTE cable
Router#sh controllers serial 0/1
buffer size 1524 HD unit 1, V.35 DCE cable
7