Nп/п : 53 из 60
 От   : Don Y                               2:5075/128        08 сен 23 03:20:41
 К    : Theo                                                  08 сен 23 13:24:01
 Тема : Re: Configure network of an embedded device
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 1@dont-email.me> f686be96
@REPLY: JMRpz@news.chiark.greenend.org.uk>
e5119ee1
@REPLYADDR Don Y <blockedofcourse@foo.invalid>
@REPLYTO 2:5075/128 Don Y
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 1@dont-email.me>
@RFC-References: 1@dont-email.me>
FNJpz@news.chiark.greenend.org.uk> 2@dont-email.me> lzOpz@news.chiark.greenend.org.uk>
3@dont-email.me> JMRpz@news.chiark.greenend.org.uk>
@TZUTC: -0700
@PID: Mozilla/5.0 (Windows NT 6.1; Win64; x64;
rv:102.0) Gecko/20100101 Thunderbird/102.2.2
@TID: FIDOGATE-5.12-ge4e8b94
On 9/8/2023 2:17 AM, Theo wrote:
> Don Y <blockedofcourse@foo.invalid> wrote:
>> On 9/7/2023 11:40 AM, Theo wrote:
>>>> How does the device know if send a DHCP request (to receive an IP
>>>> address from an external DHCP server) or launch a DHCP server?
>>>> Maybe it can try a DHCP request a revert back to internal DHCP server if
>>>> that fails.
>>>
>>> The device out of the box is a DHCP server.  Once somebody logs into it and
>>> configures it, it reboots to become a DHCP client.  To revert back to being
>>> a DHCP server again somebody has to hold down the factory reset button.
>>> (or equivalent physical signal, eg smart lightbulbs you have to turn them on
>>> and off several times in a predefined sequence of flashes)
>>
>> How do you address the case of your (GUI) client discovering some other
>> DHCP service running on the network?

> You plug your widget into your laptop directly, with a cable, or connect to
> its own wifi SSID.  The network contains exactly two devices, the widget and
> your laptop (/desktop/phone/whatever).  If you normally use that interface

Ah, OK.  This is how I typically set up such devices -- I find it
annoying that I can`t just plug into my existing network (which
is where it will ultimately reside) and access it with my normal
suite of tools.  E.g., figuring out where in the address space
I want it to reside, copying its MAC to ethers(4), making an
entry in the DNS, etc.

(I rarely use a laptop for anything OTHER than setting up network
access on devices)

Given a device that has a separate (e.g., EIA232) "console port",
I much prefer that means of initialization as I can just tip(1)
to the device and copy configuration data to and from the rest of
the network`s configuration.

> (ethernet or wifi) to connect to your LAN, you have explicitly unplugged so
> there is no connectivity to the LAN and no chance of things getting
> confused.

> If you run both interfaces together (eg plug into the widget via ethernet,
> while having wifi running to the LAN) that will work as long as widget and
> routable LAN IP addresses don`t overlap.  This is safer with IPv6 since
> there`s a much wider range of private addresses to choose from, so you pick
> a private range (from fd00::/8, ie 2^120 addresses) and chances are good
> it`s not used by the LAN.

>> If you could modify the *client* code, you could use something like
>> a different vendor magic to ensure only the server in the device
>> would be recognized.
>>
>> You could flip this around; distribute an app that acts as a
>> special DHCP server.  Have the device only issue requests to
>> services offered by *that* server (even if another was
>> competing -- see above).

> Offering a DHCP server likely requires administrator privileges, which the
> user may not have[*].  It will also mess up the LAN if they ever connect back
> to it while the DHCP server is running (since now there are two DHCPs on the
> LAN).

I have assumed using "bad magic" would keep other clients
off of THAT server.  You could also move it to an "unassigned"
port as you have control over the device`s client(s).

> [*] setting a static IP on the interface also requires admin privs, so
> schemes where the device responds at some fixed address like
http://192.168.33.99/ where you need to configure your laptop for
> 192.168.33.0/24 also require admin privs

Yes, it`s annoying to have to change anything other than
the device in question when you`re trying to set up the device
in question.  It tells the user that the device is their sole
focus, regardless of the rest of their existing network.

[And, means you have to deal with each device individually,
AT the device]

 --- Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
 * Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх