Solved

Network is unreachable

Posted on 2002-04-01
15
501 Views
Last Modified: 2011-10-03
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.

0
Comment
Question by:km_saran
15 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 6910328
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
 

Author Comment

by:km_saran
ID: 6911792
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
 
LVL 3

Expert Comment

by:packratt_jk
ID: 6912160
mask of /32???

ok, what are the results of ifconfig -n?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6914266
and netstat -rn on the gateway?
0
 
LVL 3

Expert Comment

by:UkWizard
ID: 6919399
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
 

Author Comment

by:km_saran
ID: 6920179
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6920290
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:km_saran
ID: 6920343
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6920361
echo 1 > /proc/sys/net/ipv4/ip_forward
0
 

Author Comment

by:km_saran
ID: 6922358
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
 

Author Comment

by:km_saran
ID: 6922388
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
 
LVL 10

Expert Comment

by:kiranghag
ID: 6922418
route add default 202.120.192.XX  
or
route add default gw 202.120.192.XX   ?????
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6922606
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
 

Author Comment

by:km_saran
ID: 6925252
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6925884
has this question been answered? Then please finish this threade an ask new questions in a new thread.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now