Sunday, July 31, 2016

instant dhcp server with dnsmasq

if you want to assign ip address using dhcp to other device and you don't want to edit any configuration you can use dnsmasq and run it on terminal with the ip address range you and to assign.

- for example you want give out address with gateway and dns server, so you run the following command

$ sudo dnsmasq --dhcp-range=, \
    --dhcp-option=3, --dhcp-option=6,

- or if want to run on an interface and you want create a script to run it. for example on vmnet3 that address ip address as the gateway for our clients, so the script will look like below

ifconfig vmnet3 up
dnsmasq -i vmnet3 --dhcp-range=, \
    --dhcp-option=3, --dhcp-option=6,

you can save it as and run it as
$ sudo sh

No comments:

Post a Comment