It has to be federal. Unless states are going to set up border checkpoints.
To be clear, I'm not a big fan of much of anything being federal. Setting up border checkpoints or whatever else they feel would be necessary is their choice.
So because a state wants to have a rational take on gun control they should have to defend their borders from neighboring states that don't?
They don't have to, but they can if they choose too. That's kind of the point. Choice. A federal law requiring all states to comply with the choice that your hypothetical state has made eliminates all choice from any state that opposes the federal law. You, of course, see no problem with this, because you agree with the hypothetical prevailing thought. You wouldn't be so quick to any federal laws if your thoughts were that of your perceived minority.
Like I said, I'm not a fan of much being handled on the federal level.