24 nov. 2011

RIP Unicast

Enable RIP on the segment composed of r1, r2, r3 and r4.
r3 and r4 must not receive updates exchanged between r1 and r2.
On r1 and r2, configure the neighbor and configure passive interface.
Note that this will not prevent r1 and r2 from receiving multicast updates from r3 nor r4.
r3 and r4 will not receive updates from r1 nor r2.

On r3 and r4:
!
router rip
 version 2
 redistribute connected
 network 10.0.0.0
 no auto-summary
!

On r1:
!
router rip
 version 2
 redistribute connected
 passive-interface FastEthernet0/0
 network 10.0.0.0
 neighbor 10.0.0.2
 no auto-summary
!

On r2:
!
router rip
 version 2
 redistribute connected
 passive-interface FastEthernet0/0
 network 10.0.0.0
 neighbor 10.0.0.1
 no auto-summary
!



r1 and r2 have all the routes:
r1#show ip route rip 
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/1] via 10.0.0.2, 00:00:10, FastEthernet0/0

     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/1] via 10.0.0.3, 00:00:13, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.0.0.4, 00:00:06, FastEthernet0/0
R       200.0.0.0 [120/1] via 10.0.0.2, 00:00:10, FastEthernet0/0

r2#show ip route rip
     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 10.0.0.1, 00:00:22, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/1] via 10.0.0.3, 00:00:02, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.0.0.4, 00:00:24, FastEthernet0/0

But r3 and r4 exchange routes together:
r3#show ip route rip
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.0.0.4, 00:00:02, FastEthernet0/0

r4#sh ip route rip
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/1] via 10.0.0.3, 00:00:14, FastEthernet0/0

To allow r3 and r4 to also receive updates for 1.1.1.1/32, 2.2.2.2/32, configure these routers as neighbor on r1, then disable split-horizon on r1.
Being configured as passive, r1 will  not send multicast updates to r3 and r4. Configuring them as neighbors solves this issue. But if we do not want r3 and r4 to receive updates directly from r2, they have to be advertised by r1, but the split-horizin rule applies here, so disabling split-horizon on r1 will allow this router to announce r2's routes back.

On r1:
!
router rip
 version 2
 redistribute connected
 passive-interface FastEthernet0/0
 network 10.0.0.0
 neighbor 10.0.0.4
 neighbor 10.0.0.3
 neighbor 10.0.0.2
 no auto-summary

!
interface FastEthernet0/0
 ip address 10.0.0.1 255.255.255.0
 no ip split-horizon
 duplex auto
 speed auto
!

r3 and r4 have routes from r2, advertised by r1:

r3#sh ip route rip
     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 10.0.0.1, 00:00:11, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/2] via 10.0.0.2, 00:00:11, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.0.0.4, 00:00:04, FastEthernet0/0
R       200.0.0.0 [120/1] via 10.0.0.2, 00:00:10, FastEthernet0/0

Note that the next-hop is r2, not r1.

Now, let's say that r2 also advertises 200.0.0.0/16, but that this prefix should only be received by r1.
With the configuration above, simply add a distribute-list with an acl/pfx-list that denies 200.0.0.0/16.

On r1:
!
router rip
 version 2
 redistribute connected
 passive-interface FastEthernet0/0
 network 10.0.0.0
 neighbor 10.0.0.4
 neighbor 10.0.0.3
 neighbor 10.0.0.2
 distribute-list 1 out
 no auto-summary
!
access-list 1 deny   200.0.0.0 0.0.255.255
access-list 1 permit any
!

r3 and r4 do not receive 200.0.0.0/16:
r3#show ip route rip 
     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 10.0.0.1, 00:00:15, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/2] via 10.0.0.2, 00:00:15, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.0.0.4, 00:00:06, FastEthernet0/0




Lab question:
Enable RIPv2 on the segment composed of r1, r2, r3 and r4.
r3 and r4 must not receive updates exchanged between r1 and r2. r3 and r4 must be able to reach 2.2.2.2/32 but not 200.0.0.0/16.


















NTP - ACL

NTP - Network Time Protocol Packet types: -  Control messages : don't bother with this. -  NTP request/update messages: used for time sy...