This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Re-enabling DHCP and NetBios

Hi all,

In my system, I am using a static IP address, but also searching for a DHCP server every 10 seconds or so by re-enabling the DHCP client for a bout half a second. This works a treat, but it seems that once the ARM reconfigures its IP address I can no longer use the host name to log ping the device or log on to its web page.

I guess there are probably good reasons for this, but I wondered if any one knows why or of a work around as its very useful to type the host name when you don't know the device's IP address!!

I'm using TcpNet

  • Try enabling the Send Notification on Address changes in the Net_Config.c file. When your TCPnet system changes the IP address, it sends a Gratuitous ARP notification. This might help the PC to register the new IP address.

    However Win-XP seems to ignore it and still caches the old IP address. So if you want to access the board after the IP address of the board has changed, you need to flush the ARP/IP cache on your PC. For the Win-XP, click on Repair for the Local Area Connection.

  • Hi,

    Thanks for your suggestion. Unfortunately setting that option in net_config.c didn't work in either XP or Win7. Repairing the connection did however. I guess there isn't much that can be done! Thanks for your suggestion!

  • Why is this a problem? Why have a device that will be seen by the PC with two IP addresses? In real-life, it would normally not be using a DHCP server, in which case the PC would find it using the fixed IP. Or it would directly find a DHCP server and the PC wouldn't have a reason to cache the fixed IP.

    Another thing - most DHCP servers supports serving of fixed IP numbers to known MAC addresses, in which case you can make sure that the DHCP server sends out the same IP number that you had already statically configured your device with.

    It really is not normal for equipment to change their IP address after other devices have started to access them.

  • I want to make the device act the same as a PC - if I plug my PC into a switch without a DHCP server it will give itself a link local address. If I then plug my DHCP router into the switch, the PC can still talk to the DHCP server and get an IP address.

    So I get the device to give itself a static link local address, but still search for a DHCP server - is this a bad way of doing it?

  • But do you try to access such a PC using that link-local IP and then again after it have received a DHCP-assigned IP? That would most definitely not be a normal usage case for a PC. So why should it be a normal usage case for your device?

  • The device is only accessed using our dedicated software or web page, in which case it would stop searching for a DHCP server and stick with the link local address.

    The problem is that ,we cant just use DHCP as if there isnt one available you could never talk to the device, we cant do what the examples do and wait a few second on startup for one and then use another static address because these devices are in the environment where there could be a power cut, and if a DHCP server is used it could startup quite a bit after our devices.

    Is there a better solution you can think of to this problem?