您的位置:首页 > 职场人生

实验二 配置路由器的接口IP地址及接口描述

2009-05-06 23:06 531 查看
验目的:熟练路由器的常用接口配置命令,会用路由器的状态命令查看路由器的状态。实验内容和步骤: 1、利用控制台登陆到路由器上,用password设置密码为cisco,用service password-encryption给密码加密。 Router(config)#enable password[/b] cisco Router(config)#service password-encryption[/b]实验用[/b]REV.35 CABLE [/b]连接路由器的串口,标有[/b]Serial V.35 DTE[/b]的[/b] [/b]一端为[/b]DTE[/b]接口,标有[/b]Serial V.35 DCE[/b]的一端为[/b]DCE[/b]接口,[/b]DCE[/b]的接口为串行链路提供时钟速率。串行接口之间必须有[/b]DCE[/b]设备提供时钟速率才能进行数据传输所以连接路由器时要注意哪个接口连接的是[/b]DCE[/b]接头,在这个接口设置好适当的时钟速率。[/b]2、用 interface Ethernet 0,进入以太网0接口配置模式,用ip address 命令设置接口ip地址为192.168.1.5/24。设置serial 0接口的IP为:192.168.2.5/24,设置DCE接口时钟速率为56000 bps以太网口的一般配置方法为:Router(config)#interface Ethernet 0 or Fastethernet 0[/b]Router(config-if)#media-type[/b] media_type //这里是指定介质的类型,它的值可以是aui,10baset,100baset,mii,根据具体的传输介质而定。这条命令在实验室的1721路由器上无效,1721不支持这个设置。Router(config-if)#speed 10 |100 |auto //[/b]设置传输速度10M,100M或自动Router(config-if)#[no] half-duplex //[/b]设置传输方式,用no half-duplex命令设置端口为全双工Router(config-if)#ip address[/b] ip_address subnet_mask[/i]Serial口的一般配置方法:Router(config)#interface serial 0[/b]Router(config-if)#clock rate[/b] rate_in_bits_per_second[/i]3、利用description命令设置接口描述为office room。Router(config-if)#description[/b] description[/i] 5、用”NO SHUTDOWN”打开端口。Router(config-if)#no shutdown[/b]6、用 “end” 命令退到特权模式,用”show interfaces”命令查看接口配置.用show ip interface 命令查看接口IP配置。命令格式为:router#show interfaces[/b]router#show ip interface[/b] type port_# //例如:show ip interface Ethernet 0router#show ip interface brief[/b] //每个接口输出一行显示IP概要信息。7、查看路由器其他状态信息。用状态命令show processes、show protocols、show memory、show stacks、 show buffers、show flash查看路由器状态。Router(config-if)#end[/b]Rouer#show processes cpu[/b]Router#show protocols[/b]Router#show memory[/b]Router#show stacks[/b]Router#show buffers[/b]Rouer#show flash[/b]7、用CDP来访问其他路由器,首先配置CDP,在每个接口上用 “cdp enable”命令启动CDP,练习用 show cdp neighbors查看相邻设备的信息,用show cdp interface查看用于传播和发现桢传输的信息,用 show cdp entry命令查看某个设备的CDP信息。用CDP neighbors detail查看本地路由器收到的CDP更新信息。停止cdp。Router(config)#interface Ethernet 0[/b]Router(config-if)#cdp enable[/b]Router(config-if)#interface serial 0[/b]Router(config-if)#cdp enable[/b]Rouer(config-if)#end[/b]Router#show cdp neighbors[/b]Router#show cdp neighbors detail[/b]Router#show cdp entry[/b] hostname //[/i]例如:[/i]show cdp entry routerARouter#config terminal[/b]Router(config)#no cdp run[/b]8、用 copy running-config startup-config 命令保存配置。Rouer#copy running-config startup-config[/b]9、确定TFTP服务器的位置,备份配置文件和IOS到TFTP服务器。Router#copy startup-config tftp[/b]Address or name of remote host []? //在这里输入TFTP服务器的IP地址或名字Destination filename [router-config]? //在这里指定目标文件名。Router#copy flash tftp[/b]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息