Encap.txt: Difference between revisions
Created page with "The Encap.txt file is a file listing all the AMPRNet [gateway| gateways]. Originally formatted for JNOS systems, it is often parsed with a "munge script" to update Linux ..." |
provide details on creating encap.txt from portal's json outside |
||
Line 1: | Line 1: | ||
The | == The encap.txt file == | ||
The encap.txt file is a file listing all the AMPRNet [[gateway| gateways]]. | |||
Originally formatted for JNOS systems, it is often parsed with a "[[munge script]]" to update Linux system routing tables. | Originally formatted for JNOS systems, it is often parsed with a "[[munge script]]" to update Linux system routing tables. | ||
The file can be | The file can be obtained via the [[Portal| portal]] and private HTTP. | ||
== Portal == | |||
You can create an API key on the portal by visiting [https://portal.ampr.org/profile.php your profile page]. Since it needs to be 32 characters I recommend using md5sum of any random data to generate it. The encap endpoint produces json format which you will need to format. You can then use the command line utilities '''curl''' and '''jq''' to turn this data into routes to ingest into about anything. For example for JNOS encap.txt format: | |||
curl -s https://user:key@portal.ampr.org/api/v1/encap | jq -r '.[] | "route addprivate \(.network)/\(.maskLength) encap \(.gatewayIP)"' | |||
== HTTP == | |||
This is still available on private HTTP but it is deprecated and also removed from the anonymous FTP. 44net list members can find the details in the mailman Archive in this thread: | |||
[https://mailman.ampr.org/mailman/private/44net/2020-January/010633.html private gateway stats] |
Revision as of 17:35, 8 February 2020
The encap.txt file
The encap.txt file is a file listing all the AMPRNet gateways.
Originally formatted for JNOS systems, it is often parsed with a "munge script" to update Linux system routing tables.
The file can be obtained via the portal and private HTTP.
Portal
You can create an API key on the portal by visiting your profile page. Since it needs to be 32 characters I recommend using md5sum of any random data to generate it. The encap endpoint produces json format which you will need to format. You can then use the command line utilities curl and jq to turn this data into routes to ingest into about anything. For example for JNOS encap.txt format:
curl -s https://user:key@portal.ampr.org/api/v1/encap | jq -r '.[] | "route addprivate \(.network)/\(.maskLength) encap \(.gatewayIP)"'
HTTP
This is still available on private HTTP but it is deprecated and also removed from the anonymous FTP. 44net list members can find the details in the mailman Archive in this thread: