Network is unreachable

Dear experts,

        i need your help regarding connection to the internet.  Actually we have the satic ip address for the internet.  So that we no need for use the modem.  For connecting to the internet we have to specify the gateway address and primary and secondary domains.  It works fine with windows envirnoment.  How to configure in linux.  While i am trying, try to ping the gateway ip address i got the error message 'Network is unreachable'.   What are the things i configured in linux are specify the default gateway and then primay domain in name server list.  I have another one netwrok card in the same machine for connecting with intranet.  So, through proxy i can able to connect the internet.

Anybody help me to solve this problem,

With advance thanks,

M.Saran.

km_saranAsked:
Who is Participating?
 
ahoffmannCommented:
could you please post result of
   netstat -rn
from your gateway mashine and the host whicg reports 'Network is unreachable'.
Have you set IP_FORWARDING on/true on the gateway?
0
 
km_saranAuthor Commented:
The result of netstat is:

Kernal IP routing Table
Destination    GateWay GenMask   Flags  MSS Window irtt iFace
202.120.192.19 0.0.0.0 255.255.255.255 UH  0 0     0    eth0
202.120.192.16 0.0.0.0 255.255.255.240 U   0 0     0    eth0
127.0.0.0  0.0.0.0 255.0.0.0           U   0 0     0    lo

With regards,
M.Saran.
0
 
packratt_jkCommented:
mask of /32???

ok, what are the results of ifconfig -n?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
ahoffmannCommented:
and netstat -rn on the gateway?
0
 
UkWizardCommented:
Im confused, let me get this right. You are trying to ping the default gateway local address ?

Right, you have no default gateway setup at all according to the results earlier. Whats the Gateways IP address ?

unless it is within the 202.120.192.X / 255.255.255.240 subnet address range it will not be able to get to the gateway to be able to go out onto the internet.

if this is the case, change the netmask to be correct on the linux box and then ping the gateway address.

once you can ping the gateway address, then setup your default route to this address.

something like;
# route add default 202.120.192.XX  

where XX is the gateways address.

hope i am understanding you correctly.
0
 
km_saranAuthor Commented:
Thank you experts,

I fixed the problem, actually the problem on myside, i.e.,  Gateway network range is differ from my network.  My network is x.x.x.16 and BroadCost is x.x.x.31 which are automatically given by the linux while i am configuring the ip address x.x.x.19.  My gateway address is x.x.x.2.  So that i thing i am not able to ping.  Then i edit the ethernet script file for change the network=x.x.x.0.  After that i works correctly.  Please confirm experts wheather my actions are right?

Then i want to know enble the IP Forwarding in Redhat 6.2  linux kernal... Anybody can help me for that also...

with regards,
M.Saran.
0
 
ahoffmannCommented:
my experiance tells me that M$'s TCP/IP-implementation relies on matching netmasks (as you figured out yourself), but other experts told me (a few days ago) that this is not true.
As it is true in your case, my experiance is not to bad :)
0
 
km_saranAuthor Commented:
Dear experts,
Can anybody help me to enable the kernal for ip forwording in redhat linux 6.2?

My Kernal version is 2.2.14-50.

With regards,

M.Saran.
0
 
ahoffmannCommented:
echo 1 > /proc/sys/net/ipv4/ip_forward
0
 
km_saranAuthor Commented:
echo 1 > /proc/sys/net/ipv4/ip_forward

It works fine ahoffmann.

Thank you...

I need your help in to work with NAT and ip / fort forwarding...

With regards,

M.Saran.
0
 
km_saranAuthor Commented:
Dear expert,

How to make the ip forwarding enable permanently. That is after running the command echo 1 > /proc/sys/net/ipv4/ip_forward it is set to 1 after restarting it will be reseted to 0.

With advance thanks...

M.Saran.
0
 
kiranghagCommented:
route add default 202.120.192.XX  
or
route add default gw 202.120.192.XX   ?????
0
 
ahoffmannCommented:
add
     echo 1 > /proc/sys/net/ipv4/ip_forward
to one of the rc-scripts in /sbin/init.d or /etc/init.d (depends on your distribution)
Same applies to the  "route add ..." commands, but most distributions have a .conf file for that, like /etc/route.conf.

About the NAT thing, please post a new question.
0
 
km_saranAuthor Commented:
Dear experts,

    Thank you all.  Sorry for the late response, how to redirect the request cominig from x.x.x.x to the firewall server for port xxxx to x.x.x.x.:xx which is available in my internal network.  Using ipchain command and then how to get the ipmasqadm package.

With advance thanks,
M.Saran.
0
 
ahoffmannCommented:
has this question been answered? Then please finish this threade an ask new questions in a new thread.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.