Re: RIPv2 summany and more specific routes

From: Pavel Bykov (slidersv@gmail.com)
Date: Tue Mar 24 2009 - 21:14:32 ART


Dale, forgot to wait for the flush timer, huh?

But that could be an advantage. The solution to Mink's problem could be an
EEM script with KRON job, or if you don't need that much certainty, KRON
script itself would suffice

The ide is every 30 seconds to configure "ip summary-address rip" and then
deconfigure the command after 5 seconds. This will give enough time to
router to send out the route as a flash update, but it will

Check it out:

Topology:

R0 -- 10.0.0.0/24 -- R1 -- 3x loopbacks: 20.1.1.1/32, 20.2.2.2/32,
20.3.3.3/32

Solution:

----- Output from R0 -------
Initial routing table

R0#
R0#clear ip route *
R0#
R0#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static
route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
     20.0.0.0/32 is subnetted, 3 subnets
R 20.1.1.1 [120/1] via 10.0.0.2, 00:00:01, FastEthernet0/0
R 20.2.2.2 [120/1] via 10.0.0.2, 00:00:01, FastEthernet0/0
R 20.3.3.3 [120/1] via 10.0.0.2, 00:00:01, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0
R0#

----- Output from R1 -------
Now configuring the summary

R1(config)#int fa 0/0
R1(config-if)#ip summary-address rip 20.0.0.0 255.0.0.0

----- Output from R0 -------
R0 receives the summary 20.0.0.0/8 via flash and sends out flash.

*Mar 1 00:56:09.915: RIP: received v2 update from 10.0.0.2 on
FastEthernet0/0
*Mar 1 00:56:09.915: 20.0.0.0/8 via 0.0.0.0 in 1 hops
*Mar 1 00:56:09.915: RIP-DB: network_update with 20.0.0.0/8 succeeds
*Mar 1 00:56:09.919: RIP-DB: adding 20.0.0.0/8 (metric 1) via 10.0.0.2 on
FastEthernet0/0 to RIP database
*Mar 1 00:56:09.919: RIP-DB: add 20.0.0.0/8 (metric 1) via 10.0.0.2 on
FastEthernet0/0
*Mar 1 00:56:09.919: RIP-DB: Adding new rndb entry 20.0.0.0/8
*Mar 1 00:56:09.919: RIP-DB: adding 0.0.0.0/0 (metric 4294967295) via
0.0.0.0 on Null0 to RIP database
*Mar 1 00:56:09.923: RIP: Update contains 1 routes
*Mar 1 00:56:10.663: RIP: received v2 update from 10.0.0.2 on
FastEthernet0/0
*Mar 1 00:56:10.663: 20.0.0.0/8 via 0.0.0.0 in 1 hops
*Mar 1 00:56:10.663: RIP-DB: network_update with 20.0.0.0/8 succeeds
*Mar 1 00:56:10.663: RIP-DB: adding 20.0.0.0/8 (metric 1) via 10.0.0.2 on
FastEthernet0/0 to RIP database
*Mar 1 00:56:10.667: RIP: Update contains 1 routes
*Mar 1 00:56:11.919: RIP: sending v2 flash update to 224.0.0.9 via
Loopback0 (1.1.1.1)
*Mar 1 00:56:11.919: RIP: build flash update entries
*Mar 1 00:56:11.919: 20.0.0.0/8 via 0.0.0.0, metric 2, tag 0
*Mar 1 00:56:11.919: RIP: Update contains 1 routes
*Mar 1 00:56:11.923: RIP: Update queued
*Mar 1 00:56:11.923: RIP: sending v2 flash update to 224.0.0.9 via
FastEthernet0/0 (10.0.0.1)
*Mar 1 00:56:11.923: RIP: build flash update entries - suppressing null
update
*Mar 1 00:56:11.927: RIP: Update sent via Loopback0
*Mar 1 00:56:11.931: RIP: ignored v2 packet from 1.1.1.1 (sourced from one
of our addresses)
R0#

----- Output from R1 -------
Deconfiguring summary address back

R1(config)#int fa 0/0
R1(config-if)#no ip summary-address rip 20.0.0.0 255.0.0.0
R1(config-if)#

----- Output from R0 -------
We have all the info in the routing table that we need, R0 sends out all of
the routes, the summary and partial to the rest of the network. See the
routign table and the updates.

R0#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static
route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
     20.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
R 20.0.0.0/8 [120/1] via 10.0.0.2, 00:00:09, FastEthernet0/0
R 20.1.1.1/32 [120/1] via 10.0.0.2, 00:00:39, FastEthernet0/0
R 20.2.2.2/32 [120/1] via 10.0.0.2, 00:00:39, FastEthernet0/0
R 20.3.3.3/32 [120/1] via 10.0.0.2, 00:00:39, FastEthernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0R0#
*Mar 1 00:56:31.919: RIP: sending v2 update to 224.0.0.9 via Loopback0
(1.1.1.1)
*Mar 1 00:56:31.919: RIP: build update entries
*Mar 1 00:56:31.919: 10.0.0.0/24 via 0.0.0.0, metric 1, tag 0
*Mar 1 00:56:31.919: 20.0.0.0/8 via 0.0.0.0, metric 2, tag 0
*Mar 1 00:56:31.923: 20.1.1.1/32 via 0.0.0.0, metric 2, tag 0
*Mar 1 00:56:31.923: 20.2.2.2/32 via 0.0.0.0, metric 2, tag 0
*Mar 1 00:56:31.923: 20.3.3.3/32 via 0.0.0.0, metric 2, tag 0
*Mar 1 00:56:31.923: RIP: Update contains 5 routes
*Mar 1 00:56:31.927: RIP: Update queued
*Mar 1 00:56:31.927: RIP: Update sent via Loopback0
*Mar 1 00:56:31.931: RIP: ignored v2 packet from 1.1.1.1 (sourced from one
of our addresses)
*Mar 1 00:56:33.899: RIP: sending v2 update to 224.0.0.9 via
FastEthernet0/0 (10.0.0.1)
*Mar 1 00:56:33.899: RIP: build update entries
*Mar 1 00:56:33.899: 1.1.1.1/32 via 0.0.0.0, metric 1, tag 0
*Mar 1 00:56:33.903: RIP: Update contains 1 routes
*Mar 1 00:56:33.903: RIP: Update queued
*Mar 1 00:56:33.903: RIP: Update sent via FastEthernet0/0
*Mar 1 00:56:37.567: RIP: received v2 update from 10.0.0.2 on
FastEthernet0/0
*Mar 1 00:56:37.567: 20.1.1.1/32 via 0.0.0.0 in 1 hops
*Mar 1 00:56:37.571: RIP-DB: network_update with 20.1.1.1/32 succeeds
*Mar 1 00:56:37.571: RIP-DB: adding 20.1.1.1/32 (metric 1) via 10.0.0.2 on
FastEthernet0/0 to RIP database
*Mar 1 00:56:37.571: 20.2.2.2/32 via 0.0.0.0 in 1 hops
*Mar 1 00:56:37.571: RIP-DB: network_update with 20.2.2.2/32 succeeds
*Mar 1 00:56:37.575: RIP-DB: adding 20.2.2.2/32 (metric 1) via 10.0.0.2 on
FastEthernet0/0 to RIP database
*Mar 1 00:56:37.575: 20.3.3.3/32 via 0.0.0.0 in 1 hops
*Mar 1 00:56:37.575: RIP-DB: network_update with 20.3.3.3/32 succeeds
*Mar 1 00:56:37.575: RIP-DB: adding 20.3.3.3/32 (metric 1) via 10.0.0.2 on
FastEthernet0/0 to RIP database
*Mar 1 00:56:37.579: RIP: Update contains 3 routes
R0#

See? :)
So we are using the slow response of the RIP to fill the functionality gap.
Implementation:
Kron Job, start at "t": every 30 seconds execute "ip summary-address"
command on Fa0/0
Kron Job, start at "t+5": every 30 seconds execute "no ip summary-address"
command on Fa0/0

EEM script I mentioned could watch routing table on R0 from R1 via RCMD and
when the summary route is present, execute the "no ip summary-address"
command. When the route IS NOT present OR is present by the timeout IS MORE
THAN 00:00:25 (25 seconds), then EEM would execute "ip summary-address"
command on Fa0/0, refreshing the summary.

That's it.

On Fri, Mar 20, 2009 at 9:50 AM, Dale Shaw <dale.shaw@gmail.com> wrote:

> D'oh! Scrap that. I spoke too soon. It worked for a moment, I promise:
>
> 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
> R 10.3.1.0/24 [120/1] via 172.16.0.2, 00:00:05, FastEthernet0/0
> R 10.2.1.0/24 [120/1] via 172.16.0.2, 00:00:10, FastEthernet0/0
> R 10.1.1.0/24 [120/1] via 172.16.0.2, 00:00:15, FastEthernet0/0
> R 10.0.0.0/14 [120/1] via 172.16.0.2, 00:00:22, FastEthernet0/0
> R 10.0.1.0/24 [120/1] via 172.16.0.2, 00:00:21, FastEthernet0/0
>
> Back to the ol' drawing board.
>
> On Fri, Mar 20, 2009 at 7:48 PM, Dale Shaw <dale.shaw@gmail.com> wrote:
> > OK, how about this?
> >
> > interface FastEthernet0/0
> > ip address 172.16.0.2 255.255.255.0
> > ip summary-address rip 10.0.0.0 255.252.0.0
> > ip summary-address rip 10.0.1.0 255.255.255.0
> > ip summary-address rip 10.1.1.0 255.255.255.0
> > ip summary-address rip 10.2.1.0 255.255.255.0
> > ip summary-address rip 10.3.1.0 255.255.255.0
> >
> > cheers,
> > Dale
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>

-- 
Pavel Bykov
----------------
Don't forget to help stopping the braindumps, use of which reduces value of
your certifications. Sign the petition at http://www.stopbraindumps.com/

Blogs and organic groups at http://www.ccie.net



This archive was generated by hypermail 2.1.4 : Mon Apr 06 2009 - 06:44:07 ART