Thanks a lot for sharing this, highly appreciated!
(Personally I would put it into a script, because I usually don't remember things like that.)
Hmm, do you think this could be solved more elegantly on using a VM Containing a Cumulus Networks OS with a programmable Virtualized Network Stack?