lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] DHCP and Ethernet disconnection


From: Sylvain Rochet
Subject: Re: [lwip-users] DHCP and Ethernet disconnection
Date: Tue, 10 Dec 2019 11:35:11 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]