Just tossing out an idea... could it be that you've got canonicalization issues? Perhaps a strong inbound link to your IP is favoring that over your domain name, and you're not redirecting it properly to your domain name canonical.
I don't know what other issues you might be having, so this is just grasping at straws in the wind.
Often another site is linking to you using the IP address - this used to happen more often in the early days of the web (I know of one midwestern newspaper that did it regularly!).
But the exact reason in any particular case is not nearly as important as how to fix it. Essentially it is another kind of canonical problem. On your server, you can 301 redirect any request that uses the IP address to the same file but using the domain name. You can also include the canonical link element and make sure it uses the preferred address for the file.
Do you think the site is showing up at the ip address because the domain is penalized? Rather than this being the cause of the penalty?
You say "penalty" as if something else is going on, which is why I was even slightly hesitant about my diagnosis.
Lots of people use the word "penalty" when they should be saying that the rankings dropped. Penalty implies breaking Google guidelines. Do you have reason to think you've done that?
Possibly, the backlinks to your domain name could have been devalued and/or the link(s) to your IP might have gotten a boost somehow, and that could be the cause. Or perhaps, particularly if you've seen this before, you're on the edge and there's been an algo tweak. But unless you have good reason to suspect a penalty, I wouldn't put that first on the list.
In any event, your domain is being seen as a dupe because your content is showing up under multiple urls, and you are splitting your link vote... so you've got to correct the canonical situation no matter what else you do. Why not do that first, and then see what happens?
If you can have it done via mod_rewrite, I think you're likely to be better off than by using the canonical link element, but I'm hearing from some experienced SEOs that they're surprised how well the canonical element is working.
Well suddenly no pages are showing up before page 5 including a search on the domain name - until yesterday when I saw it show up under the ip address.
I have no reason to think that I broke the guidelines but I have two reasons to think that google might think that I have.
I was able to use htaccess to redirect the ip to the domain - seems to be working.
I looked at the canonical link element and unless I don't understand it I don't think I can use it. It's for pages that are similar or the same, but I only have one copy of each page. Can the canonical element be used on one page that shows up for different addresses?
proboscis - the Hot Topics area [webmasterworld.com], which is always pinned to the top of this forum's index page, has a section on duplicate content, with good reference threads discussing a large variety of issues that can cause a page to be returned under multiple urls. It can take a while to get through them all, but it's well worth the effort.
Also, I suggest using site search here to find many discussions on the topic. It's clear from occasional questions on this forum that you don't want to make a mistake when using the canonical element, so do some reading and understand the issues.
Full canonicalization done with mod_rewrite is a better solution if you can use it, and will provide a sitewide fix.
Thanks again you two! I need all the help I can get :( struggling over here.
I've got the ip redirecting to the domain now, waiting for google to pick up on it. And I see that I can put the canonical link element on the true canonical page, it can point to itself, but I'm going to read some more before I try that.
I'd like to expand on what g1smd said. It's true that the "no-www" to "with-www" 301 redirect will handle that common canonical problem. However, there are many other potential canonical URL issues that, though less common, can still wreak havoc if they come up.