|
From: | Vinu Gopalakrishnan |
Subject: | Re: [lwip-users] DHCP and Ethernet disconnection |
Date: | Tue, 10 Dec 2019 16:13:33 +0530 |
Hi Giuseppe,
On Tue, Dec 10, 2019 at 11:18:12AM +0100, Giuseppe Modugno wrote:
> I designed a network adapter board with Ethernet interface and lwip TCP/IP
> stack, with DHCP client enabled. It works well.
>
> What happens if I disconnect the Ethernet cable from one network and connect
> it to a second network where is a different DHCP server? Mainly if the first
> network works on different address range (for example, 192.168.1.x and
> 192.168.2.x with 255.255.255.0 netmask).
>
> I tried and it appears lwip/DHCP client doesn't trigger a new DHCP request
> and continue working with the first IP address... so it doesn't work on the
> second network.
It does, but you will have to tell lwIP that network changed if you
don't want to wait for the next lease update.
See netif_set_link_down() / netif_set_link_up() to retrigger DHCP start.
Sylvain
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |