hello,
what is tyhe netmask set to? i had mine set to something that was not 255.255.255.0 and it created a bit of havoc.
Hi,
I apt-get upgraded on my workstation a few days ago and ever since I haven't been able to access my gateway and therefore cannot access the internet. The workstation can ping the gateway and vice-versa. The routing tables seem correct although I'm not sure if the apt-get upgrade did anything that would modify the routing tables. I only have one entry with the default gateway and I'm pretty sure that was how it was when everything was working. I tried adding a destination entry with my workstation's ip address, but nothing changed.
I can only guess that somehow when I did my apt-get upgrade, one of my conf files with my hostname got overwritten to the default "debian" hostname, but I've searched everywhere on my system and couldn't find anything.
Any ideas?
hello,
what is tyhe netmask set to? i had mine set to something that was not 255.255.255.0 and it created a bit of havoc.
Does /etc/hostname contain the correct hostname?
pbharris: Well if I do route add -net, then I have to use 255.255.255.0, otherwise it'll complain. If I use -host, then it'll default to 255.255.255.255. So I'm not sure which one to pick.
quandary: Yeah they're correct and so is /etc/hosts. I don't know where else can the hostname be overwritten to affect like this though.
If the interface you access the gateway with is eth0 and the gateways IP is 1.2.3.4 then the routing table should look like this:
route -n:
Is that the case?Code:Target Router Genmask Flags Metric Ref Iface 1.2.3.4 0.0.0.0 255.255.255.255 UH 0 0 eth0 0.0.0.0 1.2.3.4 0.0.0.0 UG 0 0 eth0
I think the problem may be with your genmask for the ip address.
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 * 255.255.255.0 U 40 0 0 eth0
127.0.0.0 * 255.0.0.0 U 40 0 0 lo
default 192.168.0.1 0.0.0.0 UG 40 0 0 eth0
this is what netstat gives for my machine. With 255.255.255.255 you may not have enough overhead for the broadcast or wire addresses. try changing it to 255.255.255.0 this will give you more workstation address possibilities.
Hope this helps.
Mike
edit You can get a nice free subnet calculator that takes all the guesswork out of masks. They have a couple at www.cnet.com do a search on subnet calculators these are all for win don't know of any for linux.
I came to work and checked out the subnet 255.255.255.255 gives you no usable host ips so you need to back it down to include enough ips for your router, host, and broadcast and wire even though you don't set up ip for the wire the network reserves one ip slot for it.
Thanks for the replies, guys.
demian: Yeah I tried that before, but just to make sure I did it again via "route add -host 192.168.1.2 eth0" and still no change.
mmiller9: I'm not sure what you mean by "overhead", but I tried what you said as well. I did "route add -net 127.0.0.0 netmask 255.0.0.0 lo" then "route add -net 192.168.1.0 netmask 255.255.255.0 eth0" and pinged slashdot.org and it reported unknown host.
Maybe we are looking at the wrong thing maybe you have a problem with the dns entries or if you have to restart your connection to your isp as possible causes.
[quote author=mmiller9 link=board=4;threadid=6468;start=0#61022 date=1046468094]
Maybe we are looking at the wrong thing maybe you have a problem with the dns entries or if you have to restart your connection to your isp as possible causes.
[/quote]
Well my gateway can access the internet so it's not an isp problem and my dns entries in resolv.conf (on my workstation) are exactly the way they were before the apt-get upgrade I did (i.e., when internet was working) so I am doubtful that it is the cause.
Ok let's look at it this way: Is there a log for apt-get for the most recently upgraded programs? And if so, would it be wise to check it out and apt-get remove each package? My gut feeling that it could be kinda dangerous if I don't know what package I'm uninstalling, but I'm running out of options here.
Bookmarks