Is it possible to collect posts according to sub-domains?

Hi,

Is it possible to index/collect and show posts from specific sub-domains? for example posts from sites on subdomain1.com and posts from subdomain2.com?

Thanks