实验一 使用 IOS CLI 配置基本路由器设置 |
您所在的位置:网站首页 › 远程设置路由器实验 › 实验一 使用 IOS CLI 配置基本路由器设置 |
一、拓扑
二、地址分配表
设备 接口 IP 地址 子网掩码 默认网关 R1 G0/0 192.168.0.1 255.255.255.0 不适用 G0/1 192.168.1.1 255.255.255.0 不适用 PC-A NIC 192.168.1.3 255.255.255.0 192.168.1.1 PC-B NIC 192.168.0.3 255.255.255.0 192.168.0.1 三、目标 第 1 部分:设置拓扑并初始化设备连接设备,以匹配网络拓扑。 初始化并重启路由器和交换机。 第2部分:配置设备并验证连接为 PC 接口分配静态 IPv4 信息。 配置基本路由器设置。 检验网络连接。 为 SSH 配置路由器。 第 3 部分:显示路由器信息检索路由器的硬件和软件信息。 解释启动配置的输出。 解释路由表的输出。 验证接口的状态。 第 4 部分:配置 IPv6 并验证连接 四、配置过程 第 1 部分:设置拓扑并初始化设备(略) 步骤一: 建立如拓扑图所示的网络。 步骤二:初始化并重新加载路由器和交换机。(这里做不做的无所谓) 第 2 部分:配置设备并验证连接 步骤一:配置PC的IP地址、掩码和默认网关(略)1' 在 PC-A 上配置 IP 地址、子网掩码和默认网关设置。 2' 在 PC-B 上配置 IP 地址、子网掩码和默认网关设置。 步骤二:配置路由器1' 禁用DNS查找并配置特权密码 Router> enable //进入特权模式 Router# Router# config terminal //进入全局配置模式 Router(config)# Router(config)# hostname R1 //重命名为R1 R1(config)# no ip domain-lookup //禁用DNS查找(因为该实验没有用到DNS) R1(config)# security passwords min-length 10 //设置密码最短长度 R1(config)# enable secret cisco12345 //分配 cisco12345 作为特权执行加密密码。2' 配置控制台密码并设置超时时间、添加 logging synchronous 命令。 R1(config)# line con 0 R1(config-line)# password ciscoconpass R1(config-line)# exec-timeout 5 0 R1(config-line)# logging synchronous R1(config-line)# exit R1(config)#3’ 配置Vty密码,设置超时时间,启用登录并添加 logging synchronous 命令。 R1(config)# line vty 0 4 R1(config-line)# password ciscovtypass R1(config-line)# exec-timeout 5 0 R1(config-line)# login R1(config-line)# logging synchronous R1(config-line)# exit R1(config)#4’ 加密明文密码并创建警告标语 R1(config)# service password-encryption R1(config)# banner motd #Unauthorized access prohibited!#5' 配置 IP 地址和接口描述并开启端口。 R1(config)# int g0/0 R1(config-if)# description Connection to PC-B R1(config-if)# ip address 192.168.0.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# int g0/1 R1(config-if)# description Connection to S1 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# exit R1#6' 在路由器上设置闹钟 R1# clock set 17:00:00 18 Feb 20137' 将运行配置保存到启动配置文件中 R1# copy running-config startup-config Destination filename [startup-config]? //这里直接回车!!!别输东西!!! Building configuration... [OK] R1# 步骤三:检验网络连接1' PC-A ping PC-B 在PC-A的命令提示符中输入以下命令,能够通信即可。 ping XXX.XXX.XXX.XXX(X为PC-B的IP地址)2' 使用PC-A 远程控制R1 在PC-A的命令提示符中输入以下命令,并可以成功登录即可 备注:② 指输入vty登录密码:ciscovtypass; ③ 指输入特权用户密码:cisco12345 步骤四:配置SSH该步骤6.0和6.2版本的模拟器不支持,我用的8.0版本是可以的,其他版本不确定,配置命令如下: 1’ 在路由器上配置SSH R1# configure terminal R1(config)# ip domain-name CCNA-lab.com R1(config)# username admin privilege 15 secret adminpass1 R1(config)# line vty 0 4 R1(config-line)# transport input ssh R1(config-line)# login local R1(config-line)# exit R1(config)# crypto key generate rsa general-keys modulus 1024 R1(config)# exit2' 在PC-A上进行登录操作 用户名密码为admin和adminpass1 第 3 部分:显示路由器信息以下为常用的显示路由器信息的指令,直接写出了 show version 检索重要的硬件和软件信息 show version 显示启动配置 show ip route 查看路由器上的路由表 show ip interface brief 在路由器上显示接口汇总列表 第 4 部分:配置 IPv6 并验证连接 步骤一:配置G0/0的IPv6的单播地址和本地链路地址,并启用IPv6路由 R1# configure terminal R1(config)# interface g0/0 R1(config-if)# ipv6 address 2001:db8:acad:a::1/64 //配置单播地址 R1(config-if)# ipv6 address fe80::1 link-local //配置本地链路地址 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# ipv6 unicast-routing R1(config)# exit备注:本地链路地址和单播地址的作用可以看我之前关于IPv6的文章R&S,数通HCIE|IPv6协议(一)。 步骤二:验证 R1 中的 IPv6 设置 步骤三:在 PC-B 中查看 IPv6 配置PS:PKT文件的配置部分到这里就结束了,里面的问题就进行忽略了,有疑问可以发私信。 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |