IP-SR(8)

๐Ÿ“ฆ
version 7.3.0 ยท 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

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 ๐Ÿฆ‹๐Ÿ’–โœจ