Notes

This only works for interfaces activated at boot. The code could easily be copied to work with the other interfaces too but I didn't see a use for that.

After you add the ip addresses ( aliases ) you have to go to the list of interfaces, select the newly added interfaces and click the "Apply selected interfaces" button if you want the new aliases to be activated without having to reboot.