您好,欢迎来到筏尚旅游网。
搜索
您的当前位置:首页cisco路由器的IOS常用命令的配置

cisco路由器的IOS常用命令的配置

来源:筏尚旅游网
实验一: cisco路由器的IOS常用命令的配置

适合环境:

cisco路由器的IOS常用命令的配置

目 标:通过完成该实验将能够

理解和掌握路由器主要的命令模式;通过命令行模式配置路由器的密码;主机名,接口IP地址,接口描述信息,Banner,路由器配置信息存盘,以及各项配置信息的查看 通过命令行进行路由器各类信息的查看(版本、配置内容,硬件信息等) 学会使用帮助键,快捷键,提示键完成以上内容的操作

预备知识:

CISCO PACKET TRACER5.0使用;cisco路由器的基本知识 实验设备:为了完成该实验,需要以下设施 实验机房;CISCO PACKET TRACER5.

实验目的: 掌握cisco设备的基本配置命令和方法

任务开始:

任务 具体步骤 1.路由器的几个操作模式 Router> //用户模式 Router>enable //用户模式敲入enable进入特权模式 Router#configure terminal //特权模式敲入configure termina进入配置模式 Router(config)#interface ethernet 0 //进入接口配置模式 敲入interface+接口类型+接口编号,进入接口配置模式(如:interface serial 0 或是interface serial 0/1 ,interface fast1/1,接口编号是多少具体要看是哪个型号的设备) Router(config-if)#exit //从接口模式退出到配置模式 Router(config)#exit //从配置模式退出到enable模式 Router# //enable模式,也是特权模式. 注意:任何时候按Ctrl-z或是end都会退出到特权模式 任务 2.命名主机名 具体步骤 路由默认主机名为Router 把路由器的主机名命名为2n-R2600-A Router(config)#hostname 2n-R2600-A 2n-R2600-A (config)# 2n-R2600-A(config)#hostname 2nplan //设置主机名是2nplan 2nplan(config)# 任务 3.给路由器设置时间,并查看时间信息 具体步骤 2nplan#clock set 23:46:50 sep 4 2006 //设置时间 2nplan#show clock //用show clock 命令查看时间 23:46:57.527 UTC Mon Sep 4 2006 2nplan# 任务 具体步骤 4.给路由器设置banner 2nplanr(config)#banner motd welcome //登录信息 Enter TEXT message. End with the character 'w'. welcome to 2npan //登录信息 Router(config)#^Z %SYS-5-CONFIG_I: Configured from console by console Welcome to wisdom // 配置是banner之后无论谁登录到路由器都会先看到的信息. Banner信息很多情况下是一些警告的信息 任务 5.路由器接口的描述 具体步骤 2nplan(config)#interface ethernet 0 2nplan(config-if)#description ToFuzhou-R2600-A 描述该路由器的ethernet0口是接到福州的路由器A,一般都要尽可以的描述详细一点,这样有利于日后的维护. 任务 6.路由器,交换机密码的设置 A.enable密码的设置并查看 具体步骤 (enable的密码就是从用户模式到特权模式的密码,enable的密码有两种,一种是加密的,一种是不加密码的,建议使用enable secret 设置密码) 2nplan(config)#enable password cisco //明文密码 2nplan(config)#enable secret cisco1 //加密密码 如果enable的两个密码同时设置,只是secret生效. 2nplan(config)#end 2nplan# 查看密码设置 2nplan#show run Building configuration... Current configuration: ! enable secret 5 $1$LNtZ$XFAQft5YyTsrXFVAXNp0Y/ //加密过的 enable password cisco //显示为明文, 容易被破解.不过可以手工加密,用命令service password-encryption 进行加密 2nplan(config)#service password-encryption 2nplan#show run Building configuration... Current configuration: ! enable secret 5 $1$LNtZ$XFAQft5YyTsrXFVAXNp0Y/ //加密过的 enable password 7 104D000A0618 //手工加密过的 任务 6.路由器,交换机密码的设置 B.设置交换机路由器的console 口密码 具体步骤 2nplan(config)#line console 0 2nplan(config-line)#login //启用密码 no login 是不启用密码 2nplan(config-line)#password cisco //设置的密码为cisco 2nplan(config-line)#end 配置后要输入console口密码cisco 才可以进入用户模式 注意:密码区分大小写 任务 6.路由器,交换机密码的设置 C.配置辅助端口(AUX)的用户密码 具体步骤 1、router(config)#line aux 0 进入辅助端口配置模式 2、router(config-line)#login 开启登陆密码保护 3、router(config-line)#password cisco 设置密码为cisco,密码区分大小写 注意:密码区分大小写 任务 6.路由器,交换机密码的设置 D.设置路由器交换机的vty 密码(也是就是远程登陆telnet的密码) 具体步骤 2nplan(config)#line vty 0 4 //04的意思是0到4,5个人可以同时登录 2nplan(config-line)#login //启用密码,no login 是不启用密码 2nplan(config-line)#password cisco //设置的密码为cisco 注意:密码区分大小写

