IP-SR(8)
IP-SR(8) ๐
okay bestie, gather round โ this is the ip-sr page from section 8 of the Linux manual, and it's literally all about IPv6 Segment Routing management. No cap. ๐ฆ
โจ NAME โจ
ip-sr โ IPv6 Segment Routing management ๐
๐ธ SYNOPSIS ๐ธ
ip sr { COMMAND | help }
ip sr hmac show
ip sr hmac set KEYID ALGO
ip sr tunsrc show
ip sr tunsrc set ADDRESS
๐ DESCRIPTION ๐
So like, the ip sr command is your girl for configuring IPv6 Segment Routing (SRv6) internal parameters. Periodt. โจ
And which parameters, you ask? Two iconic ones:
- the mapping between an HMAC key ID and its associated hashing algorithm and secret, and
- the IPv6 address to use as source for encapsulated packets.
Now the tea on ip sr hmac set: it prompts you for a newline-terminated "passphrase", and that passphrase gets used as the HMAC secret for the corresponding key ID. And here's the thing, bestie โ that "passphrase" is not stretched, it's used directly as the HMAC key. So it absolutely needs enough entropy to actually be a key, fr fr. ๐ญ
A correct use would be, like, a passphrase you generated with:
head -c 32 /dev/random | base64 -w 0
A blank "passphrase" removes the mapping. bye bye mapping ๐ซถ
The currently supported algorithms for ALGO are sha1 and sha256. that's it, that's the list ๐
And for the tunnel source: if it's set to the address :: (which is the default, lowkey), then an address of the egress interface will be selected. But โ and this is important โ since that operation may hinder performances, it is recommended to set a non-default address. slay responsibly. ๐
๐ EXAMPLES ๐
Configure an HMAC mapping for key ID 42 and hashing algorithm SHA-256
# ip sr hmac set 42 sha256
Set the tunnel source address to 2001:db8::1
# ip sr tunsrc set 2001:db8::1
๐ SEE ALSO ๐
๐ BUGS ๐
ip sr hmac set does not stretch the passphrase.
yes bestie, it's right there in the manual, I'm not making it up ๐
๐ง AUTHOR ๐ง
David Lebrun <david.lebrun@uclouvain.be> โ icon, legend, the moment ๐
and that's the whole page, bestie!! this one shipped with iproute2, dated 14 Apr 2017. go configure some segment routing, you absolute main character ๐ฆ๐โจ
๐ฆ where this page comes from
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute 7.0.0-2.el10 ยท GPL-2.0-or-later AND NIST-PD
- centos-stream 9: iproute 6.17.0-3.el9 ยท GPL-2.0-or-later AND NIST-PD
- fedora 44: iproute 6.17.0-2.fc44 ยท GPL-2.0-or-later AND NIST-PD
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms