Erik Reid wrote: > Quoth j-schwerer@xxxxxxx: > >>- "Milestones" (CVS doc) >> >>About the IPv4 checksum + routing milestone: I'd really appreciate if routing >>were implemented through a module mechanism, just like protocols, so it would >>make it possible to support RIP of course, but also at a later time some other >>mechanisms (OSPF and some Cisco-like i-BGP flavours come to mind). >> > > I think routing and routing protocols are a totally separate issue.. As long > as the ipv4 module supports a routing table and has a small exportable api > to add/delete routes, it doesn't really need to be separate. This portion > of 'routing' is just to decide where to send the packet, doesn't need to > include support for any sort of announcements. Exactly... IPv4 or v6 are network layer protocols, their responsibility is to route encapsulated packets. The decision on the next hop is made on this layer. General format is smt. like this: destination next hop outgoing interface 0.0.0.0/0.0.0.0 1.2.3.4 eth0 1.2.4.0/255.255.255.0 1.2.3.5 eth0 1.2.3.4/255.255.255.255 - eth0 1.2.3.5/255.255.255.255 - eth0 Also taking into account that IPv4, v6, IPX have different address format (and size) we cannot reuse data structures used to support host routing table for different stacks (algorithms should be the same though). What routing protocols do is they propagate the information about reachability of networks (RIP) or state of the links (OSPF) or mixture of both (EIGRP). Typical RIPv2 update will contain smt. (without going into much details) like this: network subnet mask number of hops to reach 1.2.2.0 255.255.255.0 2 1.2.1.0 255.255.255.0 1 1.2.3.128 255.255.255.128 5 Host routing table is built using this information, and it is this table that is used by network-layer protocols. Cheers, Dmitri