Make sure your modem and/or router have up to date firmware. Try power cycling the modem and/or router. Make sure the media server option under settings is off. And if all else fails try port forwarding.
To port forward go to this site: http://www.portforward.com/english/routers/port_fo
Scroll down and find your router and click on it. On the next page scroll down and find Playstation Network and click on it. Follow the instructions.
Make sure you add all these trigger ports:
Once you are done power cycle your modem/router. You should be all set now.