欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

HUAWEI——动态路由(RIPv2)

程序员文章站 2024-03-21 08:59:16
...

实验名称:

动态路由(RIPv2)试验

实验拓扑:

HUAWEI——动态路由(RIPv2)

实验目的:

使用动态路由协议RIPv2使全网互通,PC1可以ping通PC2

实验步骤:

  1. 开启所有设备;
  2. 规划拓扑,划分网段(如拓扑图所示);
  3. 配置接口地址以及PC1和PC2的IP地址、子网掩码、网关;
  4. 进入AR1,运行RIP,版本2,关闭自动汇总,宣告直连网段192.168.1.0和12.0.0.0;
  5. 进入AR2,运行RIP,版本2,关闭自动汇总,宣告直连网段12.0.0.0和23.0.0.0;
  6. 进入AR3,运行RIP,版本2,关闭自动汇总,宣告直连网段192.168.2.0和23.0.0.0;
  7. 查看每个路由器的路由表
  8. 测试,打开PC1命令行,ping192.168.2.2;

实验命令:

AR1:

<Huawei>system-view 
[Huawei]sysname r2
[r2]int GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[r2-GigabitEthernet0/0/1]quit 

[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r2-GigabitEthernet0/0/0]quit 

[r2]rip 10
[r2-rip-10]version 2
[r2-rip-10]undo summary 
[r2-rip-10]network 192.168.1.0
[r2-rip-10]network 12.0.0.0
[r2-rip-10]quit 

AR2:

<Huawei>system-view 
[Huawei]sysname r2
[r2]int GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/1]ip address 12.1.1.2 24
[r2-GigabitEthernet0/0/1]quit 

[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/0]ip address 23.1.1.1 24
[r2-GigabitEthernet0/0/0]quit 

[r2]rip 10
[r2-rip-10]version 2
[r2-rip-10]undo summary 
[r2-rip-10]network 12.0.0.0
[r2-rip-10]network 23.0.0.0 
[r2-rip-10]quit 

AR3:

<Huawei>system-view 
[Huawei]sysname r2
[r2]int GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/1]ip address 23.1.1.2 24
[r2-GigabitEthernet0/0/1]quit 

[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[r2-GigabitEthernet0/0/0]quit 

[r2]rip 10
[r2-rip-10]version 2
[r2-rip-10]undo summary 
[r2-rip-10]network 192.168.2.0 
[r2-rip-10]network 23.0.0.0 
[r2-rip-10]quit 

实验验证:

R1路由器路由表:

[r1]display ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 12       Routes : 12       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/24  Direct  0    0           D   12.1.1.1        GigabitEthernet0/0/1
       12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1
     12.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1
       23.1.1.0/24  RIP     100  1           D   12.1.1.2        GigabitEthernet0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  Direct  0    0           D   192.168.1.1     GigabitEthernet0/0/0
    192.168.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
  192.168.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
    192.168.2.0/24  RIP     100  2           D   12.1.1.2        GigabitEthernet0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

R2路由器路由表:

[r2]display ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 12       Routes : 12       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/24  Direct  0    0           D   12.1.1.2        GigabitEthernet0/0/0
       12.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
     12.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
       23.1.1.0/24  Direct  0    0           D   23.1.1.1        GigabitEthernet0/0/1
       23.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1
     23.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  RIP     100  1           D   12.1.1.1        GigabitEthernet0/0/0
    192.168.2.0/24  RIP     100  1           D   23.1.1.2        GigabitEthernet0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

R3路由器路由表:

[r3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 12       Routes : 12       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/24  RIP     100  1           D   23.1.1.1        GigabitEthernet0/0/0
       23.1.1.0/24  Direct  0    0           D   23.1.1.2        GigabitEthernet0/0/0
       23.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
     23.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  RIP     100  2           D   23.1.1.1        GigabitEthernet0/0/0
    192.168.2.0/24  Direct  0    0           D   192.168.2.1     GigabitEthernet0/0/1
    192.168.2.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1
  192.168.2.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

测试:

配置PC1IP地址、子网掩码、网关

HUAWEI——动态路由(RIPv2)

配置PC2IP地址、子网掩码、网关

HUAWEI——动态路由(RIPv2)

使用pc1pingpc2

HUAWEI——动态路由(RIPv2)

相关标签: HUAWEI