dhcp

How do you reliably get an IP address via DHCP?

I work with embedded Linux systems that sometimes want to get their IP address from a DHCP server. The DHCP Client client we use (dhcpcd) has limited retry logic. If our device starts up without any DHCP server available and times out, dhcpcd will exit and the device will never get an IP address until it's rebooted with a DHCP server v...

How do I run a script when ip-address changes (most likely using a dhclient hook) on a (Ubuntu) Linux machine?

Hi, I have a script which contacts a few sources and tell them "the IP-address XXX.XXX.XXX.XXX is my current one". My test web server has a dynamic IP-address through DHCP and amongst other things it needs to update a DDNS entry when its IP-address changes. However it's not the only thing it does, so I will need to run my own custom scr...

Using glibc, why does my gethostbyname fail after I/DHCP has changed the DNS server?

If our server (running on a device) starts before a DHCP lease had been acquired then it can never connect using a hostname. If that happens it can find hosts by IP address but not by DNS. I initially thought that the Curl DNS cache was at fault as the curl connections failed. But I used CURLOPT_DNS_CACHE_TIMEOUT to prevent curl from c...

How do I find the DHCP assigned IP address via bash on Fedora?

Is there a command within the bash shell of fedora that will give me the currently assigned IP address? ...

Recovering from ipconfig /release on a remote PC

Not strictly a programming question, but I was programming at the time and couldn't find an answer, so I thought, "Hey, I'll give StackOverflow a try!" So I'm connected to my Windows XP work PC over a Remote Desktop connection through VPN. In a command window (on the remote PC), I foolishly type ipconfig /release. A split second befor...

How can openvpn deal with both dynamic and fixed IP addresses?

I have an OpenVPN server that dynamically assigns IP addresses (dhcp-style) to its clients. The address range is specified with a --server directive in the config file. I need to exclude a small number of addresses within that range and reserve them for clients that need to fixed IP addresses. I suppose I need to modify the config file c...

DHCP Setting in Mac OS X

Are there any command line interfaces to the DHCP settings in Mac OS X? I have found that inside System Profiler, the Network tab provides a lot of useful information, but I have not found any documentation about any command line equivalents. ...

Windows Client Choose between 2 DHCP servers in the same lan.

I have two DHCP in the same network. One with IPs 10.0.0.0 and the Other 192.168.0.0. How do I configure my windows XP to choose between one of them. Thanks ...

Why have DHCP and static IP address at the same time?

At my current place of employment, on my Windows box, when I do an ipconfig /all from my command prompt I see that I have both a static IP address as well as a dynamic IP address. Why could that be? I am trying to diagram our network structure for a new software project that I'm on...knowing the answer to this question could help out a l...

Headless Linux -> broadcast IP to Windows workstation?

Hello I'd like to sell headless Linux servers to SOHO users. Typically, they'll have a DHCP-capable ADSL modem cum switch to which they'll connect their workstation and the server. In order to just show up with the server, I need to find a way to just plug the server into the switch to get an IP address from the modem, and then have th...

DCHP with database backend

Hi people. Here my first question :P. I am developing some little projectes. I want to change dhcp server rules of IP/MAC without rebooting the server (In a dinamic infrastructure). I think that the best solution is to use a dhcp server with a database backend, in order to change the SQL information (With an easy JDBC client). But I ...

NotifyAddrChange keeps generating events

I've been trying to detect the arrival of a new RNDIS device (Windows Mobile phone) using NotifyAddrChange(). This works, in the sense that I can wait on the event and then call GetAdaptersAddresses(). However, the event keeps firing but nothing seems to change. I'm not sure what causes this. Speculation: Could it be that when RNDIS al...

Windows 2003 routing/firewall/dhcp/... problem ?

I have a problem with the availability of server from the outside (from local network all works perfect). A key problem is the http, where the requests are carried out but only if the response is less than a certain number of KB. - if accessed via browser from the outside, only the request less than or equal to 4KB are responsed - if acc...

Detecting remote DHCP servers in .NET

Using Hyper-V I built a private windows domain which is fenced off from our main network. Ultimately I want to provision this domain for others to use for dev and test, so they can be domain admin. The domain controller is running the dhcp service (other systems in my domain have dependencies on dhcp). The problem is, if some idiot (i....

Acquire an IP address from dhcp server for my C# app - Like Virtual Machines

Hi, I'm developing an application of multiple socket connections (a TCP alarm watcher). Currently, in order to mock the alarms, i made small applications running on a VM Machine (that is, because the Vm have a different IP) that simulate the alarm endpoints. What I want to do is to mock the alarms in the same machine I'm running my "ser...

Programatically Create DHCP Reservation in C#

I have been assigned the task of creating an application that takes in a MAC address and creates a DHCP reservation for that MAC address. Is there any API built into .NET to easily accomplish this? Thanks, Matt ...

Linux ioctl -> how to tell if current IP was obtained by dhcp

Hello all, I'm fiddling with the sockets ioctl's to get the current interfaces setup and I can already get the IP, interface name, netmask and check if the interface is up or down, (I just do IOCTl to SIOCGIFCONF, SIOCGIFNETMASK and SIOCGIFFLAGS). I am looking for a way to tell if my current IP address was obtained through dhcp or if ...

DHCP on busybox

Hello, I am working on embedded device who run BusyBox. The system is getting its address by using the ip command. I want to figure out from my C program whether the device ip static or received from DHCP server. How do I do that ? amit ...

sending DHCPINFORM message from non-DHCP client

Suppose I have static ip in a subnet that has DHCP server. If i gonna send DHCPINFORM message to the server, what will happen ? amit ...

Reboot of DHCP-Server results in a mess of Client-IP-Addresses

Hi friends, in my network at home, driving some ubuntu-pc's one of them is dhcp-server running dhcp3-server. If i reboot this pc all the clients are going offline with a ahavi-ip-address (169.254...). what is going on during the short downtime of the dhcp-server, what is wrong on which side: client or server? Peace Ice ...