The characters after the # are not part of the URL and do not form part of the request that Google will send when spidering. I don't know quite how it would be handled, but my guess would be that Google would simply strip out that part and treat it much the same as a reference to the URL without it.
There is some internal processing of URL fragments by Google, however, so it's possible that it would be worthwhile to include. Unfortunately, there's not really anything in the way of "official" documentation for the canonical attribute.
If the fragment that is isolated its own URL (#2) is not a good landing page for search users, I would probably use a noindex robots meta tag. A canonical link to a much more extensive page is like to be ignored, because the two are not close enough.
I have no idea how best to handle 3)
Iframe content is not currently considered part of the parent URL - so you have no worries there. Each URL gets ranked based on the content in its own source code.
Msg#: 4165134 posted 2:49 am on Jul 7, 2010 (gmt 0)
Last time I tested (admittedly over a year ago) no link juice flows through an iframe src= attribute. In fact, I was surprised that it didn't even seem to be used for URL discovery.
All that might well have changed by now, but in my book, the sure thing is still an actual link. Consider the situation where a page that holds an iframe also holds a few links to change the display within that iframe, by using the anchor tag's target attribute.
Msg#: 4165134 posted 10:43 am on Jul 7, 2010 (gmt 0)
I did some iframe testing this year. In my test Google indexed iframe content under the iframe's url, and anchor text was passed from within the iframe to another page (I used a unique phrase in the anchor and when searching on that, got the page the iframe linked to as a result as well as the iframe).