LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to forward ip tunnel's output (https://www.linuxquestions.org/questions/linux-networking-3/how-to-forward-ip-tunnels-output-826046/)

crytosky 08-13-2010 12:45 PM

how to forward ip tunnel's output
 
Hi,
I'm trying to implement a routing short-cut solution, whose requirement is as following:
server1(Linux) sends ip packets(destined to server3) to server2(Linux) via an ip tunnel between them, server2 forwards the ip tunnel's output (the inner ip packets) to server3. Each server has only one NIC and a public ip associated with it. All servers can communicate with each other.
I'm sure the ip tunnel between server1 and server2 was configured correctly and worked well. server2's ip_forward was enabled too. On server2, I can capture the traffic on the ip tunnel interface, and they are originated from server1 and destined to server3. The problem is server2 does not forward the ip tunnel's output at all.
On server2, I just run "echo 1 > /proc/sys/net/ipv4/ip_forward". Is there anything I missed for enabling ip_forward?
Or originally, ip forward can't work on servers with only one NIC, can it?
Any help would be greatly appreciated!
Thanks a lot!

dr_agon 08-17-2010 07:35 AM

AFAIK ip_forward parameter has nothing to do with tunnelling, and you have to set up the tunnels properly.
It looks for me, that you have 2 servers (named server1 and server3), and one machine named server2, which in fact should act as a router. Your short-cut looks too much complicated :)

crytosky 08-18-2010 01:23 AM

Yes, ip tunnel should not impact on ip forward. But what I see is ip tunnel's output (the inner ip) is not be forwarded on my ubuntu server. According to ip tunnel's implementation, the inner ip should be put back to recieve queue -- netif_rx(), then if its destination is not the local host, ip forward should forward it again. Is it right?
I'm not sure if there's completely no problem with my configuration of ip tunnel, but on server2's tunnel interface I can capture the traffic from server1 to server3.
I'm not sure if this only occurs on ubuntu too. I want to switch to another Linux distribution to try it.

crytosky 08-18-2010 05:34 AM

I try fedora with server2, then it works. So seems there's a bug in ubuntu. I have reported a bug to ubuntu community:
https://bugs.launchpad.net/ubuntu/+bug/619750

Hope they can respond it quickly!


All times are GMT -5. The time now is 06:24 PM.