[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Network is unreachable

Posted on 2002-04-01
15
Medium Priority
?
535 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 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