{ "info": { "author": "Pier Carlo Chiodi", "author_email": "pierky@pierky.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: System :: Networking" ], "description": "mac-to-peer\n===========\n\n|PYPIVersion| |PythonVersions| |BuildStatus| |Coveralls|\n\nAutomatically fetch MAC/IP address tables (ARP and IPv6 neighbors) from devices and build MAC address to BGP peer ASN mappings.\n\nParticularly focused on building **pmacct**'s *bgp_peer_src_as_map* `file `__.\n\n.. code::\n\n router1#show ip arp\n Protocol Address Age (min) Hardware Addr Type Interface\n Internet 192.0.2.1 101 0000.5E00.5300 ARPA TenGigabitEthernet0/0/0\n \n router1#show bgp ipv4 unicast neighbors 192.0.2.1\n BGP neighbor is 192.0.2.1, remote AS 65536, internal link\n ...\n\nExpected: **00:00:5E:00:53:00** -> **AS65536**\n\nJSON output format:\n\n.. code::\n\n $ mactopeer -u pierky -p - --hostname router1.example.com\n Enter password:\n {\n \"router1.example.com\": {\n \"00:00:5E:00:53:00\": {\n \"ifaces\": [\n \"TenGigabitEthernet0/0/0\"\n ],\n \"ip_addrs\": [\n \"192.0.2.1\"\n ],\n \"peer_asns\": {\n \"65536\": {\n \"description\": \"my-peer\",\n \"ip_addrs\": [\n \"192.0.2.1\"\n ]\n }\n }\n }\n }\n }\n\npmacct output format:\n\n.. code::\n\n $ mactopeer -u pierky -p - --devices device.json -f pmacct\n Enter password:\n id=65536 ip=203.0.113.1 src_mac=00:00:5E:00:53:00\n\nInstallation and dependencies\n-----------------------------\n\nInstall the program using pip:\n\n.. code::\n\n pip install mactopeer\n\nThe script uses the `NAPALM `__ library to connect to network devices and to fetch data from them: you must install the whole library...\n\n.. code::\n\n pip install napalm\n\n... or at least the subset of network drivers needed to connect to the devices you actually need:\n\n.. code::\n\n pip install napalm-ios napalm-junos\n\nFor more details, the full list of network drivers and their dependencies please see the official `NAPALM documentation `__.\n\nUsage and features\n------------------\n\nThe ``--help`` shows all the options this program offers. See `its output in USAGE.rst `__.\n\nA list of devices can be provided using an input JSON file: for details about its schema please run ``mactopeer --help-devices``. See `its output in USAGE.rst `__.\n\nFilters can be set to skip entries on the basis of their MAC address, IP address or resulting peer ASN. Useful to exclude iBGP sessions or to handle exceptions.\n\nMultithreading is also supported to fetch information from more than one device concurrently.\n\nThe list of supported devices can be found in the `Supported Devices `__ section of the NAPALM's documentation website. All those implementing the ``get_arp_table`` and ``get_bgp_neighbors`` methods should work: at time of writing they are EOS, IOS, IOSX-R, JunOS, NXOS, VyOS.\n\nIntegration with PeeringDB\n++++++++++++++++++++++++++\n\nThe ``--use-peeringdb`` argument can be used to fetch missing peers' ASNs from PeeringDB, for example in case of multi-lateral peering (such as route servers at IXPs). In this case, routers have not a straight mapping between IP address and BGP neighborship, so the IP address is used to look into PeeringDB records to find the network which is using it.\n\nCaveats\n-------\n\n- Currently VRF support is missing, mostly because it's not included in NAPALM yet.\n- IPv6 neighbors table can only be fetched if a not yet released version of NAPALM is used, that is one which includes `this pull request `__. To avoid the ``WARNING - Skipping IPv6 neighbors table`` message please use the ``--arp-only`` argument.\n\nAuthor\n------\n\nPier Carlo Chiodi - https://pierky.com/\n\nBlog: https://blog.pierky.com/ Twitter: `@pierky `_\n\n.. |PYPIVersion| image:: https://img.shields.io/pypi/v/mactopeer.svg\n :target: https://pypi.python.org/pypi/mactopeer/\n.. |PythonVersions| image:: https://img.shields.io/pypi/pyversions/mactopeer.svg\n.. |BuildStatus| image:: https://travis-ci.org/pierky/mactopeer.svg?branch=master\n :target: https://travis-ci.org/pierky/mactopeer\n.. |Coveralls| image:: https://coveralls.io/repos/github/pierky/mactopeer/badge.svg?branch=master\n :target: https://coveralls.io/github/pierky/mactopeer?branch=master\n\n\nChange log\n==========\n\nv0.3.0\n------\n\n- Improvement: made ``use_peeringdb`` an attribute of devices' declaration.\n\n- Improvement: some fixes.\n\nAlso, the tool can be used as a library now.\n\nv0.2.0\n------\n\n- New: IP based filters extended to the use of prefixes too.\n\n- New: ``--use-peeringdb`` argument to fetch missing peers' ASNs from PeeringDB (e.g. in case of multi-lateral peering at IXPs).\n\nv0.1.0\n------\n\nFirst release.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/pierky/mactopeer", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pierky/mactopeer", "keywords": "BGP,IP Routing,pmacct,bgp_peer_src_as_map", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "mactopeer", "package_url": "https://pypi.org/project/mactopeer/", "platform": "", "project_url": "https://pypi.org/project/mactopeer/", "project_urls": { "Download": "https://github.com/pierky/mactopeer", "Homepage": "https://github.com/pierky/mactopeer" }, "release_url": "https://pypi.org/project/mactopeer/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Automatically fetch MAC/IP address tables (ARP and IPv6 neighbors) from devices and build MAC address to BGP peer ASN mappings.", "version": "0.3.0" }, "last_serial": 3213234, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1b7f632e7b86c07ebf3198c3efff68df", "sha256": "6ed0d09017be3b1f062d6046bf2eea8a4cda445b0a22da3dc7d7318246aa740e" }, "downloads": -1, "filename": "mactopeer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1b7f632e7b86c07ebf3198c3efff68df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9378, "upload_time": "2017-09-25T16:38:09", "url": "https://files.pythonhosted.org/packages/1b/fe/879ca5ffb64276866ab7f992d880f927ce3fbca920a290bccc533b8b2225/mactopeer-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "19e9a0c1325bf1b499132519eabb1bb3", "sha256": "c39aebca2118caf44c2d835dd0d825da19b1e0b90d442980636704488af56629" }, "downloads": -1, "filename": "mactopeer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "19e9a0c1325bf1b499132519eabb1bb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12845, "upload_time": "2017-09-26T16:59:34", "url": "https://files.pythonhosted.org/packages/30/bc/3e259813fcaf31e0904517fbae1f86da62be7a036048d3b65114612ccd2f/mactopeer-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "dd9d5e0f19bdc3d360590fc47e5403d8", "sha256": "3a79349ac5a0c78eab5893ba097a010ca4539c0871d9e8174ee919ddc4bb0c00" }, "downloads": -1, "filename": "mactopeer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "dd9d5e0f19bdc3d360590fc47e5403d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33248, "upload_time": "2017-09-29T16:33:56", "url": "https://files.pythonhosted.org/packages/cf/ac/0746e6f1faeac553b3cfd5b9569ce4c13477212099c1d0fee3fe95c37066/mactopeer-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dd9d5e0f19bdc3d360590fc47e5403d8", "sha256": "3a79349ac5a0c78eab5893ba097a010ca4539c0871d9e8174ee919ddc4bb0c00" }, "downloads": -1, "filename": "mactopeer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "dd9d5e0f19bdc3d360590fc47e5403d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33248, "upload_time": "2017-09-29T16:33:56", "url": "https://files.pythonhosted.org/packages/cf/ac/0746e6f1faeac553b3cfd5b9569ce4c13477212099c1d0fee3fe95c37066/mactopeer-0.3.0.tar.gz" } ] }