programming RIP2

This is a discussion on programming RIP2 within the Networking/Device Communication forums, part of the General Programming Boards category; Hi everyone... I am programming RIP2 router for a college project (no way!!!) We dont have to programm the routing ...

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    8

    programming RIP2

    Hi everyone...

    I am programming RIP2 router for a college project (no way!!!)

    We dont have to programm the routing protocol, we let the kernel to route packets, but... we must keep the kernel's table updated, exchanging route tables with other RIP2 routers...

    I have some doubts....

    1. does RIP2 (not in rip1 compatible mode) accept host addresses in it s routes table?... or it just keep network addresses?

    2. RIP2 protocol says that each route has a timer running, and when any route's timer goes out it starts a new timer (garbage collector's) so, when this other timers runs off, the route is deleted from the table..... As my case... if kernel routes packages, how could i know which decision did the kernel take? so, i can find that route's timer and restart it....

    What i thought was to catch the incoming trafic, check the IPv4's packets and get the destination requested... then find the route who matches this destination address and then restart its timer, the rest of the routing method is done by the kernel...
    It sounds cool, but.... I can have something like this:

    in the routes table:

    destination mask gateway
    192.168.3.0 24 192.168.3.1
    192.168.3.0 28 192.168.3.1

    as you can read, it has two similar routes, but they differ in the mask... if i get a destination address request "192.168.3.2" from the IPv4's packet i catched, i dont know its mask (IPv4 header doesn't have it) so, i must search for a matching route for that destination address at the kernel's table... and restart its timer...

    In this case, which route should I restart?, both? if i must retart both timers... of course one of them was not the right route the kernel chose for that destination, so i'll update both's timers and one of them should't be updated... so if that route had to be deleted and i restarted its timer, it won't.... is that a problem to be saved from dead when it must not be saved?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,340
    Have you read the RFC's which describe this protocol?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Quote Originally Posted by Salem
    Have you read the RFC's which describe this protocol?
    Salem, don't be mean
    Don't send him directly to the RFC, we don't want him to hang himself

    I suggest you read something a little more simple, goto Google and try to find a short and simple document to close your theoretical doubts, and once you know what you need to do, you really should read the RFC to implement the protocol right! Don't be another AVAYA


    Good luck.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    Quote Originally Posted by jpablo
    1. does RIP2 (not in rip1 compatible mode) accept host addresses in it s routes table?... or it just keep network addresses?
    What i know from my CCNA course, the only thing that is being kept inside the routing tables are the updates sent by adjacent routers on the network ... therefore ther will not be any host addres in the routing table.
    Most routers just have a seperate table where they can store the hostnames.

    On any cisco router it is

    Router>enable
    Router#config terminal
    Router(config)#ip host Amsterdam 17.25.16.0
    Router(config)#exit
    Router#show hosts


    This wil store the Hostname Amsterdam in the host table with the associated ip. the command show hosts will then show all the entries in the host table.

    If you are really not sure about this , get a simulator like Boson ... configure the routers turn on debug ip rip and watch what happens with all the traffic as well as the routing tables ...

    As for your question about what timer that should be updated in that specific case I would first look into how RIP2 really works ( dont have my ccna book here with me I would've looked it up otherwise ) , because since RIP2 supports classless routing there has to be a way to determine what route to chose... else there would be a huge overhead ....

  5. #5
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    "adjacent" it's such a wrong word for RIP, for OSPF yes, but not RIP.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  6. #6
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,109
    Reread what i said , updates that a router receives are always from adjacent routers.

    *(1)--*(2)--*(3)
    |
    *(4)


    This lame ascii shows what i mean, router 1 sends updates, they are seen by router 2 and 4 ... router 3 gets an update from router 2 not from router 1.

    Why do you else think that convergence time of a network depends on the interval of the routing updates....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming RIP2 with kernel routes table
    By jpablo in forum Linux Programming
    Replies: 1
    Last Post: 04-22-2006, 11:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21