{ "info": { "author": "Matej Vadnjal", "author_email": "matej.vadnjal@arnes.si", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: System :: Monitoring" ], "description": "# dhcpdoctor\n\nTool for testing IPv4 and IPv6 DHCP services\n\n![Logo](logo.png)\n\n## Description\n\ndhcpdoctor sends DHCP requests and checks if it gets an offer from DHCP server.\nIt supports BOOTP+DHCP for IPv4 (`-4`) and DHCPv6 for IPv6 (`-6`).\n\nIt can operate as a DHCP client by sending requests on the local network via\nbroadcast/multicast or as a DHCP client and relay in one tool by unicasting\nrequests to the specified IP address (`-s`). When relaying requests you can\nspecify the relay address to send from (`-f`). By default the IP address of\nthe interface request is sent from is used. When specifying custom relay from\naddress, keep in mind that the DHCP server will send the response back to the\naddress you specify here, so it must be an address on the machine you are\nrunning tests from.\n\nYou can specify a custom client MAC or DUID (`-c`). By default the MAC address\nof the interface to send request from is used.\n\nYou can specify the interface to send requests from with `-i`.\n\nProgram output and exit codes are Nagios/Icinga [compatible](https://nagios-plugins.org/doc/guidelines.html). Response time from DHCP server is measured and returned as performance data.\n\n## Requirements\n\ndhcpdoctor needs needs Python 3.4 or later to run.\n\nSince it uses [scapy](https://scapy.net/) under the hood to craft, dissect, send and receive packets, it needs root permissions to run.\n\n## Installing\n\nVia pip:\n\n```\npip install dhcpdoctor\n```\n\n## Icinga2 check command\n\nYou can use dhcpdoctor as a check command from Icinga2 or Nagios.\n\nThere is [dhcpdoctor.conf](dhcpdoctor.conf) config with a CheckCommand definition\nfor Icinga2 you can use. A service that uses this check command might look like\nthis:\n\n```\napply Service \"dhcpd6\" {\n import \"generic-service\"\n check_command = \"dhcpdoctor\"\n vars.dhcpdoctor_ipv6 = true\n vars.dhcpdoctor_client_id = \"00:11:11:11:11:11\"\n assign where host.dhcpd6\n}\n```\n\nIf you are building an RPM from provided [SPEC](dhcpdoctor.spec) file, the\nCheckCommand config will be installed to\n`/etc/icinga2/conf.d/check_commands/dhcpdoctor.conf`.\n\n## Developing\n\nWe use [poetry](https://poetry.eustace.io/) to manage Python dependencies and virtual environments.\n\nTo setup development virtual environment:\n\n```\npoetry install\n```\n\nRun the tool:\n\n```\npoetry run dhcpdoctor -h\n```\n\n[Vagrant](https://www.vagrantup.com/) can be used to quickly spin-up VMs with \nDHCP servers to test against:\n\n```\nvagrant up\nvagrant ssh dhcpdoctor\ncd /vagrant\npoetry run dhcpdoctor -h\nexit\nvagrant destroy\n```\n\nSee comments in [Vagrantfile](Vagrantfile) for more information.\n\n## Releases\n\n```\npoetry run bumpversion patch\n```\n\nInstead of patch you can give `minor` or `major`.\nThis creates a commit and tag. Make sure to push it with `git push --tags`.\n\nThe `dev-version.sh` script will bump the version for development or release as\nneeded (based on whether we are on a git tag or not) and is called in CI jobs.\n\n## Building\n\nHere is how to build `dhcpdoctor` using pyinstaller into a single binary file\nand then package that into a RPM for Red-Hat based systems. The resulting\nbinary is setuid root, because `dhcpdoctor` needs to work on privileged UDP\nports, but is usually run as a special user when invoked from Nagios or Icinga.\n\n```\npip3 install --upgrade bumpversion poetry pyinstaller\npoetry install --no-dev\npoetry run pip freeze | grep -v egg=dhcpdoctor > requirements.txt\npip3 install -r requirements.txt\n./dev-version.sh\n./build.sh\n```\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ArnesSI/dhcpdoctor", "keywords": "", "license": "MIT", "maintainer": "Matej Vadnjal", "maintainer_email": "matej.vadnjal@arnes.si", "name": "dhcpdoctor", "package_url": "https://pypi.org/project/dhcpdoctor/", "platform": "", "project_url": "https://pypi.org/project/dhcpdoctor/", "project_urls": { "Homepage": "https://github.com/ArnesSI/dhcpdoctor", "Repository": "https://github.com/ArnesSI/dhcpdoctor" }, "release_url": "https://pypi.org/project/dhcpdoctor/1.0.0/", "requires_dist": [ "scapy (>=2.4,<3.0)" ], "requires_python": ">=3.4,<4.0", "summary": "Tool for testing IPv4 and IPv6 DHCP services", "version": "1.0.0" }, "last_serial": 4893567, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c63053dbf061a70b24455191f0133625", "sha256": "2e9a3fdf48fdee2446dadc99e64b15196d7f7502eb48edff004043bb660a7aa6" }, "downloads": -1, "filename": "dhcpdoctor-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c63053dbf061a70b24455191f0133625", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4,<4.0", "size": 17462, "upload_time": "2019-03-01T13:44:36", "url": "https://files.pythonhosted.org/packages/1d/2e/425c73871526d13fc06c774ba5e164a2a39190f713e3a9f5cf3a4def20e4/dhcpdoctor-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8825174e2640c04712d08aa1747a9791", "sha256": "170bd4c15877a951a99793a42df667d19d1ffc3d9a672445587f6d1ce3bf108f" }, "downloads": -1, "filename": "dhcpdoctor-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8825174e2640c04712d08aa1747a9791", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4,<4.0", "size": 6685, "upload_time": "2019-03-01T13:44:38", "url": "https://files.pythonhosted.org/packages/93/fa/05ca31fb6305311c73c38d174e9081d109c65b4fc3c43caef197dd3474f2/dhcpdoctor-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "35ca8b5bdd42e90dc8fe9c98a0db9958", "sha256": "46109863f5ca8e05d5a201554d35eae91ce5685ee1ab0a4ee9bb1b03cd791577" }, "downloads": -1, "filename": "dhcpdoctor-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "35ca8b5bdd42e90dc8fe9c98a0db9958", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4,<4.0", "size": 18317, "upload_time": "2019-03-04T09:42:13", "url": "https://files.pythonhosted.org/packages/7b/12/7b584846562feb4ea7e3047c527407a68d248d65ab7113b6e63bded52802/dhcpdoctor-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d9160e58d903f4fe7376df4ed3617ebc", "sha256": "de69549b2a50d0d4fa961877b03a87178a018689edc26b62fd20ac220ba0fe45" }, "downloads": -1, "filename": "dhcpdoctor-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d9160e58d903f4fe7376df4ed3617ebc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4,<4.0", "size": 7750, "upload_time": "2019-03-04T09:42:15", "url": "https://files.pythonhosted.org/packages/a6/81/e2fb5d04373257f9fe34f5e1c5fd324d6dc8fa3bcc84005ff2ebbb1c4e91/dhcpdoctor-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "35ca8b5bdd42e90dc8fe9c98a0db9958", "sha256": "46109863f5ca8e05d5a201554d35eae91ce5685ee1ab0a4ee9bb1b03cd791577" }, "downloads": -1, "filename": "dhcpdoctor-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "35ca8b5bdd42e90dc8fe9c98a0db9958", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4,<4.0", "size": 18317, "upload_time": "2019-03-04T09:42:13", "url": "https://files.pythonhosted.org/packages/7b/12/7b584846562feb4ea7e3047c527407a68d248d65ab7113b6e63bded52802/dhcpdoctor-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d9160e58d903f4fe7376df4ed3617ebc", "sha256": "de69549b2a50d0d4fa961877b03a87178a018689edc26b62fd20ac220ba0fe45" }, "downloads": -1, "filename": "dhcpdoctor-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d9160e58d903f4fe7376df4ed3617ebc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4,<4.0", "size": 7750, "upload_time": "2019-03-04T09:42:15", "url": "https://files.pythonhosted.org/packages/a6/81/e2fb5d04373257f9fe34f5e1c5fd324d6dc8fa3bcc84005ff2ebbb1c4e91/dhcpdoctor-1.0.0.tar.gz" } ] }