I can't tell you why source routing is not working properly, but I can tell you that you don't need it. Just put the 1.1.1.1/0x02 route in the main table, and your routing should work properly (at least, if there is nothing bizarre in the main routing table). Theodor Milkov wrote: > Hello, > > I recently upgraded one of our routers with 2.4.17 Linux kernel and > unfortunately my policy routing that used to work with 2.2.20 kernel > failed. Quick test: > > # uname -r > 2.2.20 > > # ip rule ls > 0: from all lookup local > 32765: from all to 1.1.1.1 tos 0x02 lookup 199 > 32766: from all lookup main > 32767: from all lookup 253 > > # ip route ls table 199 > 1.1.1.1 via 10.0.0.2 dev eth1 > > # ip route get to 1.1.1.1 tos 0x02 > 1.1.1.1 tos 0x02 via 10.0.0.2 dev eth1 src 10.0.0.1 > cache mtu 1500 rtt 375ms > > # ip route get to 1.1.1.1 tos 0x08 > 1.1.1.1 tos 0x08 via 192.168.0.1 dev eth0 src 192.168.0.2 > cache mtu 1500 rtt 375ms > > In this example everything seems ok - 192.168.0.1 is default gw. Lets > see the next example: > > # uname -r > 2.4.17 > > # ip ru ls > 0: from all lookup local > 32765: from all to 1.1.1.1 tos 0x02 lookup 199 > 32766: from all lookup main > 32767: from all lookup 253 > > # ip route ls table 199 > 1.1.1.1 via 10.0.0.2 dev eth2 > > # ip route get to 1.1.1.1 tos 0x02 > RTNETLINK answers: Network is unreachable > # ip route get to 1.1.1.1 tos 0x08 > RTNETLINK answers: Network is unreachable > > So, in this example the 'ip rule' is ignored and thus lookup to table > 199 never happens. Both kernels where compiled with > 'CONFIG_IP_ROUTE_TOS=y'. iproute packages are iproute2-ss001007 for > linux-2.2 kernel and iproute2-ss010824 for linux-2.4. What could be wrong? > > Best regards, > -- Casey Carter Casey@Carter.net ccarter@uiuc.edu AIM: cartec69 - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html