can't ping anything but the gateway

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
my 486 won't ping anything but the gateway... everything else produces a "network unreachable" error. the gateway's response times are reasonable. i'm using linux on a floppy, so no DHCP... instead I do:
ifconfig eth0 128.2.166.196 netmask 255.255.254.0
route add 128.2.166.1 eth0
ifconfig eth0 up

pinging anything other than the gateway results in "network unreachable" - this includes machines on the same switch. I know the card itself works.

thoughts?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
I don't know much about linux but in solaris you can check your routing table with "netstat -rn" You should see a 0.0.0.0 destination or one named default. Looks like you still haven't added the default gateway.

in solaris you create a file /etc/defaultrouter and place the hostname of the router and you're all set.
 

Acetate

Member
Sep 19, 2001
85
0
0
First off, is this a private network at home?
If so, why are you using a Class B IP address?

If it is a home network, use a class C IP address (192.168.1.0)
and don't use 255.255.254.0 for your mask, use 255.255.255.0.

How are your other machines hooked up, specifically?


Acetate - CCNA.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< route add 128.2.166.1 eth0 >>



Check the route page, that may not be the proper way to add the default route in linux (its been a long time).



<< First off, is this a private network at home?
If so, why are you using a Class B IP address?
>>



Since it is a 486 running LRP (or equivelant), that is probably the external interface on his connection, but I could be wrong. It is a univeristy ip...



<< If it is a home network, use a class C IP address (192.168.1.0)
and don't use 255.255.254.0 for your mask, use 255.255.255.0.
>>



Any specific reasons for this? I use the 10.0.0.0/8(?) range for my home network. Why not use an off subnet mask? Curiousity gets the bet of me. :)




 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
Well, to start with, you don't need the route to .1, because it's on the same segment/subnet.

What you may have meant to do is make your default gateway the .1 machine, which would be

route add 0.0.0.0 netmask 0.0.0.0 128.2.166.1 1

Or check your local syntax for use of the keyword "Default" or "gateway"

As it is, you have no default gateway defined (because the route statement you have added is meaningless).

Also, the 255.255.254.0 subnetmask isn't doing a damn thing for you, unless you're planning on ~500 hosts on this segment. IF the machine is connecting to the Internet in any way, shape, or form, you should lose the 128.x.x.x address too....even if you're natted. It belongs to someone...if it should leak to the Internet, you could get in trouble.

(BTW: I use a class B at home, I have an adaptive addressing system to help me keep track of what's where...etc.)

FWIW


Scott
 

Acetate

Member
Sep 19, 2001
85
0
0


<<

<< route add 128.2.166.1 eth0 >>



Check the route page, that may not be the proper way to add the default route in linux (its been a long time).



<< First off, is this a private network at home?
If so, why are you using a Class B IP address?
>>



Since it is a 486 running LRP (or equivelant), that is probably the external interface on his connection, but I could be wrong. It is a univeristy ip...



<< If it is a home network, use a class C IP address (192.168.1.0)
and don't use 255.255.254.0 for your mask, use 255.255.255.0.
>>



Any specific reasons for this? I use the 10.0.0.0/8(?) range for my home network. Why not use an off subnet mask? Curiousity gets the bet of me. :)
>>




because you are specifying a class A address, which has a hundreds of thousands of useable host and subnet addresses.

Unless you plan to run a WAN from one coast of north america to the other, you will not require this.

A Class C address is less overhead (with 254 useable IPs) and a simpler subnet mask for home networks.

The point is to keep it as simple as possible!
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< The point is to keep it as simple as possible! >>



Believe it or not, thats why I did it the way I did it ;)
 

Acetate

Member
Sep 19, 2001
85
0
0
In an internal network, it REALLY doesn't make a huge difference, but you should follow the book as much as possible to prevent problems in the future.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< In an internal network, it REALLY doesn't make a huge difference, but you should follow the book as much as possible to prevent problems in the future. >>



Which book?
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81


<< First off, is this a private network at home?
If so, why are you using a Class B IP address?

If it is a home network, use a class C IP address (192.168.1.0)
and don't use 255.255.254.0 for your mask, use 255.255.255.0.

How are your other machines hooked up, specifically?
>>



nope, not a private home network. about 22,000 machines :D (college). thats a real IP - if you want to visit it once I get it on the network, have fun. anyway, thats the IP I got assigned, and the netmask is what all the other machines here picked up over DHCP, so it's definitely correct.
 

Acetate

Member
Sep 19, 2001
85
0
0
With that subnet mask, every 510 machines will be in a different subnet (126 useable subnets in all).

How are the computers interfaced to the network/internet?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<<

<< First off, is this a private network at home?
If so, why are you using a Class B IP address?

If it is a home network, use a class C IP address (192.168.1.0)
and don't use 255.255.254.0 for your mask, use 255.255.255.0.

How are your other machines hooked up, specifically?
>>



nope, not a private home network. about 22,000 machines :D (college). thats a real IP - if you want to visit it once I get it on the network, have fun. anyway, thats the IP I got assigned, and the netmask is what all the other machines here picked up over DHCP, so it's definitely correct.
>>



Told you all :D
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
ooh, lots of replies since dinner, when I started typing ;)

is that CCNA thing supposed to be free? I dont want to pirate an education - although I don't really want to pay an extra $x-thousand either.

yeah, i probably should have mentioned this is a "real", LARGE network. i'm starting a separate thread to learn about what exactly subnet mask is ;)

edit: we have one router for all the dorms, then I think one router per dorm (since IPX doesn't go between dorms - but my understanding of IPX/subnets is limited). then there are a bunch of switches/hubs - my dorm is switched :). thats how the network is set up.

edit2: acetate, can you enable PM's / your profile?

edit3: swapping the network cable between my tbird and 486 is annoying. maybe I should get a hub already ;)
 

Acetate

Member
Sep 19, 2001
85
0
0
subnets are essentially little networks split up by the subnet mask.
to communicate between subnets a router is required.


The course:

The course isn't "free" per sey :)

I access it from home and from work, my classmates access it from all over the country, so there's no way anyone's gonna care if you access it too.

There's a load of reading to do, but its all worth it.

 

Acetate

Member
Sep 19, 2001
85
0
0
For each subnet, there are 2 IPs that cannot be used
1) the first one (network address)
2) the last one (broadcast address)

Everything in between can be used for interfaces and workstations.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
ok, my route command was pretty useless ;)

anyway... I do the ifconfig with IP, netmask, and broadcast, then ifconfig eth0 up, then "route add default gw 128.2.166.1" (read the man page on a different machine). route seems to acept this syntax, but comes back with "SIOCADDRT: Network is unreachable". Whats that mean?!?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< ok, my route command was pretty useless ;)

anyway... I do the ifconfig with IP, netmask, and broadcast, then ifconfig eth0 up, then "route add default gw 128.2.166.1" (read the man page on a different machine). route seems to acept this syntax, but comes back with "SIOCADDRT: Network is unreachable". Whats that mean?!?
>>



It responds to the route command with that? Check your cable.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81


<< Maybe? >>



I only see another person with a similar problem, and no answers... "linux on a floppy" doesn't have much.
no DHCP... /etc has: group, host.conf, hosts, inittab, issue, kiss.rc, ld.so.cache, mtab, passwd, protocols, rc, resolv.conf, securetty, services, and termcap. :(

maybe I should find another distro that fits in only 8 meg ram.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<<

<< Maybe? >>



I only see another person with a similar problem, and no answers... "linux on a floppy" doesn't have much.
no DHCP... /etc has: group, host.conf, hosts, inittab, issue, kiss.rc, ld.so.cache, mtab, passwd, protocols, rc, resolv.conf, securetty, services, and termcap. :(

maybe I should find another distro that fits in only 8 meg ram.
>>



Maybe, I dont keep up with any of these at all. From the looks of those posts there are quite a few different alternatives out there.

EDIT: This post makes it look like 8MB is not a good idea.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
WOOHOOO!!!!! :D flash of insight, it works.

edit: that flash of insight being to run lynx and see it time out - except it didn't... there is a default index.htm that says how to get on the net.

ifconfig eth0 128.2.166.196 netmask 255.255.254.0
route add -net 128.2.166.0 netmask 255.255.254.0
route add default gw 128.2.166.1

(well, it says MY_IP, MY_NETMASK, but I managed to figure that out ;)).

excellent :)