Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New http pull methode #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bierchermuesli
Copy link
Contributor

@Bierchermuesli Bierchermuesli commented Dec 6, 2022

I would like contribute another way for deploying large prefix lists. Instead of pushing the configuration, the prefix set can be pulled from the router itself like:

  • copy http://203.0.113.1/pfxgen/42 running-config (default syntax)
  • or
  • copy http://203.0.113.1/pfxgen/iosxr/42 running-config

On the management station where irrpt is running, a working http server is nessessary. Sample nginx config:

   rewrite ^/pfxgen/(.*)$ /irrpt_pfxgen_http.php?$1 last;
   location ~ irrpt_pfxgen_http.php$ {
      include snippets/fastcgi-php.conf;
      root /opt/irrpt/bin;
      # With php-fpm:
      fastcgi_pass unix:/run/php/php-fpm.sock;
   }

The prefix lists can also be testen from any client (or monitoring systems) like

curl http://217.11.222.212/pfxgen/iosxr/42
! Generate for iosxr for ASN15576
prefix-set PS-IPV4-AS15576
  63.246.32.0/20 le 32,
  65.22.19.0/24 le 32,
etc..

To accomplish this, i had to introduce a new default variable $cfg['pfxgen']['default_send_cmd']) to give the possibility to disable commands like conf tetc. (default True, to avoid breaking changes)

  • Test / verify other ios
  • contribute to readme.md
  • ??

Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant