ADDR6(1)
π ADDR6(1) β General Commands Manual π
Heyyy bestie π§ okay so this is the ADDR6(1) page from the General Commands Manual, and it is giving useful. Let's get into it π
β¨ NAME β¨
addr6 - an IPv6 address analysis and manipulation tool π¦
πΈ SYNOPSIS πΈ
addr6 [-a IPV6_ADDR -i] [-d] [-d] [-q] [-s] [-j PREFIX] [-b TYPE] [-k
SCOPE] [-w UNICAST_TYPE] [-g IID_TYPE] [-J PREFIX] [-B TYPE] [-K SCOPE]
[-W UNICAST_TYPE] [-G IID_TYPE] [-v] [-h]
π DESCRIPTION π
okay so addr6 is an IPv6 address analysis tool, no cap π΅οΈββοΈ It can be used to figure out an address's type and scope, and to infer what kind of Interface ID an IPv6 address is using. Plus, it can whip up statistics about a whole set of IPv6 addresses πβ¨
addr6 can filter lists of IPv6 addresses by a bunch of criteria (address type, address scope, prefixes, duplicate addresses, etc.) π§Ή There are two kinds of filters: "block filters" and "accept filters". If any "block filter" is specified, IPv6 addresses matching any of those filters get discarded ποΈ If any "accept filter" is specified, any IPv6 address matching that filter gets accepted and printed on stdout π
π OPTIONS π
addr6 takes its parameters as command-line options, and each one can be called two ways π
You can use a short name (one character with a hyphen in front, like -i) or a long name (a word with two hyphens in front, like --stdin). Both work, so pick your fave π«Ά
-a IPV6_ADDRESS,--address IPV6_ADDRESSβ Pick a single IPv6 address for the tool to process π― This one usually pairs up with-d, so the tool can decode that exact address.-i,--stdinβ Tells the tool to read IPv6 addresses from standard input (stdin) until it hits an EOF (End-Of-File) condition π₯-j PREFIX,--accept PREFIXβ Accept IPv6 addresses that belong to the given IPv6 prefix (PREFIX/LEN) π-b TYPE,--accept-type TYPEβ Accept IPv6 addresses of the given address type. The valid address types are:unicastunspecmulticast
-k SCOPE,--accept-scope SCOPEβ Accept IPv6 addresses in the given address scope. The valid address scopes are:reservedinterface(orinterface-local)link(orlink-local)admin(oradmin-local)site(orsite-local)admin(oradmin-local)organization(ororganization-local)globalunassignedunspecified
-w UNICAST_TYPE,--accept-utype UNICAST_TYPEβ Accept IPv6 addresses of the given unicast type. The valid unicast address types are:loopbackipv4-compatipv4-mappedlink-localsite-localunique-local6to4teredoglobal
-g IID_TYPE,--accept-iid IID_TYPEβ Accept unicast IPv6 addresses with an Interface ID of the given type. The valid Interface ID types are:ieeeisatapipv4-32ipv4-64ipv4-allembed-portembed-port-revembed-port-alllow-bytebyte-patternrandom
-J PREFIX,--block PREFIXβ Block IPv6 addresses that belong to the given IPv6 prefix (PREFIX/LEN) π«-B TYPE,--block-type TYPEβ Block IPv6 addresses of the given address type. The valid address types are:unicastunspecmulticast
-K SCOPE,--block-scope SCOPEβ Block IPv6 addresses in the given address scope. The valid address scopes are:reservedinterface(orinterface-local)link(orlink-local)admin(oradmin-local)site(orsite-local)admin(oradmin-local)organization(ororganization-local)globalunassignedunspecified
-W UNICAST_TYPE,--block-utype UNICAST_TYPEβ Block IPv6 addresses of the given unicast type. The valid unicast address types are:loopbackipv4-compatipv4-mappedlink-localsite-localunique-local6to4teredoglobal
-G IPV6_ADDRESS,--block-iid IID_TYPEβ Block unicast IPv6 addresses with an Interface ID of the given type. The valid Interface ID types are:ieeeisatapipv4-32ipv4-64ipv4-allembed-portembed-port-revembed-port-alllow-bytebyte-patternrandom
β¨ EXAMPLES β¨
okay so bestie, this section is literally where the addr6 tool shows off its moves π here are the typical use cases, and they are so useful π¦
Example #1
$ cat addresslist.txt | addr6 -i -q
addr6 reads IPv6 addresses from stdin (that's the -i option π«Ά), and only prints the first instance of each address (that's -q π). so it basically yeets every duplicate out of the list ππ₯
Note: In this scenario, the address list comes from cat addresslist.txt, and its output gets piped into the standard input of addr6 πΈ
Example #2
$ addr6 -a fc00::1
This one decodes the IPv6 address you give it with the -a option β¨ bestie, the -d option wasn't set here, but decoding is the default behavior of the tool anyway (unless another option overrides it, so keep that in mind π)
Example #3
$ cat addresslist.txt | addr6 -i -q -s
addr6 reads IPv6 addresses from stdin (-i π«Ά), ignores duplicate addresses (-q π
), and prints statistics about the processed IPv6 addresses πβ¨
Note: Same vibe as before: the address list comes from cat addresslist.txt, and its output is redirected into the standard input of addr6 π
Example #4
$ cat addresslist.txt | addr6 -i -q -d
addr6 reads IPv6 addresses from stdin (-i π«Ά), ignores duplicate addresses (-q π), and decodes each of the remaining addresses π¦
Note: The address list is coming from cat addresslist.txt, piped into addr6's standard input π§
Example #5
$ cat addresslist.txt | addr6 -i -j 2001:db8::/16
addr6 reads IPv6 addresses from stdin (-i π«Ά) and discards any address that doesn't belong to the prefix 2001:db8::/16. so basically it "accepts" only the addresses inside that prefix π
Note: Once again, the address list comes from cat addresslist.txt, with its output going into the standard input of addr6 π
β¨ SEE ALSO β¨
ipv6toolkit.conf(5) π
draft-ietf-opsec-ipv6-host-scanning (available at: http://tools.ietf.org/html/draft-ietf-opsec-ipv6-host-scanning) is the one to read if you want a discussion of the different IPv6 address patterns πΈ
β¨ AUTHOR β¨
The addr6 tool and its manual pages were made by Fernando Gont <fgont@si6networks.com> for SI6 Networks <http://www.si6networks.com> π«Ά
β¨ COPYRIGHT β¨
Copyright (c) 2011-2013 Fernando Gont π
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation, with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/licenses/fdl.html ππ
ADDR6(1) π¦ and that's a wrap, bestie! source and version info are the stuff of legends, so go check the original page if you need it πβ¨
π¦ where this page comes from
- epel 10: ipv6toolkit 2.2-2.el10_1 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- epel 9: ipv6toolkit 2.2-2.el9 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- fedora 43: ipv6toolkit 2.2-3.fc43 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- fedora 44: ipv6toolkit 2.2-4.fc44 Β· GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND MPL-2.0
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms