I've got an unusual network problem with some Linux boxes at school. Mozilla Browser can view web pages fine via the proxy on port 80 and ftp works OK. I can ping the router but if I try pinging any web sites it just times out - it does seem to find the IP of the web site I'm pinging, but no data pongs back. So I can use google in a web browser, but ping google.co.uk just times out - I didn't know that was possible!
Does the router allow pings to propagate beyond it?
This is the current contents of /etc/network/interfaces:
auto lo iface lo inet loopback
auto eth0 iface eth0 inet static address 10.25.20.101 netmask 255.255.255.0 gateway 10.25.16.1 #network 10.25.16.0
#broadcast 10.25.16.255
Either the gateway is wrong (should be something more like 10.25.20.1?) or more likely the netmask is wrong - try 255.255.0.0. As it stands the box can't actually send packets outside of it's local network i.e. machines beyond 10.25.20.xxx.
Is there a way of being able to address a computer by its name as opposed to it's IP if a dynamic IP is being used, allocated by the DHCP server? I'd like to be able to do ssh user@hostname instead of ssh user@000.000.000.000 for example which is my reason for wanting static IPs in the first place.
If the DHCP server or the client PC that obtains the dynamic IP, updates the local DNS server (Win2K usually does this by default) then entering the DNS server IP address into /etc/resolv.conf should do the trick. This should cause the Linux box to look up PC names in the DNS server and hence you would be able to use user@hostname.
One other simple question, how can I find out the IP of the computer I'm working on? I thought it was hostname -i but this just returns 127.0.0.1 instead of the computer's IP on the network.
I usually do "/sbin/ifconfig" which shows IP address per interface.
Regards David.