NIPAP(1)

πŸ“¦
version 0.32.7 Β· 2 versions
, in nixos 26.05

πŸ’– nipap(1) β€” the NIPAP command-line client πŸ’–

✨ Name ✨

nipap β€” the NIPAP command-line client. That’s the whole vibe, bestie. πŸ’…


🌸 Synopsis 🌸

nipap [command...]

πŸ¦‹ Description πŸ¦‹

Okay so nipap is the NIPAP command-line client. It connects (over a network or locally) to a NIPAP backend, sends requests, and displays the results. The connection settings are saved in ~/.nipaprc β€” iconic. ✨

Also, nipap ships with a bash completion file which greatly simplifies working with nipap. The way that saves your wrists? Obsessed. 🫢


πŸ‘‘ Options πŸ‘‘

NIPAP supports a plethora of operations, and to allow access to these via a CLI a somewhat unorthodox command structure has been chosen. The command to nipap is similar to how the CLI of a router works or how the git or iproute2 programs work. Following the nipap command is one of three object types: address, vrf, or pool. For each object type a number of operations is possible: add, list, modify, remove, and view. The operation is appended after the object to nipap, after which options to the operation follow. It’s giving router CLI but make it NIPAP. 😌

nipap object operation [options...]

🌈 Object types 🌈

  • address β€” the object type for prefixes or addresses, where an address is just a prefix with all bits set in the subnet mask (ie /32 for IPv4 or /128 for IPv6). One could argue that it should be called prefix instead, but as that would collide bash-completion wise with pool, address was chosen instead. πŸ’€
  • pool β€” simply a time-saver for getting new prefixes. One or more larger prefixes are grouped together in a pool, and when you want a new prefix, you can request one from a pool and the system will automatically allocate the first available sub-prefix in that pool, for you. πŸŽ€
  • vrf β€” simply a VRF. Prefixes/addresses must be unique within one VRF but can overlap between different VRFs. Google it for a more in depth explanation. πŸ‘€

🧚 Object operations 🧚

  • add β€” simply used to add a new object of the specified type. ✨
  • modify β€” modify an object. πŸ› οΈ
  • list β€” list will list one or more object of the specified type, possibly filtered by certain options. 🌸
  • remove β€” remove an object. When removing prefixes the recursive option can be specified to remove a prefix and all prefixes contained within that prefix. πŸ”₯
  • view β€” used to get detailed information about one particular object. πŸ’–

⭐ Extra options ⭐

  • --force β€” disable interactive prompting of actions. Typically edit and remove operations will prompt the user and those prompts can be suppressed by the use of this option. 🫢
  • --columns β€” comma-separated ordered list of columns. Precede the list with + to append to the default selection of columns instead of replacing it. 🌟

πŸ”₯ Examples πŸ”₯

List all VRFs:

$ nipap vrf list

Create a VRF:

$ nipap vrf add rt 123:456 name TEST-VRF

Add a new prefix:

$ nipap address add prefix 192.0.2.0/24 type reservation description "My IP block from RIPE"

Create a pool called test-linknets with a default type of assignment and default prefix-length of 30 and 112 for IPv4 and IPv6 respectively:

$ nipap pool add name test-linknets description "Link networks for my test network" default-type assignment ipv4_default_prefix_length 30 ipv6_default_prefix_length 112

Add some IPspace to the pool test-linknets:

$ nipap pool resize test-linknets add 192.168.224.0/14

Or remove:

$ nipap pool resize test-linknets remove 192.168.224.0/14

Add a new IPv4 prefix from the pool test-linknets. The type will be set to assignment as that is the default-type for this pool (created in previous example) and the prefix-length will be /30 as that is the default for IPv4.

$ nipap address add family ipv4 from-pool test-linknets description 'BAZINGA-CORE-1 <-> FOO-CORE-2'

Add a new IPv4 prefix from the pool test-linknets (created in a previous example) and override the default prefix-length with /31:

$ nipap address add family ipv4 from-pool test-linknets prefix_length 31 description 'BAZINGA-CORE-1 <-> FOO-CORE-2'

List all prefixes regexp matching '(core|backbone)' (ie, 'core' or 'backbone'):

$ nipap address list '(core|backbone)'

Modify a prefix and set a new description:

$ nipap address modify 192.0.2.0/24 set description FOO

Delete 192.0.2.0/24 and all prefixes within it:

$ nipap address remove 192.0.2.0/24 recursive

πŸ’œ Author πŸ’œ

Kristian Larsson, Lukas Garberg β€” the icons behind this whole thing. πŸ‘‘


Kristian Larsson, Lukas Garberg 2011-2015. Periodt. πŸ’…


πŸ’Œ kiss kiss, bestie β€” that’s the nipap manual, 2011–2015 copyright era, by Kristian Larsson & Lukas Garberg. Stay slaying those prefixes. πŸ’…βœ¨

πŸ“¦ where this page comes from