All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] simpler version, How to bypass the local routing table?
@ 2003-12-12 15:18 Antony Lesuisse
  2003-12-12 16:24 ` Darryl Miles
  2003-12-12 16:41 ` Julian Anastasov
  0 siblings, 2 replies; 3+ messages in thread
From: Antony Lesuisse @ 2003-12-12 15:18 UTC (permalink / raw)
  To: lartc

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@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] simpler version, How to bypass the local routing table?
  2003-12-12 15:18 [LARTC] simpler version, How to bypass the local routing table? Antony Lesuisse
@ 2003-12-12 16:24 ` Darryl Miles
  2003-12-12 16:41 ` Julian Anastasov
  1 sibling, 0 replies; 3+ messages in thread
From: Darryl Miles @ 2003-12-12 16:24 UTC (permalink / raw)
  To: lartc


 From your previous example my understanding of the hub, was that it was 
on a tapX interface in software on the same box, not another physical 
host on the ethernet segment.

I see, your immediate problem is the packets won't leave the host and 
don't appear appear on the wire, the only (proper) way around this is 
not to use the real IP of the other ethernet interface as the dest 
address during the ping.  Instead create a fake IP to use.

Then perform address translation at the hub, which is neither of the 1.1 
or 1.2 addresses itself, but say 1.3, that translates all packets going 
to the fake addresses in each direction, don't forget you have to 
translate both the src and dest addresses to each others fake address, 
replace fake with real and real with fake.  The fake addresses would 
also best be in another 2 subnet of their own, call them 192.168.3.1/24 
and 192.168.4.2/24.

I'd also recommend you don't overlap the subnets of eth0 and eth1 on the 
same box, make eth1 192.168.2.2/24 or something.

Mangling the IP on OUTPUT won't work, AFAIK, since it never gets into 
that routing path out of the kernel as its in the local table.

But your original request is improper from a network standpoint, each 
host has one IP stack, trying to split it in the middle is asking for 
trouble.


Antony Lesuisse wrote:

>imagine the folowing simpler configuration
>
>Hub  | Linux
> +----- eth0 192.168.1.1/24
> |   |
> +----- eth1 192.168.1.2/24
>     |
>
>  
>


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] simpler version, How to bypass the local routing table?
  2003-12-12 15:18 [LARTC] simpler version, How to bypass the local routing table? Antony Lesuisse
  2003-12-12 16:24 ` Darryl Miles
@ 2003-12-12 16:41 ` Julian Anastasov
  1 sibling, 0 replies; 3+ messages in thread
From: Julian Anastasov @ 2003-12-12 16:41 UTC (permalink / raw)
  To: lartc


	Hello,

On Fri, 12 Dec 2003, Antony Lesuisse wrote:

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

http://www.ssi.bg/~ja/#loop

Regards

--
Julian Anastasov <ja@ssi.bg>

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-12 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-12 15:18 [LARTC] simpler version, How to bypass the local routing table? Antony Lesuisse
2003-12-12 16:24 ` Darryl Miles
2003-12-12 16:41 ` Julian Anastasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.