Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2013 12:06:48 -0700
From:      Kurt Buff <kurt.buff@gmail.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Network Question
Message-ID:  <CADy1Ce5Y7x-acw6AKNrQLK6BXVa55XdAUSHehhOUyiMAcrhKcw@mail.gmail.com>
In-Reply-To: <CA%2BtpaK24iobh5RzJ_JZ_3HO1U-3tcnTOkfNRNaDHUQtAtaw8bA@mail.gmail.com>
References:  <CAOtnnwvU=n55PtRpw6KWwt9uEMqHj=3PJu3KBimAde0EW39rjg@mail.gmail.com> <CA%2BtpaK24iobh5RzJ_JZ_3HO1U-3tcnTOkfNRNaDHUQtAtaw8bA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 12, 2013 at 11:51 AM, Adam Vande More <amvandemore@gmail.com> wrote:
> On Thu, Sep 12, 2013 at 1:45 PM, Daniel Nang <daniel.nang01@gmail.com>wrote:
>
>> Hello,
>>
>> I have two computers, both running FreeBSD, accessing the
>> web via DHCP from the router. The setup looks like this:
>>
>>
>>                                        Internet
>>                                             |
>>                                             |
>>                                             |
>> machine1.example.com --- Router --- machine.2.example.com
>>          - DHCP -                                            - DHCP -
>>
>>
>> Both computers can access the internet with no problems.
>> So far so good...
>>
>> My question is, if I can simultaneously have the computers access
>> the net as in the given picture and also let them communicate with
>> each other e.g. via ssh?
>>
>
>
> machine1# ssh `ip of machine2`


There's the rub. How do you determine the IP address of the other machine?

DHCP, unless configured with reservations, doesn't guarantee IP
addresses to remain the with machines that request addresses.

So, there are two ways to solve this problem:

o- As I mention above, use reservations in DHCP to tie IP addresses to
MAC addresses - this is a fairly manual process, and doesn't scale
beyond a few machines..

o- Use a DNS/DHCP solution whereby DNS is dynamically updated with an
IP address by the DHCP server when a machine leases an IP address to a
machine. This requires some work up front, but then takes care of
itself, so scales fairly well.

Kurt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADy1Ce5Y7x-acw6AKNrQLK6BXVa55XdAUSHehhOUyiMAcrhKcw>