dvl@
Developer
My laptop connects to my home network in one of two says:
When connected directly, the laptop gets an IP address of 10.55.0.60. Through OpenVPN, it gets 10.8.1.60. It's not feasible to give it the same address in both situations because I'd have to get into bridging, and I really don't need that.
The main objective: laptop.example.org always resolves to the correct IP address, whichever one is in use at the time.
So far:
My DNS and DHCP servers setups are similar to that described in Dynamic DNS with BIND and ISC DHCP SERVER.
My OpenVPN server is set up to use the --learn-address option.
The scenario I can't get my head around:
- connect in via OpenVPN, laptop.example.org gets set to 10.8.1.60
- disconnect from OpenVPN (probably just close the lid, so there's no actual shutdown)
- come home, connect via WIFI
- get assigned 10.55.0.60
In this situation, the A record already exists, and is set to 10.8.1.60 (from the OpenVPN session). Does DNS know to delete the old record and replace it with a new record? I think it is not doing this, because of the following log entry I keep seeing:
I think this log entry indicates that DHCPD thinks: Yes, there is an A record in there, but I didn't create it (i.e. Because there is no DHCID on that record, I know I didn't create it), so I'm not going to amend it because something is wrong.
I suspect this particular A record is left over from my non-ddns days and it does not necessarily indicate an incorrect configuration.
I know that updates work; I've tested them already.
Stay tuned for tonight when I try again. This time, I've deleted that old A record via nsupdate.
- directly
- OpenVPN
When connected directly, the laptop gets an IP address of 10.55.0.60. Through OpenVPN, it gets 10.8.1.60. It's not feasible to give it the same address in both situations because I'd have to get into bridging, and I really don't need that.
The main objective: laptop.example.org always resolves to the correct IP address, whichever one is in use at the time.
So far:
My DNS and DHCP servers setups are similar to that described in Dynamic DNS with BIND and ISC DHCP SERVER.
My OpenVPN server is set up to use the --learn-address option.
The scenario I can't get my head around:
- connect in via OpenVPN, laptop.example.org gets set to 10.8.1.60
- disconnect from OpenVPN (probably just close the lid, so there's no actual shutdown)
- come home, connect via WIFI
- get assigned 10.55.0.60
In this situation, the A record already exists, and is set to 10.8.1.60 (from the OpenVPN session). Does DNS know to delete the old record and replace it with a new record? I think it is not doing this, because of the following log entry I keep seeing:
Code:
dhcpd: Forward map from laptop.example.org to 10.55.0.60 FAILED: Has an address record but no DHCID, not mine.
I think this log entry indicates that DHCPD thinks: Yes, there is an A record in there, but I didn't create it (i.e. Because there is no DHCID on that record, I know I didn't create it), so I'm not going to amend it because something is wrong.
I suspect this particular A record is left over from my non-ddns days and it does not necessarily indicate an incorrect configuration.
I know that updates work; I've tested them already.
Stay tuned for tonight when I try again. This time, I've deleted that old A record via nsupdate.