Does anyone know of a good guide with examples for the ip xfrm command or a small howto in ipsec on Linux?

Looked up the topic but the search provided underwhelming results, bug reports or source code examples. I just need to find a decent tutorial.

Thanks.