Link to home
Start Free TrialLog in
Avatar of zazagor
zazagorFlag for Sweden

asked on

Linux routing question

Hi,

I have a linux alpine 2.6.1 with 2 network adapters and two windows hosts, one on each network. I cannot get host1 and host2 to communicate in both directions.

host1 <--> eth1 <--LINUX--> eth2 <-host2>

I can ping from : host2 to host1
                           host2 to eth1
                            eth2 to eth1
                            eth1 to eth2
                            eth1 to host1  
But I cannot ping from  eth1 to host2 or host1 to host2. Why??
All firewalls are disabled. Iptables on the linux shows ACCEPT ALL on input,output and forward.
Primaraly I should be able to ping host1 from eth2 because I can ping it from eth1.
I have of course enabled ip-forwarding.

Any ideas?
Am I missing a static route?
//zazagor
ASKER CERTIFIED SOLUTION
Avatar of Kerem ERSOY
Kerem ERSOY

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zazagor

ASKER

Like I said:
-I have of course enabled ip-forwarding
I have bouble checked that the file /proc/sys/net/ipv4/ip_forward  contains: 1
and  that
/etc/sysctl.conf:
net.ipv4.ip_forward = 1

Other ideas?

//zazagor
Avatar of Kerem ERSOY
Kerem ERSOY

In fact I don't think alpine linux does have a sysctl.conf file. Please add it inside your /etc/rc.local or similar file which will run during the startup. Unfortunately alpine linux documents do not  metion a reference where to put the command.
will you provide the ouput of:

cat /proc/sys/net/ipv4/ip_forward

if it is 0 then routing is not enabled. If it is please check host1 and host2 and just make sure that their Default Gateway is the router system Ethernet at their side.

Cheers,
K.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will you post your outoput

from host 1:

traceroute -d host2

From host 2:

traceroute -d host1
Oops sorry please use :

traceroute -dn hostx

x is 1 or 2 depending on what system you execute the command.  
Hi KeremE, traceroute works on the ICMP protocol, zazagor is not able to ping how do you think traceroute is going to work. Moreover traceroute is to detect routing faults not connectivity..

Cheers..
@expert_tanmay:

> Hi KeremE, traceroute works on the ICMP protocol, zazagor is not able to ping how do you think

How about a  "careful" reading through the original question?:

> But I cannot ping from  eth1 to host2 or host1 to host2. Why??

Cheers,
K

Sorry KeremE you are right looks like some routing problem. zazagor please can you let us know the routing table of host1, Linux and host2.

Cheers..
No problem :) Lets see but it seems that the Q is already abandoned : (
Avatar of zazagor

ASKER

Sorry guys...I'm totally drunk