simpler version, How to bypass the local routing table?

Linux Advanced Routing and Traffic Control

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

 



imagine the folowing simpler configuration

Hub  | Linux
 +----- eth0 192.168.1.1/24
 |   |
 +----- eth1 192.168.1.2/24
     |

I would like that the packets of ping -I eth0 192.168.1.2, go on wire via the
eth0 interface to the hub, that the hub broadcast them to eth1, and the kernel
receive them from eth1 and process it and the send the ICMP replies back to the 
wire via eth1, and eth0 and ping recieve it.

For that the kernel HAS to NOT recognize the dest ip (192.168.1.2) as local,
when packets comes from processes, so that the packet will be sent over the
interface even if there is an other interface eth2 configurated with the
destination ip (192.168.1.2) on the same kernel.

So the problem is how to bypass the lookup in the table shown by:
    ip route show table local

Or how to change the priority of the rule 0: shown by:
    ip rule

One dirty solution might be altering the dest ip of outgoingpackets that comes
from processes (OUTPUT ROUTING), using ip&(1<<8),  to fool the kernel. Then
having the HUB (i can program the hub) to remove that bit. (but that forbids
using with that bit set).

References:

Guide to IP Layer Network Administration
http://linux-ip.net/

Kernel Packet Traveling Diagram
http://www.docum.org/stef.coene/qos/kptd/

-- 
Antony Lesuisse                       http://antony.lesuisse.com
GPG EA2CCD66: 4B7F 6061 3DF5 F07A ACFF  F127 6487 54F7 EA2C CD66
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux