Most network connection problems are not related to a problem with the game, but are caused by different possible network configurations. First, you will need to find out what style NAT (Network Address Translation) the PS3 believes that you are using.
To check what NAT you are using:
In the PS3 system software, go to: Settings -> Network Settings -> Settings and Connection Status List and the last line on the screen will list the type of NAT you have beside the line, "NAT type".
• If the NAT type is NAT1, you are directly connect to Internet (which means there is no firewall present) and should not have any trouble connecting online.
• If the NAT type is NAT2, your router or firewall is probably correctly configured, more on this below.
• If the NAT type is NAT3, your router or firewall is incorrectly configured for use with the PS3, and you will need to contact your ISP or router/firewall manufacturer for additional assistance.
If your NAT type is NAT2 or NAT3, we have compiled some general information and links to get you started, but it's still a good idea to contact your ISP or router/firewall manufacturer for additional assistance if you are experiencing problems with network connectivity.
From official PS3 online manual:
If you routinely have problems connecting to other PS3 systems, or with voice chat:
From the PS3 support website
Here a guide made by a user on Sony’s forum for people having NAT3 and using a router