Network Setup Question

Doug Hardie bc979 at lafn.org
Sat Nov 11 06:18:52 UTC 2006


On Nov 10, 2006, at 20:26, Lane wrote:

> On Friday 10 November 2006 21:56, Doug Hardie wrote:
>> On Nov 10, 2006, at 19:34, Jonathan Horne wrote:
>>> On Friday 10 November 2006 19:17, Doug Hardie wrote:
>>>> I have a bit of an unusual network setup situation.  I have a  
>>>> machine
>>>> that is only used to store backups.  It gets moved around to
>>>> different locations occasionally so it has to be able to live on a
>>>> 192.168.1.x or a 10.0.1.x network without reconfiguration.  I also
>>>> need a fixed last address byte so I can connect to it remotely.  I
>>>> initially set it up with DHCP and then used an alias for the .250
>>>> address on both networks.  That worked, but caused problems for the
>>>> local network in one location.  The particular user couldn't
>>>> understand why sometimes his computer got different IP  
>>>> addresses.  So
>>>> I tried to establish the 192.168.1.250 as the primary address and
>>>> added an alias of 10.0.1.250.  That works  in both environments
>>>> except that there is no default route.  Is there a way to negotiate
>>>> just a default route via DHCP and not an IP address? or is there a
>>>> way to set the default route based on which IP address is in use?
>>>> Thanks.
>>>> _______________________________________________
>>>
>>> dhclient.conf can get pretty granular as to exactly what you want
>>> from your
>>> DHCP server.  myself, i use it to get everything, but to ignore the
>>> domain
>>> search mine tries to provide.
>>>
>>> man dhclient.conf and you will see tons of options (and some really
>>> good
>>> examples too).
>>
>> There are lots of options all right, but I couldn't find anything
>> that would cause it not to negotiate the IP address.  All of the
>> other options are configurable.
>> _______________________________________________

> I'm no expert, but it seems to me that your requirements are a  
> little too
> optimistic.
>
> If I understand correctly, you want this machine to be able to  
> connect to
> multiple heterogenous networks, and always get the same last byte  
> for its ip.
>
> The only way to do that reliably, in my mind, is to have each dhcp  
> server on
> each network assign a static address based upon the MAC address of  
> your
> computer.

Thats a bit much for the particular users who are housing this  
computer temporarily.  Its bad enough that they have to put an  
address translation in their router to enable me to get to the .250  
address.  At least I can fairly easily walk them through that.

>
> If you do not have access to the DHCP server configuration on a  
> particular
> network then you must manually configure the nic.

That can only be done if you can access the machine which you can't  
in this setup since there is no default route.

>
> Assuming that you know the universe of networks that you will  
> connect to ...
> say 3 or 300 possible networks ... then you could write a script
> in /usr/local/etc/rc.d to test various network configs ... but you  
> might be
> better off just manually configuring the nic and moving on, as you  
> cannot
> guarantee that the terminal byte of the ip will be available on any  
> given
> network.  IP just doesn't work that way.'

There are only a very small number of locations for this machine,  
less than 5.  However, its possible that at any time a new one might  
be necessary.  This is an off-site backup machine and there needs to  
be someone available if we need to retrieve it.  It can't be  
unavailable for a couple weeks.

>
> I'd be interested in any solution you may scare up, as I am faced  
> with a
> similar situation.  My solution is to just use static assignment,  
> with an
> identifiable NETBIOS name in Samba.

I am going back to the old configuration with a regular DHCP  
connection and then two static aliases: one for the 192 and one for  
the 10 addresses.  That works but causes one particular user fits.  I  
will just have to try and teach him that IP addresses will change as  
his DHCP reassigns them.  He will have to check his computer's  
address and not just presume.

Thanks for all the ideas.



More information about the freebsd-questions mailing list