Tuesday, December 13, 2011

RIP BASICS + LAB on VERSION 1 & 2 + AUTO SUMMARY

RIP OVERVIEW

  • It is a distant vector IGP-
  • uses split horizon,poison reverse,count to infinity
  • split horizon does not send info back to source split horizon with poison reverse sends the metric back to the source but with the metric set to infinity
  • split horizon is enabled by default on all interfaces apart from frame-relay multipoint interfaces
  • Count to infinity rip has a infinity of 16 hops
  • Full routing table updates to it neighbor
  • Use udp 520
  • V1 use broadcast to 255.255.255.255 as the destination and v2 use multicast to 224.0.0.9
  • It default admin distance is 120
  • Ripv1 is classfull and does not send subnet mask in update when it recieves an update it presume the mask of the interface it was recieved on
  • Ripv2 is classless it sends subnet mask in updates
  • default send version is 1
  • default recieve version is 1 and 2
  • updates are sent every 30 seconds
  • hold down time is 180 ( it will not accept updates with lower metric about the route during holddown
  • flush time is 240 if no update is recieved in 240 secs it is flushed
  • maximum paths is 4
  • auto summary is enabled so it auto summaries when over different major network boundary
  • admin distance can be changed on per neighbor basis
RIPV1 Packet Format


Ok so we have 4 byte header with RIP command  being used to signify either reply or request for routes  and we have the rip versions

Next section of the ripv1 packet the RIP body is for advertising the routes. There can be up to 25 of these in the RIP body Address family ipv4 you got your  destination address that you are advertising and you metric. So you can 25 destinations per rip packet.

RIPV2 Packet



So ripv2 adds a few options in it packet. The routing domain will allow multiple rip process on single router

Authentication A simple authentication mechanism has been set into place with RIP version 2. If the first 2 bytes of the message (after the header) has an address family field with the value 0xffff and the route tag field has a value of 2 then the remaining 16 bytes of that route entry contain a cleartext password





Route Tag This field is simply an attribute assigned to a route somehow indicating the source of the route. It is intended to provide a method of separating internal routes with routes obtained from external sources (some EGP).
Subnet Mask This field contains the subnet mask which is applied to the IP address.
Next Hop This field indicates the immediate next hop IP address to which messages specified by this route should be sent.

Commands

router rip
version 2
network 10.0.0.0
no auto summary

int fa0/1
ip rip send version 1 2
ip rip recieve version 1 2

sh ip rip database

sh ip protocols
   

Ok for the LAB i am going set up rip version 1 to start then put on version 2 i will also do loopback on each device in different network boundary then the subnets connecting to see the affect on the routing table.
 so sw1 connects to sw2,sw3,sw4
sw2 and sw3 connect to sw4



So the config
sw1
-----

Port-channel2          192.168.1.2     YES NVRAM  up                    up
Port-channel5          172.25.12.1     YES NVRAM  up                    up
Port-channel7          172.25.11.1     YES NVRAM  up                    up
Loopback0              1.1.1.1         YES manual up                    up
switch1#sh run | begin router rip
router rip
 version 1
 network 1.0.0.0
 network 172.25.0.0
 network 192.168.1.0
 no auto-summary
!


SW2
----

Port-channel2          192.168.1.1     YES NVRAM  up                    up
Port-channel8          172.25.10.1     YES manual up                    up
Loopback0              1.1.2.2         YES manual up                    up
switch2#config t
Enter configuration commands, one per line.  End with CNTL/Z.
switch2(config)#router rip
switch2(config-router)#network 1.0.0.0
switch2(config-router)#network 172.25.0.0
switch2(config-router)#network 192.168.1.0
switch2(config-router)#
SW3
-----
Port-channel5          172.25.12.2     YES manual up                    up
Port-channel9          172.25.6.1      YES manual up                    up
Loopback0              1.1.3.3         YES manual up                    up
switch3#config t
Enter configuration commands, one per line.  End with CNTL/Z.
switch3(config)#router rip
switch3(config-router)#network 1.0.0.0
switch3(config-router)#network 172.25.0.0
switch3(config-router)#

SW4
----


Port-channel5          172.25.11.2     YES manual up                    up
Port-channel8          172.25.6.2      YES manual up                    up
Port-channel9          172.25.10.2     YES NVRAM  up                    up
Loopback0              1.1.4.4         YES manual up                    up
switch4(config)#do sh run | begin router rip
router rip
 version 1
 network 1.0.0.0
 network 172.25.0.0
 no auto-summary

I look a bit more indept on s4

switch4#sh ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 19 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 1, receive version 1
    Interface                 Send  Recv  Triggered RIP  Key-chain
    Port-channel5             1     1
    Port-channel8             1     1
    Port-channel9             1     1
    Loopback0                 1     1
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    1.0.0.0
    172.25.0.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    172.25.6.1           120      00:00:11
    172.25.10.1          120      00:00:15
    Gateway         Distance      Last Update
    172.25.11.1          120      00:00:00
  Distance: (default is 120)

switch4#sh ip rip database
1.0.0.0/8    auto-summary
1.1.4.0/24    directly connected, Loopback0
172.25.0.0/16    auto-summary
172.25.6.0/24    directly connected, Port-channel8
172.25.10.0/24    directly connected, Port-channel9
172.25.11.0/24    directly connected, Port-channel5
172.25.12.0/24
    [1] via 172.25.6.1, 00:00:00, Port-channel8
    [1] via 172.25.11.1, 00:00:15, Port-channel5
192.168.1.0/24    auto-summary
192.168.1.0/24
    [1] via 172.25.11.1, 00:00:15, Port-channel5
    [1] via 172.25.10.1, 00:00:01, Port-channel9
switch4#

switch4#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/24 is subnetted, 1 subnets
C       1.1.4.0 is directly connected, Loopback0
     172.25.0.0/24 is subnetted, 4 subnets
C       172.25.6.0 is directly connected, Port-channel8
R       172.25.12.0 [120/1] via 172.25.11.1, 00:00:17, Port-channel5
                    [120/1] via 172.25.6.1, 00:00:03, Port-channel8
C       172.25.11.0 is directly connected, Port-channel5
C       172.25.10.0 is directly connected, Port-channel9
R    192.168.1.0/24 [120/1] via 172.25.11.1, 00:00:17, Port-channel5
                    [120/1] via 172.25.10.1, 00:00:03, Port-channel9
switch4#
ok so on switch 4 the first thing
i notice there is only the 1.1.4.0/24 network i am not seeing any of the loopbacks of sw 1,2,3
They are coming in 1.0.0.0 on the port channel interfaces which are /24 as they do not have a mask associated  as it is rip version 1 rip is putting the /24 mask following the mask of the connected interface. So it is overlapping with it lo0 interface.also which is /24
Also 172.25. subnetwork .12 are there this also because of the same reason as it came in on /24  it looked and the first 24 bits and added to the route table
172.25.12.0


I will put on verison2 on all routers which should send the subnet mask i will also put on auto summary on all just to see the results
router rip
version 2
auto-su

switch4#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/8 is variably subnetted, 2 subnets, 2 masks
R       1.0.0.0/8 [120/1] via 172.25.11.1, 00:00:24, Port-channel5
                  [120/1] via 172.25.10.1, 00:00:18, Port-channel9
                  [120/1] via 172.25.6.1, 00:00:11, Port-channel8
C       1.1.4.0/24 is directly connected, Loopback0
     172.25.0.0/16 is variably subnetted, 5 subnets, 2 masks
C       172.25.6.0/24 is directly connected, Port-channel8
R       172.25.0.0/16 [120/2] via 172.25.11.1, 00:00:24, Port-channel5
                      [120/2] via 172.25.10.1, 00:00:18, Port-channel9
R       172.25.12.0/24 [120/1] via 172.25.11.1, 00:00:25, Port-channel5
                       [120/1] via 172.25.6.1, 00:00:12, Port-channel8
C       172.25.11.0/24 is directly connected, Port-channel5
C       172.25.10.0/24 is directly connected, Port-channel9
R    192.168.1.0/24 [120/1] via 172.25.11.1, 00:00:27, Port-channel5
                    [120/1] via 172.25.10.1, 00:00:21, Port-channel9
switch4#

Rip routers are now sending there lookbacks as /8 the subnet mask they are summarising as they need to cross major network boundaries to get to r4 so for r3 the network 1.1.3.3 it has to cross 172.25.6.0. This is the behaviour of auto summary. As they are been recieved with a mask they are now entered in the routing table.
loopback of 1.1.1.1 is still not pinging basically the router is sending out the traffic depending on it loadbalancing as there is 3 routes set some ping might be successiful if it goes dow po5 but if it does not the traffic is been blackholed


 OK i will take off auto summary with the no auto summary command under the router rip process

switch4#sh ip rout
00:59:13: %SYS-5-CONFIG_I: Configured from console by consolee
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/8 is variably subnetted, 3 subnets, 2 masks
R       1.1.1.0/29 [120/1] via 172.25.11.1, 00:00:14, Port-channel5
R       1.1.2.0/24 [120/2] via 172.25.11.1, 00:00:14, Port-channel5
C       1.1.4.0/24 is directly connected, Loopback0
     172.25.0.0/24 is subnetted, 4 subnets
C       172.25.6.0 is directly connected, Port-channel8
R       172.25.12.0 [120/1] via 172.25.11.1, 00:00:14, Port-channel5
                    [120/1] via 172.25.6.1, 00:00:44, Port-channel8
C       172.25.11.0 is directly connected, Port-channel5
C       172.25.10.0 is directly connected, Port-channel9
R    192.168.1.0/24 [120/1] via 172.25.11.1, 00:00:15, Port-channel5
                    [120/1] via 172.25.10.1, 00:00:51, Port-channel9
switch4#
now i see all subnets + all subnets ping finew

No comments:

Post a Comment