properly generate mac string, and verify format when user-provided