Network Question

Kurt Buff kurt.buff at gmail.com
Thu Sep 12 19:06:51 UTC 2013


On Thu, Sep 12, 2013 at 11:51 AM, Adam Vande More <amvandemore at gmail.com> wrote:
> On Thu, Sep 12, 2013 at 1:45 PM, Daniel Nang <daniel.nang01 at 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


More information about the freebsd-questions mailing list