Posts

Showing posts with the label DHCP

Deploy OpenWRT as DHCP and DNS VNF on OpenStack Tacker

The OpenWRT management driver of Tacker VNFM currently only supports the firewall and network service. That raises a need to update that driver so that we can deploy more network services as VNF using OpenWRT. So to achieve the goal of this blog post, I have to do as follow: 1. Update the OpenWRT VNFM management driver . I just submitted a blueprint on launchpad to work on it. Hopefully, it will be approved soon: Blueprint:  https://blueprints.launchpad.net/tacker/+spec/advanced-openwrt-driver Code review: https://review.openstack.org/#/c/540310/2 Here is a quick change: modify this file  /opt/stack/tacker/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py at line 94                 KNOWN_SERVICES = ('firewall', 'network')  to                 KNOWN_SERVICES = ('firewall', 'network', 'dnsmasq')  2. Use this VNFD template to deploy the DHCP and DNS services on Tacker Notice: I d...

Windows DHCP Server - Clean ReservedIP Addresses

Image
To clean all the reserved IP addresses on a Windows DHCP server (my-srvr): 1. Dump configuration of that server to origin.cfg by running the following command on windows: netsh dhcp server \\my-srvr scope 172.40.0.0 dump > C:\origin.cfg 2. Read the config file, get the reserved ip part, remove "Add" with "delete", and then write them to a new config file names new.cfg. Using python to do all of those: def create_del_ri_cfg(org_path, out_path):     org_file = open(org_path, 'rb')     cfg = org_file.read()     org_file.close()     ri_pos = cfg.index('#  Start Add ReservedIp')     cfg = cfg[ri_pos:]     cfg = cfg.replace('Add', 'delete')     out_file = open(out_path, 'wb')     out_file.write(cfg)     out_file.close() 3. Execute the new config file to delete all reserved ip addresses of my-srvr: netsh exec C:\new.cfg (source: h...

M$ DHCP Server - Reserved IPs synchronization between servers

Image
Although the M$ DHCP Server does not allow you to synchronize the reserved IP(s) with other DHCP servers, but If you want, you can do it with a small trick: 1. Export the dhcp config of the master server by the command (in the command prompt windows): netsh dhcp server \\master-server-name scope 172.90.0.0 > C:\master.cfg The config file are something like this: