new docs/how_to_reassign_a_static_ip_address_with_dnsmasq.md

This commit is contained in:
2017-07-22 11:21:17 -07:00
parent 6395cb3dab
commit 573b877940
18 changed files with 340 additions and 18 deletions

View File

@ -0,0 +1,28 @@
# How To Reassign a Static ip address with dnsmasq
On your router you can assign static ip addresses for various machines
in your network, by writing the reservations in the file `/etc/dnsmasq.conf`.
These will be in the form as below.
`dhcp-host=<mac address>,<ip address>`
So here's how you transfer an existing static ip address assignment to
a new client machine. Begin by editting the file `/etc/dnsmasq.conf` on
your router, and update the mac address associated with the intended
ip address.
Next, temporarily stop dnsmasq.
```bash
systemctl stop dnsmasq
```
Next shutdown networking on the new client machine. Shutting the machine down might work,
or the command `dhclient -v -r` might get the job done (you will lose the connection).
Now on the router, edit the file `/var/lib/misc/dnsmasq.leases`, and delete the pre-existing
lease for the old client machine that will no longer exist.
Restart dnsmasq on the router,
and then restart networking on the new client machine.

View File

@ -4,6 +4,7 @@ Obviously, the commit history will reflect the time when these documents are wri
* [Serve And Share Apps From Your Phone With Fdroid](serve_and_share_apps_from_your_phone_with_fdroid.md)
* [LXD Container Home Server Networking For Dummies](lxd_container_home_server_networking_for_dummies.md)
* [How To Reassign A Static Ip Address with dnsmasq](how_to_reassign_a_static_ip_address_with_dnsmasq.md)
* [Nspawn Containers](nspawn.md)
* [Mastodon on Arch](mastodon_on_arch.md)
* [Debian Nspawn Container On Arch For Testing Apache Configurations](debian_nspawn_container_on_arch_for_testing_apache_configurations.md)