RIP协议配置动态路由

 

 题目要求

 其中ar1 ar2 有两个回环接口
ar3有一个回环接口为3.3.3.0 /24
一共七个网段
子网掩码右移3位
分出八个网段
192.168.1.00000000 27 192.168.1.0   
192.168.1.00100000 27 192.168.1.32  AR1环回
192.168.1.01000000 27 192.168.1.64  AR1环回
192.168.1.01100000 27 192.168.1.96  AR2环回
192.168.1.10000000 27 192.168.1.128 AR2环回
192.168.1.10100000 27 192.168.1.160 AR1 AR2之间
192.168.1.11000000 27 192.168.1.192 AR2 AR3之间
192.168.1.11100000 27 192.168.1.224 
3.3.3.0 24 AR3环回

配置R1接口

[r1]int l1
[r1-LoopBack1]ip add 192.168.1.33 27
[r1-LoopBack1]int l2
[r1-LoopBack2]ip add 192.168.1.65 27
[r1-LoopBack2]q
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.161 27
May 11 2023 19:52:58-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]ip add 192.168.1.161 27

配置R2接口

[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.162 27
May 11 2023 19:53:51-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]int l1
[r2-LoopBack1]ip add 192.168.1.129 27
[r2-LoopBack1]quit
[r2]int l2
[r2-LoopBack2]ip add 192.168.1.97 27
[r2-GigabitEthernet0/0/1]ip add 192.168.1.193 27
May 11 2023 19:59:31-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 

配置R3接口

[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.194 27
May 11 2023 20:01:06-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]int l1
[r3-LoopBack1]ip add 3.3.3.3 24

开启rip

[r1]rip
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0

其他三个路由器基本一致  network声明只能声明主类网段(A B C 三类)

这里三个路由器的主类网段一致都为192.168.1.0 

看看配置后的r1路由表

Routing Tables: Public
         Destinations : 17       Routes : 17       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        3.3.3.0/24  RIP     100  2           D   192.168.1.162   GigabitEthernet
0/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.32/27  Direct  0    0           D   192.168.1.33    LoopBack1
   192.168.1.33/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.63/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.64/27  Direct  0    0           D   192.168.1.65    LoopBack2
   192.168.1.65/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.95/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.96/27  RIP     100  1           D   192.168.1.162   GigabitEthernet
0/0/0
  192.168.1.128/27  RIP     100  1           D   192.168.1.162   GigabitEthernet
0/0/0
  192.168.1.160/27  Direct  0    0           D   192.168.1.161   GigabitEthernet
0/0/0
  192.168.1.161/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.191/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.192/27  RIP     100  1           D   192.168.1.162   GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

配置汇总

在        R1 R2 的接口上配置汇总

在R2上配置

[r2]INT G0/0/0
[r2-GigabitEthernet0/0/0]RIP SUMMARY 	
[r2-GigabitEthernet0/0/0]RIP summary-address 192.168.1.0 255.255.255.0
[r2-GigabitEthernet0/0/0]INT G0/0/01
[r2-GigabitEthernet0/0/1]RIP SUMMARY-ADDRESS 192.168.1.0 255.255.255.0

查看R1路由表配置缺省

Routing Tables: Public
         Destinations : 15       Routes : 15       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        3.3.3.0/24  RIP     100  2           D   192.168.1.162   GigabitEthernet
0/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  1           D   192.168.1.162   GigabitEthernet
0/0/0
   192.168.1.32/27  Direct  0    0           D   192.168.1.33    LoopBack1
   192.168.1.33/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.63/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.64/27  Direct  0    0           D   192.168.1.65    LoopBack2
   192.168.1.65/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.95/32  Direct  0    0           D   127.0.0.1       LoopBack2
  192.168.1.160/27  Direct  0    0           D   192.168.1.161   GigabitEthernet
0/0/0
  192.168.1.161/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.191/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

为了安全性 配置认证

该命令在接口环境下使用

r2]int g0/0/0
[r2-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]rip authentication-mode md5 usual cipher 123456

加快收敛

[r3-GigabitEthernet0/0/0]rip
[r3-rip-1]tim	
[r3-rip-1]timers rip 15 90 150
[r3-rip-1]

配置缺省 

r3作为默认的缺省路由更新源

[r3-rip-1]default-route originate 

避免成环

[r1]ip route-static 192.168.1.0 24 null 0

如果两端的接口连接的是主机的话 可以设置静默接口 不会发送rip数据段

配置方法:[r3-rip-1]silent-interface 

配置后r1的路由表

Routing Tables: Public
         Destinations : 16       Routes : 16       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  2           D   192.168.1.162   GigabitEthernet
0/0/0
        3.3.3.0/24  RIP     100  2           D   192.168.1.162   GigabitEthernet
0/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  Static  60   0           D   0.0.0.0         NULL0
   192.168.1.32/27  Direct  0    0           D   192.168.1.33    LoopBack1
   192.168.1.33/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.63/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.64/27  Direct  0    0           D   192.168.1.65    LoopBack2
   192.168.1.65/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.95/32  Direct  0    0           D   127.0.0.1       LoopBack2
  192.168.1.160/27  Direct  0    0           D   192.168.1.161   GigabitEthernet
0/0/0
  192.168.1.161/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.191/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

r2

Routing Tables: Public
         Destinations : 19       Routes : 19       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  1           D   192.168.1.194   GigabitEthernet
0/0/1
        3.3.3.0/24  RIP     100  1           D   192.168.1.194   GigabitEthernet
0/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  Static  60   0           D   0.0.0.0         NULL0
   192.168.1.96/27  Direct  0    0           D   192.168.1.97    LoopBack2
   192.168.1.97/32  Direct  0    0           D   127.0.0.1       LoopBack2
  192.168.1.127/32  Direct  0    0           D   127.0.0.1       LoopBack2
  192.168.1.128/27  Direct  0    0           D   192.168.1.129   LoopBack1
  192.168.1.129/32  Direct  0    0           D   127.0.0.1       LoopBack1
  192.168.1.159/32  Direct  0    0           D   127.0.0.1       LoopBack1
  192.168.1.160/27  Direct  0    0           D   192.168.1.162   GigabitEthernet
0/0/0
  192.168.1.162/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.191/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.192/27  Direct  0    0           D   192.168.1.193   GigabitEthernet
0/0/1
  192.168.1.193/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.223/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

r3

Routing Tables: Public
         Destinations : 11       Routes : 11       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        3.3.3.0/24  Direct  0    0           D   3.3.3.3         LoopBack1
        3.3.3.3/32  Direct  0    0           D   127.0.0.1       LoopBack1
      3.3.3.255/32  Direct  0    0           D   127.0.0.1       LoopBack1
      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   192.168.1.193   GigabitEthernet
0/0/0
  192.168.1.192/27  Direct  0    0           D   192.168.1.194   GigabitEthernet
0/0/0
  192.168.1.194/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.223/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值