So, I'm not sure I'm clear on this..what constitutes an "OSPF domain"? It's not the process id, that would identify the process on a router and is local to that router. Many routers in the same area even could have different process ids's.
It's not the area, you can have lots of areas in a single domain....
So, how do you know when you've left one OSPF domain for another? It's easy if your asbr connects you to another routing protocol, say RIP or BGP, but it's not like you specifically tell a router it's going to be an ASBR, it just is by virtue of what other protocols are configured on it.
So, say you have an ASBR connecting two OSPF domains? What would you see or configure to tell that router that interface fa0/0 is in OSPF domain x and Ser0/0 is in domain y for instance?
I don't think I quite get this.
This is a complicated question.
An OSPF domain is a set of routers that have a contiguous OSPF topology. That is, a set of routers, ABRs ASBRs, areas, that know about each other. Most of the time you are dealing with a single OSPF domain.
What about the ASBR connecting two OSPF domains? We can guess they are two OSPF domains because they have two independent OSPF processes in that router. Normally, the OSPF domains will not know about each other's routers, so they are seperate domains.
I say "normally", because the fact that they are two processes in this router does not guarantee that they are not joined up somewhere else. If that is the case, then they are one domain, even though this router looks like two routers to OSPF. It is for this corner case that if you have a router with two OSPF processes, they will take two different RIDs ... so that if they are joined somewhere else, there is no confusion.
There was a long discussion back in January on this point about the RID.