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!
I'm also having trouble allocating static IPs to the boxes. I've made "reservations" on the Windows NT DHCP server of the IP addresses I want in the range 10.25.20.101 - 10.25.20.108 but I'm having trouble getting /etc/network/interfaces set up correctly to connect to the network using them.
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 ===================================
After I make changes I do ifdown eth0 and then ifup eth0, which usually results in a "network unreachable" message.
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. 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.
One other unrelated problem. I've been having trouble changing the keyboard language setting for X from the default US to UK. I've changed the relevent values in /etc/X11/XF86Config and /etc/X11/XF86Config-4 and restarted X, but for some reason it keeps reverting to US. The KDE keyboard setting is fine, but in fluxbox it uses a US layout. The funny thing is I've been able to change the language on my home PC using fluxbox, perhaps I'm missing something obvious.
Any help would be greatly appreciated as I'm not very experienced with any of these problems!
-- Ben "tola" Francis http://www.bourne-grammar.lincs.sch.uk/bgstux
On Fri, 12 Sep 2003, Ben Francis wrote:
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
Your default gateway is on a different network to your machine. The PC will be trying to send all external data to 10.25.16.1 but it won't know how to send the data there as your pc only knows how to send data to machines in the 10.25.20.x range
You either need to change the subnet mask... (I think it should be 255.255.251.0 but check my maths) or change the ip address of your pc.
You may find this helpfull
http://www.telusplanet.net/public/sparkman/netcalc.htm
HTH
Chris
Chris Glover wrote:
Your default gateway is on a different network to your machine. The PC will be trying to send all external data to 10.25.16.1 but it won't know how to send the data there as your pc only knows how to send data to machines in the 10.25.20.x range
You either need to change the subnet mask... (I think it should be 255.255.251.0 but check my maths) or change the ip address of your pc.
Aha, thank you. Mr C at school said that 255.255.240.0 rang a bell somewhere so I tried that and it worked! I now have 8 boxen with static IPs, yey!
David Fairey wrote:
Does the router allow pings to propagate beyond it?
I don't know, but the odd thing is I'm sure it worked when I first installed them, very odd.
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.
^
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.
I *think* I've got my head round that, but haven't tried it yet, will have a go :) If I can't get that to work I'll just make a hosts file on each computer listing the names and IPs of the other boxes now that they have static IPs, is this a valid method?
I usually do "/sbin/ifconfig" which shows IP address per interface.
Ah, thank you. I'm suprised there isn't a more simple way, but that's easy enough. Matthew Pearson wrote:
Benjamin Hayes wrote:
Ben
In reference to the pinging problem, this is possible (but it's also not very good either - when troubleshooting).
It's a pain in the arse :P
Normally, this can be accomplished by disabling the ping on the firewall (via the icmp request & icmp reply). DNS and web browsers will grab the ip addresses of the websites but ping will always return because of a 'time out' issue.
yup
The way around this is to enable the port via the firewall (or via the acl list on your router - whichever one you are using).
eek, I don't think I can, is it possible that this is controlled from Lincoln? (see below)
Matt Pearson wrote:
Are you behind a firewall? Is your netmask right? I used to work at a school in Peterborough (using the LEA as an ISP) where the netmask was 255.255.252.0, but with a similar IP address range to you. Make sure the netmask is right first. Then if you are behind a firewall, you may not be able to get thru with ping packets anyway, as these may be blocked (by your provider).
We are behind a firewall yes and no my netmask wasn't right. A big problem is that I'm not entirely clear on how our dedicated 2 meg ADSL line works. It's provided by netlinc who provide internet for all of Lincolnshire's schools as far as I'm aware. We have a computer which acts as the proxy and the DHCP server which I assume has a static IP to the outside world...
When we log in we are faced with a netlinc login screen where everyone has their own username and password, there is a Norton logo on this page. After that point many web sites are banned for various stupid reasons like "Banned under catagory: humour". From the computers on the network I am unable to ssh to computers in the outside world, use P2P or instant messaging/IRC, access https:// sites or at the moment ping web servers! Just about the only things allowed are http on port 80 and FTP.
I've emailed two people at netlinc to ask about having a port unblocked so I can ssh to computers outside and also about the possibility of running an Apache web server from inside school but have never had a reply. This isn't that suprising considering when we emailed to ask if we could have PHP installed on our web space they replied "What's PHP?".
Thanks for the help so far!
-- Ben "tola" Francis
Ben Francis wrote:
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.
I *think* I've got my head round that, but haven't tried it yet, will have a go :) If I can't get that to work I'll just make a hosts file on each computer listing the names and IPs of the other boxes now that they have static IPs, is this a valid method?
having managed to allocate each machine a static IP I have created an /etc/hosts file for each computer that lists the IPs and hostnames so that I can now refer to each machine by name instead of IP. May be a long way round, I don't know.
Thanks for the help on that.
-- Ben "tola" Francis
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.