Solved

Network is unreachable

Posted on 2002-04-01
15
515 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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
 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
squid3 ntlm and itunes authentication 5 90
IPA - running on unsupported CentOS servers? 1 98
Cron jobs 12 136
centos linux 65 156
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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