LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux routes (https://www.linuxquestions.org/questions/linux-networking-3/linux-routes-191058/)

ispnepal 06-08-2004 07:14 AM

Linux routes
 
hi all:,

my isp gave me their gateway ip address x.x.233.81 and my client ip x.x.237.116/255.255.255.248.

when i do : route add default gw x.x.233.81 it says." netowork unreachable" and cannot connect to internet..


But when my friend's windows machine put same gatewat ip in is machine x.x.x.237.114/255.255.255.248, he can connect to internet and can browse.


What might be the problem in my linux machine... why windows can and linux cannot? it is windows 2003 adv server and mine is fedora core 1.


Thanks
nisp

stickman 06-08-2004 07:48 AM

A 255.255.255.248 subnet is only 8 IP addresses long. The gateway and your client IP are not even on the same network. You need to verify that your ISP gave you the correct information. What IP address was assigned to your friend's computer? I would bet that it was something a little closer to the gateway.

ispnepal 06-08-2004 08:05 AM

that's what i was surprised too.
my linux machine is x.x.237.116/30 and his machine is x.x.237.114/30

i cannot ping x.x.233.81 and his windows machine can...



Paras

henryluo 06-08-2004 10:27 AM

try modify submask to 255.255.255.0,good luck!

ispnepal 06-08-2004 12:17 PM

U mean in my linux machine i convert my subnet mask from 255.255.255.248 to 255.255.255.0?

nisp.

stickman 06-08-2004 02:38 PM

Quote:

Originally posted by ispnepal (condensed for space)
that's what i was surprised too.
my linux machine is x.x.237.116/30 and his machine is x.x.237.114/30
i cannot ping x.x.233.81 and his windows machine can...
Paras

A /30 netmask translates to 255.255.255.252, which is 4 IP addresses long. If "x.x" is the same in both IP addresses, then something is wrong. With a /30 netmask, x.x.237.116 calculates to a network address. If you friend is using x.x.237.114, then his gateway is probably using x.x.237.113 as his gateway. This assumes that the /30 mask is the correct for your configuration.

ppuru 06-08-2004 11:10 PM

Quote:

Originally posted by ispnepal
U mean in my linux machine i convert my subnet mask from 255.255.255.248 to 255.255.255.0?

nisp.

as the gateway ip is x.x.233.x and the client ip is x.x.237.x, class c subnet won't work either.

sticking to stickman's last post, verify the ips with your ISP

ispnepal 06-09-2004 05:25 AM

my problem is solved:

did:

route add -host x.x.233.81 gw dev eth0
route add default gw x.x.233.81


Thanks
nisp


All times are GMT -5. The time now is 10:59 AM.