[LUGSB] Multiple IPs on one NIC + DNS problem
James Crasta
jcrasta at gmail.com
Thu Feb 25 11:38:17 EST 2010
On Thu, Feb 25, 2010 at 11:16 AM, Michael Hart <mhart at cs.sunysb.edu> wrote:
> Hello all,
>
> I set up and used multiple IPs on several NICs on my lab successfully.
> The unintended consequence was that the machines were no longer accessible
> outside the lab (i.e. ping / ssh / etc. didn't work). Why is this the
> case? The DNS works after I shut down the interfaces. Is the problem at
> the router or dns? Any ideas or suggestions would be extremely helpful.
> We are using Bind9 in our laboratory. The machines are assigned their IP
> address over DHCP based on their MAC address. The command I used to add
> IP aliases is:
>
> sudo ifconfig eth0:0 W.X.Y.Z up
Just to clarify, when you say "the machines were no longer accessible
outside the lab" do you mean you couldn't SSH from other places in to
machines in your lab, or that the machines in your lab couldn't
connect out to the internet?
Also, what is the nature of your network setup? Are all the machines
behind a NAT, or does each machine have an routable IP? In addition,
are the virtual interfaces you set up on a different subnet from the
"primary" (dhcp-assigned) information?
Usually, when you use virtual interfaces, it's difficult to get this
play nice with the DHCP-assigned primary IP. What happens usually is
that the default route gets incorrectly set, causing issues at network
borders, as you observed. However, that usually happens for outgoing
connections, not incoming ones, which is why I asked for
clarification.
A quick test would be to run "sudo route -n" both before and after
adding the secondary IP's, and to see if any routing information
changes when you do that. What you probably want is to have the
default route set for the primary IP, as well as possibly a separate
subnet route for the other IP's. This may require you to use manual
configuration for all IP's on that machine, ie not use the DHCP client
on that machine at all.
James
More information about the lugsb
mailing list