Solved

Gateway Q

Posted on 1998-05-04
13
277 Views
Last Modified: 2010-03-18
I have install one REDHAT 5.0 on my PC (IP=64.200.200.200 Mask=255.0.0.0) and try to connect to the internet thru my gateway ip 64.0.0.128.  After installation I can ping to other computer in my LAN but not outside ... here are my netstat -rn output

Destination    Gateway   Genmask   Flags     MSS   Window irtt  Iface
127.0.0.0        0.0.0.0       255.0.0.0     U            3584     0         0    lo
64.0.0.0          0.0.0.0       255.0.0.0     U            1500     0         0    eth0
0.0.0.0          64.0.0.128   0.0.0.0         UG         1500     0         0    eth0

What wrong with my command and .. what command and how to correct this  or do I need to configure more on my gateway

TQs
0
Comment
Question by:khairi
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1584262
what does ping report?
hat does traceroute report?
0
 

Expert Comment

by:natmak
ID: 1584263
put a "nameserver ADDRESSES" line in /etc/resolv.conf, where 'ADDRESSES' replaces the IP numbers of the DNS server of your provider
then do chmod a+r /etc/resolv.conf
0
 

Author Comment

by:khairi
ID: 1584264
Okay...my first try it say destination unreachable ... then with the above ... the packet is lost .. never try the traceroute ... but I try today

okay if you say that addresses is the DNS Server then I will try to put the IP .. I thought that mean other thing ...I'm new to this term
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 1584265
> destination unreachable
is a routing problem on the host you run ping

Did you use domain names or IP numbers for ping?
Can you ping both ends: server to workstation and workstation to
server?
0
 
LVL 2

Expert Comment

by:alexbik
ID: 1584266
Hi,

It seems to me that the problem lies in the fact that you don't have an official IP number
for your machine. In this way you can send packets out allright, but the server you want
to reach has no way of reaching your machchine to get the reply to you.

If your gateway is a linux box as well, you should install IP masquerading on it, as
described in ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/IP-Masquerade

Alex.
0
 

Author Comment

by:khairi
ID: 1584267
My Q is to get the default gateway .. using router which is not Linux Box... and I ping other Server and PC in my local LAN using name and IP number work find ...

What do you mean by official IP number ... it is supply by my ISP or what ?

Still not try other comment as I am not at my office
0
 
LVL 2

Expert Comment

by:alexbik
ID: 1584268
Hi,

An 'official' IP address is assigned to you by your ISP. Usually, you will get one dynamic IP address (that means that the IP address is different every time you dial in). If you want to let multiple PC's access the Internet over one dialup link, you will either have to use IP masquerading, or you will need to get multiple static IP addresses from your ISP.

Alex.
0
 

Author Comment

by:khairi
ID: 1584269
Hi,

My company already have leased line connected to the ISP (64k)

I read question posted by Jake on setting up network with RH5.0 .. I thing I am facing with the same problemm with him ... and during installation RH does not recognized my net card ... I think I am going to try using other card ...

I have a router that have two IP which one IP (eg: official IP=202.0.1.4) connected to the ISP and other IP to my local LAN (64.0.0.128)

Okay ...  If my IP (64.200.200.200) in my local LAN can I ping outside IP thru my gateway ... if my configuration on the gateway is correct ...
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 1584270
on your gateway you must do following:

      route add -net 64.0.0.0 gw 64.0.0.128 netmask 255.0.0.0 dev eth1
      route add default gw 202.0.1.4 dev eth0

assuming that eth0 is connected to you ISP and eth1 to your LAN
(probably your route has different syntax, please check with
man route)
0
 
LVL 2

Expert Comment

by:alexbik
ID: 1584271
Hi,

If you have a leased line, it should be no problem to get a few extra IP numbers.
IP numbers are always static if you use a leased line. You should use IP numbers assigned by your ISP for all mahchines that need to connect to the Internet.

Alex.
0
 

Author Comment

by:khairi
ID: 1584272
Okay I finnaly got it  ... but my router is fine with other box in my office ...

but the command route add default gateway to my gatewaye IP solve the problem..

however, the router must allow the 64..... to go thru the router ..

Thanks All
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1584273
> however, the router must allow the 64..... to go thru the router ..

what do you mean by that?
Must every IP routed to you ISP, then  route add default ..  is
just enough.
0
 

Author Comment

by:khairi
ID: 1584274
The IP I am suppose to connect is just another IP which is located at another brach which  is connected directly with a leased line ... and the router used is configured to allow IP starting with 64.0.0.0 something  with same netmask as my superior said .... about connecting to the Internet thru the gateway is not possible but I am agree with using the Official IP to connect to Internet

Sorry about the misleading info ...... I just found out from my superior ... If incorrect please advise I am new to this IP thing
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IPA - change main server? 3 129
Linux Networking : What is of bond interface & when it will be useful 18 98
Help needed with BIND9 DNS on Ubuntu. 22 98
Video Streaming 6 72
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

786 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