NAP don't create a Federation. Peace Treaties do.
Unlike what is stated in the manual, in v4 and v4a Realms there isn't any formal way to create a Federation. Everytime you sign a Peace Treaty with someone, you are in "Federation" with that Alliance ... even if you signed a peace treaty with your worst enemy.
when Alliances you signed a peace treaty with, are attacked in official wars, then you can join the fight at no war declaration costs
Have fun,