LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Routing internal traffic to external (https://www.linuxquestions.org/questions/linux-networking-3/routing-internal-traffic-to-external-710227/)

kzsolt 03-09-2009 06:58 AM

Routing internal traffic to external
 
:rolleyes:For testing we need "emulate" 16 machine. One of the requirement is the asynchronous. This means the one NIC network gateway is not acceptable. So we need one multiprocessor server with 4 nic. But we require this 4 nic in a same subnet.
:)Configuring of is done and working fine with external workstations.
:(But the internal traffic is not flow trough the exteranal interfaces.
For example the NICs:
eth0 192.168.1.151 00:00:00:00:00:01
eth1 192.168.1.152 00:00:00:00:00:02
eth2 192.168.1.153 00:00:00:00:00:03
eth3 192.168.1.154 00:00:00:00:00:04
For example the ping -I eth1 192.168.1.151 is not responding.
The first problem is the ARP is not responding in this example at eth0.
If we add arp entry manually then looks like the icmpreq go out eth0 and eth1 too and no response for.
The kernel is 2.6.22.5 .

:confused: Any idea?

rossonieri#1 03-09-2009 11:48 PM

hi,

interesting.

does creating a bridge doesnt do the job? i mean - should you have those independent ip in the same subnet?

there is a way to do this - but it may took a lot of effort using iproute.

keep us updates :)

kzsolt 03-10-2009 10:26 AM

Quote:

Originally Posted by rossonieri#1 (Post 3470380)
hi,
does creating a bridge doesnt do the job?
keep us updates :)

The problem is the asynchronity. This mean one of the test requirement is to spread the events and the packets like in case of more machine. If we use the same NIC in any configuration (eg. multiply address) then the asynchronity is gone, and the events occured synchronously.
Our best chance was the virtaul machines on a diffenent nic, but the hires clock problem prevent to use this solution.
The second problem is a delay. If we do any software trick then we insert delay.
:cool:Our best way now to use external router and 4 different subnet (on GBeth.

Quote:

Originally Posted by rossonieri#1 (Post 3470380)
hi,
there is a way to do this
keep us updates :)

:cry:I afraid not. Because the kernel has same router for all interface. But maybe the routing policy provide facility to emulate separated routing for every interface?

rossonieri#1 03-10-2009 11:46 AM

hi,

Quote:

Because the kernel has same router for all interface. But maybe the routing policy provide facility to emulate separated routing for every interface?
i dont think so :)
there is a way - but i'm not sure whether it will work for your lab since i cant test each scenario. good thing if you have the chance to try and do some magik :).

feel free to check lartc.org for async routing.

HTH.

kzsolt 03-11-2009 08:50 AM

Quote:

Originally Posted by rossonieri#1 (Post 3470876)
i dont think so :)

You are very optimist!

Now I have two configuration:
  1. 3 NIC on a same subnet (different IP and MAC address).
  2. 3 NIC on a different subnet (different IP and MAC address).
:)With any exteral partner (any outside of test machine) any kind of service including icmp working fine.
:cry: But any traffic with destination address of test machine are failed.
:cool:At the 1 case send ARP request on a right interface but no answare for.
:cool:At the 2 case send ARP request for own address of other subnet.

Quote:

Originally Posted by rossonieri#1 (Post 3470876)
feel free to check lartc.org for async routing

Some document reded from this site but looks like nobody think'd about force internal traffic to external conception...

kzsolt 03-11-2009 09:01 AM

Some reference for related documents
 
http://www.linuxquestions.org/questi...-el4.0-619870/

http://mailman.ds9a.nl/pipermail/lar...q2/015791.html

http://lartc.org/howto/

http://lartc.org/howto/lartc.rpdb.multiple-links.html

:tisk: But not enough deep to solve this problem....

kzsolt 03-12-2009 05:28 AM

Ok. The problem is looks like common for multiple interface on same
subnet and for multiple interface on different subnet.

:) If the source IP address of the incoming packet (received by nic) is out from this kernel (eg. from other host) then arp and/or ip route processing it well.
:cry: If the source IP address of the incoming packet (received by nic) is in this kernel (eg. other interface of this kernel) then arp and/or ip route drop it without any count or signal. And looks like no way to force other algorithm. I try'd arp flags, interface address qalifyers, route, source route but nothing help.

:tisk: I think this kind of operation break the basic rules of ip routing. Because normally only the ttl can break loop...

kzsolt 05-21-2009 12:17 PM

I found one solution for patch fans. Use send-to-self kernel patch from Julian Anastasov.

But I still searching for patchless solution...


All times are GMT -5. The time now is 03:36 PM.