in reply to OSPF Protocol

I don't know of an OSPF module, and if there was one in circulation suitable for use I would expect it to be at CPAN.

It would be an intriguing project to develop though. A good starting point would be Net::BGP, especially the use of an event loop and callbacks on receipt of relevant packets. That would cover the need for code to be constantly on the lookout for hellos and LSAs.

You don't state what you are looking for an OSPF module to do: simply monitoring and parsing OSPF packets shouldn't be too horrible to implement. Writing a module to act as a DR/BDR could be rather tricker.

VGhpcyBtZXNzYWdlIGludGVudGlvbmFsbHkgcG9pbnRsZXNz

Replies are listed 'Best First'.
Re^2: OSPF Protocol
by mosh (Scribe) on Mar 03, 2005 at 12:20 UTC
    I need a module that knows how to build/parse OSPF packets, for a beginning.

    Does BGP and OSPF are similar protocols ?

      OSPF and BGP are very different. The reason I suggested Net::BGP as a starting point is that it implements event driven code based on receipt of routing packets.

      This is a bit off topic, so I won't go into too much detail, but OSPF is a multicast connectionless protocol - route updates are sent to a multicast address (224.0.0.5). BGP is connection oriented - routers are configured with relationships to each other, and unicast updates over TCP. When I was first learning both OSPF and BGP I wrote some brief notes on each, which you can see here. (I make no warranty as to their accuracy).

      For your purposes I would suggest starting by sniffing some OSPF LSAs from the wire, using tcpdump/ethereal/some other packet sniffer listening to 224.0.0.5, and (referring to the OSPF rfcs where necessary) writing some code to parse and interpret them.

      VGhpcyBtZXNzYWdlIGludGVudGlvbmFsbHkgcG9pbnRsZXNz

      No they aren't the same protocol I'm afraid. It looks like you are going to be starting with Net::RawIP and a copy of RFC 2328 :-s Good Luck!

      /J\