Can't figure out exactly what the problem is. Try with the following methods.
1) The SIM card might be damaged. To check this, Try inserting the SIM card into any other active network free phone. If it doesn't work then sure the SIM card is damaged. If it works fine then the SIM card is in good condition.
2) The SIM port on your phone might be damaged. Try inserting any other active SIM card to it. If it doesn't work, then sure the SIM port is damaged. If it work fine, Then the SIM port is in good condition.
3) The phone might be network locked. If the phone doesn't allow any network SIM cards to work with it except any one specific SIM card, Then it is sure network locked. You can unlock a Samsung Galaxy S2 safer and easier using unlock code. You can get the unlock code for a Samsung Galaxy S2 from ProUnlocking.Com
at affordable cost with easy unlocking guide. Good luck.