[techtalk] Weird network interface behaviour

Jeff Dike jdike at karaya.com
Fri Oct 20 13:44:33 EST 2000


magnio at pvv.ntnu.no said:
> Unfortunately this is a different problem from mine.

Sorry about that.  I think I understand the problem now.

I can't reproduce this on either 2.2.5 or 2.2.14 in the simplest case (add a 
virtual interface, ssh out to another machine, look at where it thinks I came 
from).  The other machine thinks I came from the IP address for eth0, not 
eth0:0.  So, it might be a fixed bug, which also might be why not many people 
are complaining about it.

> But I still want to have impala as the main name of the box, and I
> want to export my disks etc to impala.domain.no. But the problem with
> 2.2.x, x>6 (at least), is that impala will now announce animal.ntnu.no
> as it's name in public, so if I ssh out from it to another server it
> looks like I come from ntnu.no instead of domain.no (which is bad
> because I may use AllowHosts in my sshd_config), and if I try to mount
> an NFS share it has to be available to animal.ntnu.no in order to
> work.

Does your routing table have entries for eth0:1, eth0:2, etc?  If so, that 
might be how the machine is deciding which IP address to say that you're 
coming from.  Deleting those routes and making sure that there is only the 
route for eth0 might fix it.

Another possibility would be to have your nameserver use impala.domain.no as 
the primary name for each of the new IP addresses, so in your example, the 
name server entries would look like:

10.1.2.4 impala.domain.no webmail.domain.no #eth0:1 
10.1.2.5 impala.domain.no abc.example.com   #eth0:2
10.1.2.6 impala.domain.no animal.ntnu.no    #eth0:3

I'm not sure if that will work, because it depends on whether the other 
machine does a reverse lookup on your IP and compares it with the name in 
whatever config file is relevant (which will work because it will get back 
impala.domain.no for any of the addresses on that machine) or whether it does 
a lookup on the names in the config files and compares that with your IP 
(which won't because it will get back 10.1.2.3 for impala.domain.no and you'll 
be coming from 10.1.2.6).

I think the first case is more likely, but I don't know for sure.

				Jeff







More information about the Techtalk mailing list