Quoting Anthony Staines <anthony.staines at ucd.ie>:
> Hi,
>> I run Red Hat 7.2 on a laptop, which moves between work, where it gets a
> fixed IP address on eth0 (network card) and home, where it picks up an
> IP address courtesy of Eircom on ppp0 (a modem). So far so fine.
>> Both of these work nicely, except that when at home I can't access my
> work websites, or the servers here. I get '-Site- could not be found'
> messages in Mozilla. I can't ping them, and I can't traceroute them by
> name. In fact I can't see any of the ucd.ie domain. By IP address there
> are no problems. (In other words 'ping XXX.ucd.ie' gets nowhere; 'ping
> 137.43.XX.XX' works normallly).
>> If I bring down eth0 at home everything is hunky-dory,
There's a simple, horrible hack to (probably) fix this....
/etc/resolv.conf contains the IP address(es) of the DNS server(s) your machine
consults. Change those addresses to the DNS servers of your ISP. Ring them if
you don't know the addresses.
Now you will be using their DNS all the time, even in UCD.
I can't believe I'm advocating this....
And what's actually going on?
The kernel has to know which interface to use to get to a given IP address. it
has a routing table - run /sbin/route to print it. Yours (eth0 up, ppp0 down)
should look something like:
Destination Gateway Genmask Flags Metric Ref Use Iface
194.125.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 194.125.205.1 0.0.0.0 UG 0 0 0 eth0
If you bring up ppp0, it overrides the default route (line 3) with the new route
out via ppp0 - because RedHat have guessed that is what is intended, but line 1
is left intact, and line 1 says that 194.125.xxx.yyy is accessed via eth0, and
that's where it looks for the DNS servers.
So if you use your ISPs DNS servers even when in UCD, you shouldn't have to
change anything....
I've just realised that if you have such an entry in the table, you should be
barred from ALL 194.125.XXX.YYY address. So it's probably that the route is to
(say) 194.125.205.XXX, the DNS servers *are* in 194.125.205.XXX, but none of the
other machines you're trying to reach are.
Anyway, if you're still stuck, post the contents of /etc/resolv.conf and the
output of '/sbin/route -n' for each config.
Good luck,
Ronan
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!