Was the phone unlocked previously?
If so then it is locked again and as of right now there is no
unlock for 5.1.1
If it was not unlocked previously, then try and do a restore on the phone
using itunes and if that fails, then do a setup as new phone in itunes. Make sure
you back up first.
If that all fails then i don't what else to say unless your sim card is no good, buy a new one.