Setting up peer-to-peer networks
The two sites do not have to be in the same domain or organization. For example, two universities or two high schools might want to offer a collaborative course. They both have their own Moodle system in their domain, and they both control who gets access to which part of their site.
If your two sites are hosted in the same top-level domain, and you are accessing both sites from the same web browser simultaneously, change the cookie prefix of one site (Site administration | Server | Session handling) to avoid any conflicts.