(usagi-users 03489) IPV6 Multipath in AODV
YongHan Lee <[email protected]>
| Newsgroups | gmane.linux.ipv6.usagi.users |
|---|---|
| Message-ID | <[email protected]> |
I am a student and do a semester project in networking. My subject is "ipv6 multipath AODV routing implementation". To achieve my goal I would like to find a way to pick a desired route entry from several route entries to one and same destination (but each route entry has different next hop). The criteria to pick a route entry is not destination address and not pick-top-entry anymore, but destination address and next hop address. For example: Kernel IPv6 routing table Destination Next Hop F M R Use Iface fec0::10/128 fec0::1 U 0 4 1 eth1 fec0::10/128 fec0::2 U 0 4 1 eth1 fec0::10/128 fec0::3 U 0 4 1 eth1 fec0::10/128 fec0::6 U 0 4 1 eth1 fec0::10/128 fec0::9 U 0 4 1 eth1 fec0::10/128 fec0::7 U 0 4 1 eth1 When I do an ssh connection to fec0::10, I want to take the route with next hop fec0::3, but for a http connection to fec0::10 I want to take route with next hop fec0::7. Decision is done by application in userspace. I thought to write a Kernel module for this, but since I do not know well the kernel architecture, especially the kernel ipv6 networking section, I do not know if and how it is possible. My first idea was to use netfilter for ipv6, but I could not add ipv6 routes to multiple routing tables with marks. > echo 220 mytable.out >> /etc/iproute2/rt_tables > ip -6 route add default via fec0::2/16 dev eth1 table mytable.out But for ipv4 it worked without any problems. (thread for this: https://lists.netfilter.org/pipermail/netfilter/2005-August/062252.html And now I try to write a Kernel module which should retrieve all route entries from the kernel routing table (in fib6_node, rt6_info or dst_entry struct), in order that when an IP packet will be send, the routing table in user space (is a seperate routing table with more parameters) evaluates which route to destination and send the IP packet with next hop information to my module. My module then compares the retrieved route entries with the destination address of the IP packet and the appended next hop information. When it has the desired route entry, it changes the destination (struct dst_entry) in the sk_buff structure of this IP packet and send out. This all should happen at POST ROUTING hook (after kernel's "route decision"). I have started to write my kernel module, but it was not able to retrieve route entries from the kernel routing table, because a lot of the functions are static. For example I wanted to write a function in my kernel module which gives me the route entry of the kernel routing table with the requested next hop (and not all entries). For this, it iterates the fib6_nodes from the root (like fib6_lookup(&ip6_routing_table, daddr, addr) [from ip6_fib.c]), but the kernel returns me: Sep 13 17:31:34 m66533pp kernel: kaodv: Unknown symbol fib6_lookup Sep 13 17:31:34 m66533pp kernel: kaodv: Unknown symbol ip6_routing_table even they are defined in kallsyms and I included the ip6_fib.h file. I would be very glad if you could give me some helps or advises (how it is possible or my idea is totally impossible). Some links to architecture of kernel routing table would be already a great help for me. I use kernel 2.6.8.1 and mandrake linux 10.0. __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com