How do you get your internet service? DSL? Cable? DialUp?
How is your iMac connected to the internet?
- Do you connect your iMac directly to the internet service provider's modem?
- Are you connected to wirelessly or via an ethernet cable?
Rather than going through the diagnostic check, what happens if you instead wait 30-60 seconds. Does the issue resolve itself?
The following articles may also provide some help. If you are using PPPoE then the following information from the article referenced below may help. It's referring to an option in the advanced section of the Network System Preferences pane. I've included a screenshot from my system below. I am also running 10.7.3, just like you.
"Tip: To have the computer automatically connect whenever you open a network application (Web browser, email, and so forth), click PPPoE Options and select the "Connect automatically when needed" checkbox."
http://support.apple.com/kb/HT2301
Hopefully a simple preference change like this will help.