If you are unable to download the new iOS 5.1 update to your iDevice because of network connection problems, follow these steps below to fix this problem:
Step 1) On your iDevice, go to the Settings App.
Step 2) Select Wi-Fi.
Step 3) Select the network that you are currently connected to and click on the blue and white arrow on the right of that network.
Step 4) Click on DNS and change the current value to 220.127.116.11,18.104.22.168
Step 5) Open Safari and go to any website just to make sure the settings are working.
Step 6) Now, go to Settings > Software Update and you should now be able to download the iOS 5.1 update!
Another attempt at a solution, under Settings > General > Date & Time, make sure that Set Automatically is turned to "ON."
Hope this solves your problem and you are able to download iOS 5.1. To learn more about the new features in iOS 5.1, go here.