第六章 案例二:配置路由器实现互通

1.实验环境

实验用具包括两台路由器(或交换机),一根双绞线缆,一台PC,一条Console 线缆。

2.需求描述

如图6.14 所示,将两台路由器的F0/0 接口相连,通过一台PC 连接设备的 Console 端口并配置P地址(192.168.1.0/24),实现设备之间的互通。

图6.14   实验案例二示意图 

验证设备互通成功后,保存设备的配置,并将配置文件备份到PC上。

3.推荐步骤

将两台路由器分别命名为 R1和 R2,并在路由器上配置P地址,分别为 192.168.1.1/24和192.168.1.2/24。
验证两台路由器的连通性,
保存配置。可通过“show star”命令确认配置信息已经存储成功
备份配置文档。将超级终端中显示的所有配置信息保存下来,粘贴到新建的文本文档中(可命名为 R1)

4.实验步骤

4.1 命名和配置IP地址

Router>enable
Router#conf t
Router(config)#hostname R1
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit

路由器R2同上步骤进行配置。

4.2  验证路由器之间的连通性

R1#ping 192.168.1.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!   //表示已连接,如果是“.....”表示连接失败
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

4.3  保存配置并查看

R1#write     //通过“write”命令保存信息
Building configuration...
[OK]
 
R1#show star    //通过“show star”查看保存的信息
Using 700 bytes
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
hostname R1
ip cef
no ipv6 cef
license udi pid CISCO2911/K9 sn FTX1524M052-
spanning-tree mode pvst
interface GigabitEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto

路由器R2同上步骤进行配置。

4.4 备份配置并命名为“R1”

 

R1#show star
Using 703 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
no ip cef
no ipv6 cef
!
!
license udi pid CISCO2911/K9 sn FTX15249X28-
!
!
!
spanning-tree mode pvst
!
!
!
interface GigabitEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface GigabitEthernet0/2
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

至此试验结束。

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-04-20 15:14:04       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-20 15:14:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-20 15:14:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-20 15:14:04       18 阅读

热门阅读

  1. STM32总结

    2024-04-20 15:14:04       12 阅读
  2. loadash常用的函数方法

    2024-04-20 15:14:04       19 阅读
  3. 使用scikit-learn中的SVC类实现垃圾邮件分类

    2024-04-20 15:14:04       16 阅读
  4. C#面向对象——封装、封装案例示例

    2024-04-20 15:14:04       19 阅读
  5. sklearn【F1 Scoree】F1分数原理及实战代码!

    2024-04-20 15:14:04       15 阅读
  6. rpc简介

    2024-04-20 15:14:04       17 阅读
  7. Nginx基础(04)

    2024-04-20 15:14:04       13 阅读
  8. 数据仓库元数据管理

    2024-04-20 15:14:04       14 阅读