计算机网络实验六-Router对两台支持三层路由功能的ISCOM交换机进行RIP的配置

Router 对两台支持三层路由功能的 ISCOM 交换机进行 RIP 的配置

一、实验目的

  • 掌握思科模拟器的使用方法
  • 掌握三层交换机 RIP 动态路由的配置方法

二、实验意义

通过在思科模拟器使用 RIP 动态路由使不同网段的计算机能相互通信

三、实验器材

  • 思科模拟器

四、实验拓扑

在这里插入图片描述

五、实验步骤及详细配置

  • 根据拓扑图所示,使用思科模拟器添加 2 台三层交换机以及 4 台 PC,交换机之间通过 F0/24 口相连,PC1、PC2 分别连接 SA 的VLAN6 端口和 VLAN7 端口,PC3、PC4 分别连接 SB 的 VLAN8和 VLAN9 端口,并根据拓扑图所示配置所有计算机的 IP 地址,子网掩码和网关

  • 配置命令如下:

    • 划分交换机的 vlan:

    • SA代码:

    • Switch>enable
      Switch#config
      Configuring from terminal, memory, or network [terminal]? 
      Enter configuration commands, one per line. End with CNTL/Z.
      Switch(config)#hostname SA
      SA(config)#ip routing
      SA(config)#int ra fa 0/1-8
      SA(config-if-range)#swit mode access
      SA(config-if-range)#Swit access vlan 6
      % Access VLAN does not exist. Creating vlan 6
      SA(config-if-range)#exit
      SA(config)#int ra fa 0/9-16
      SA(config-if-range)#swit mode access
      SA(config-if-range)#Swit access vlan 7
      % Access VLAN does not exist. Creating vlan 7
      SA(config-if-range)#exit
      SA(config)#int ra fa 0/24
      SA(config-if-range)#swit mode access
      SA(config-if-range)#Swit access vlan 100
      % Access VLAN does not exist. Creating vlan 100
      
    • SB 代码:

    • Switch>enable
      Switch#config
      Configuring from terminal, memory, or network [terminal]? 
      Enter configuration commands, one per line. End with CNTL/Z.
      Switch(config)#hostname SB
      SB(config)#ip routing
      SB(config)#int ra fa 0/1-8
      SB(config-if-range)#swit mode access
      SB(config-if-range)#Swit access vlan 8
      % Access VLAN does not exist. Creating vlan 8
      SB(config-if-range)#exit
      SB(config)#int ra fa 0/9-16
      SB(config-if-range)#swit mode access
      SB(config-if-range)#Swit access vlan 9
      % Access VLAN does not exist. Creating vlan 9
      SB(config-if-range)#exit
      SB(config)#int ra fa 0/24
      SB(config-if-range)#swit mode access
      SB(config-if-range)#Swit access vlan 100
      % Access VLAN does not exist. Creating vlan 100
      
    • 配置交换机各 vlan 虚拟口的 IP 地址:

    • SA 代码:

    • SA>enable
      SA#config
      Configuring from terminal, memory, or network [terminal]? 
      Enter configuration commands, one per line. End with CNTL/Z.
      SA(config)#int vlan 6
      %LINK-5-CHANGED: Interface Vlan6, changed state to up
      %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan6, changed state 
      to up
      SA(config-if)#ip address 172.16.6.1 255.255.255.0
      SA(config-if)#no shut
      SA(config-if)#exit
      SA(config)#int vlan 7
      %LINK-5-CHANGED: Interface Vlan7, changed state to up
      %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan7, changed state 
      to up
      SA(config-if)#ip address 172.16.7.1 255.255.255.0
      SA(config-if)#no shut
      SA(config-if)#exit
      SA(config)#int vlan 100
      %LINK-5-CHANGED: Interface Vlan100, changed state to up
      %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed 
      state to up
      SA(config-if)#ip address 172.16.100.1 255.255.255.0
      SA(config-if)#no shut
      
    • SB代码:

    • SB>enable
      SB#config
      Configuring from terminal, memory, or network [terminal]? 
      Enter configuration commands, one per line. End with CNTL/Z.
      SB(config)#int vlan 8
      %LINK-5-CHANGED: Interface Vlan8, changed state to up
      %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan8, changed state 
      to up
      SB(config-if)#ip address 172.16.8.1 255.255.255.0
      SB(config-if)#no shut 
      SB(config-if)#exit
      SB(config)#int vlan 9
      %LINK-5-CHANGED: Interface Vlan9, changed state to up
      %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan9, changed state 
      to up
      SB(config-if)#ip address 172.16.9.1 255.255.255.0
      SB(config-if)#no shut 
      SB(config-if)#exit
      SB(config)#int vlan 100
      %LINK-5-CHANGED: Interface Vlan100, changed state to up
      %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed 
      state to up
      SB(config-if)#ip address 172.16.100.2 255.255.255.0
      SB(config-if)#no shut
      SB(config-if)#exit
      
    • 启动 RIP 协议实现两个交换机之间的通信:

    • SA 代码:

    • SA>enable
      SA#config
      Configuring from terminal, memory, or network [terminal]? 
      Enter configuration commands, one per line. End with CNTL/Z.
      SA(config)#router rip
      SA(config-router)#version 2
      SA(config-router)#network 172.16.6.0
      SA(config-router)#network 172.16.7.0
      SA(config-router)#network 172.16.100.0
      
    • SB代码:

    • SB>enable
      SB#config
      Configuring from terminal, memory, or network [terminal]? 
      Enter configuration commands, one per line. End with CNTL/Z.
      SB(config)#router rip
      SB(config-router)#version 2
      SB(config-router)#network 172.16.8.0
      SB(config-router)#network 172.16.9.0
      SB(config-router)#network 172.16.100.0
      
    • 完成上述配置后,测试各 PC 之间的连通性

六、实验结果及截图

拓扑配置:
在这里插入图片描述

划分交换机的 vlan:

SA:
在这里插入图片描述

SB:
在这里插入图片描述

配置交换机各 vlan 虚拟口的 IP 地址:

SA:
在这里插入图片描述

SB:
在这里插入图片描述

启动 RIP 协议实现两个交换机之间的通信:

SA:
在这里插入图片描述

SB:
在这里插入图片描述

启动 RIP 协议之后各 PC 机之间的通信情况

PC1 与 SB 可以通信:
在这里插入图片描述

PC1 与 PC3 之间可以通信:
在这里插入图片描述

PC1 与 PC4 之间可以通信:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/kelxLZ/article/details/111240535