测试网络的连通性:

telnet+IP address

任务 6.路由器,交换机密码的设置 E:删除enable ,console ,vty 密码 具体步骤 2nplan(config)#no enable password 2nplan(config)#no enable secret 2nplan(config)#line con 2nplan(config)#line console 0 2nplan(config-line)#no password 2nplan(config)#line vty 0 4 2nplan(config-line)#no password 2nplan(config-line)# 任务 具体步骤 7.路由器接口IP的设置 2nplan(config-if)# ip address 192.168.10.200 255.255.255.0 //设置接口ip地址192.168.10.200,子网掩码为255.255.255.0 2nplan(config-if)# no shutdown //启动接口 默认情况下路由器接口是关闭的,需要命令no shutdown开启,开启后关闭可以用shutdown关闭 2nplan (config-if)# shutdown 关闭接口

测试网络的连通性:

任务 具体步骤 8.查看路由器ios信息 2nplan#show version //查看软件版本信息 Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2005 by cisco Systems, Inc. Compiled Wed 27-Apr-04 19:01 by miwang Image text-base: 0x8000808C, data-base: 0x80A1FECC ROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1) Copyright (c) 2000 by cisco Systems, Inc. ROM: C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5) System returned to ROM by reload System image file is \"flash:c2600-i-mz.122-28.bin\" cisco 2620 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory . Processor board ID JAD05190MTZ (42921495) M860 processor: part number 0, mask 49 Bridging software. X.25 software, Version 3.0.0. 1 FastEthernet/IEEE 802.3 interface(s) 32K bytes of non-volatile configuration memory. 16384K bytes of processor board System flash (Read/Write) Configuration register is 0x2102 任务 9.查看路由器接口信息 具体步骤 2nplan#show interfaces //查看接口信息 FastEthernet0/0 is administratively down, line protocol is down (disabled) 默认情况下接口是关闭的 Hardware is Lance, address is 0009.7ca3.cb80 (bia 0009.7ca3.cb80) MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00, Last input 00:00:08, output 00:00:05, output hang never Last clearing of \"show interface\" counters never Queueing strategy: fifo Output queue :0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0 input packets with dribble condition detected 0 packets output, 0 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out 2nplan#

任务 10.查看路由器配置信息 具体步骤 2nplan#show running-config //查看路由器配置信息 Building configuration... Current configuration : 258 bytes ! version 12.2 no service password-encryption ! hostname 2nplan ! ! ip ssh version 1 ! ! interface FastEthernet0/0 no ip address duplex auto speed auto shutdown ! ip classless! ! ! ! banner motd ^Celcome ^C line con 0 line vty 0 4 login ! ! end 2nplan# 任务 具体步骤 11.保存路由器的配置 2nplan#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] 2nplan# 把当前运行的配置COPY到NVRAM(断电后不丢失)

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- efsc.cn 版权所有 赣ICP备2024042792号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务