And your response is ... well, by golly, it has to be legislation!!!! So I guess you're left to wade in your own sarcastic response....
So what do you do when their "guest worker" time is up and they *gasp* decide to stay illegally?
The defining question is: why would they stay here illegally? They'd stay for the same reason they come now: because they're being paid by Americans to come here. If Americans weren't paying them, do you really suppose they'd be coming up here?
So the solution .... ta daaaaaa ... is to deal with the Americans who are paying them to come and stay. A guest worker program that provides American employers with an easy-to-use registration/checking capability handles one part: it removes the incentive to hire people who aren't registered. It also provides tracking of aliens. It also provides an auditable way to track down Americans who violate the employment regulations that would accompany the guest worker program.
The other part is harder: stop the state and local governments from giving monetary and other incentives for illegals to come and stay. Make registration and a paying job a precondition of obtaining public services. Demand proof of registration for drivers licenses, etc.