Policy routing work in 2.2 but not in 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,

-- 
      Theodor Milkov           Administrator IP Networks
      Davidov Net              Phone: +359 (2) 730158
      PGP: http://www.zimage.delbg.com/zimage.asc


-
: 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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux