[Top][All Lists]

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

[lwip-users] 2 netifs dhcp problem

From: fred
Subject: [lwip-users] 2 netifs dhcp problem
Date: Fri, 9 Nov 2012 00:07:35 -0800 (PST)

Hello Forum

i am facing a problem by using 2 netifs and dhcp client of lwip. My calling
sequence looks like this:

1. Ethernet driver initialize his netif_ET first of all with static Ip where
everything is
2. Now i read out a from flash that i want to use dhcp or static config, so
i call dhcp_start or netif_set_up with netif_ET
3. I also check the link status of my controller so i call when link is down
dhcp_stop and when its up again dhcp_start
4. netif_ET gets the IP configuration from dhcp server and works fine. 

I must say all of my calls are thread safe using tcpip_callback.

5. Now i have a second device which initialize its own netif lets call it
netif_UB. For this netif there is a dhcp_server which sets the ip
configuration but this netif does not(never) uses the dhcp client
(dhcp_start). The dhcp server says "this is your ip configuration" and I set
it only static by using netif_set_up.

What i observed:
-When i start the netif_ET by using static configuration with netif_set_up
both netifs work fine.
-When i start the netif_ET with dhcp_start, netif_UB will only work when
netif_ET got configured by a dhcp server. If netif_ET is not configured lets
say no link so no dhcp_start, netif_UB is not working with netif_set_up.
-When netif_ET obtains an configuration of a dhcp server, netif_UB gets
problems with tcp packets (i only get ACK and RST)

Are there rules which i have to take care of by using 2 netif's ? Normaly
the netifs should work seperatly. I also take care that they are not in the
same subnet.

What is the netif_default for? Do i have to set one of them
default?both?would it make problems to set both default?


View this message in context: 
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

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