Diablo II: closed realm logon

D2DVD2XP

How Diablo II 1.14d logs on to Battle.net, connects to the realm, picks a character and enters chat. Checked against a real Lord of Destruction 1.14d client.

#ClientServerWhat happensConfidence
Battle.net connection: log on
1 0x01 → Protocol byte: BNCS follows. ✅ Verified
2 SID_AUTH_INFO → Names the game (D2DV or D2XP). Version byte 0x0E for 1.14d. ✅ Verified
3 ← SID_PING ✅ Verified
4 ← SID_AUTH_INFO Logon type 0x00 (X-SHA-1) and the version check. ✅ Verified
5 SID_AUTH_CHECK → Lord of Destruction sends two CD keys. ✅ Verified
6 ← SID_AUTH_CHECK ✅ Verified
7 SID_GETFILETIME → Terms of service. The client downloads them over BNFTP. ✅ Verified
8 ← SID_GETFILETIME ✅ Verified
9 SID_LOGONRESPONSE2 → Or SID_CREATEACCOUNT2 first, for a new account. ✅ Verified
10 ← SID_LOGONRESPONSE2 ✅ Verified
Battle.net connection: find the realm
11 SID_QUERYREALMS2 → ✅ Verified
12 ← SID_QUERYREALMS2 The realms on offer. ✅ Verified
13 SID_LOGONREALMEX → ✅ Verified
14 ← SID_LOGONREALMEX The realm's address and port, plus data to hand the realm. ✅ Verified
Realm connection (a second TCP connection)
15 0x01 → The same protocol byte, but MCP framing follows. ✅ Verified
16 MCP_STARTUP → The data from SID_LOGONREALMEX. ✅ Verified
17 ← MCP_STARTUP 0x00 accepted. ✅ Verified
18 MCP_CHARLIST2 → ✅ Verified
19 ← MCP_CHARLIST2 The character-select screen appears. ✅ Verified
Either select a character…
20 MCP_CHARLOGON → ✅ Verified
21 ← MCP_CHARLOGON 0x00 selected. ✅ Verified
…or create one, which selects it with no MCP_CHARLOGON
22 MCP_CHARCREATE → ✅ Verified
23 ← MCP_CHARCREATE 0x00 created. ✅ Verified
Into the chat lobby
24 MCP_MOTD → On the realm connection. ✅ Verified
25 ← MCP_MOTD ✅ Verified
26 SID_GETCHANNELLIST → Back on the Battle.net connection. ✅ Verified
27 SID_ENTERCHAT → Name: the character. Statstring: realm,character. ✅ Verified
28 ← SID_GETCHANNELLIST ✅ Verified
29 ← SID_ENTERCHAT Unique name Character*Account, and the character's portrait statstring. ✅ Verified
30 SID_NEWS_INFO → ✅ Verified
31 ← SID_NEWS_INFO ✅ Verified
32 SID_JOINCHANNEL → The Diablo II channel, flags 0x05 for Lord of Destruction and 0x01 for the original game. ✅ Verified
33 ← SID_CHATEVENT ✅ Verified
34 SID_CHECKAD → Repeated about every 15 seconds. ✅ Verified

Remarks

Going back to character select. The client sends SID_LEAVECHAT, then SID_QUERYREALMS2, then MCP_CHARLIST2 on the realm connection it already has open.

Creating and joining games goes through the realm: MCP_CREATEGAME, then MCP_JOINGAME. On success the client closes the realm connection and connects to the game server on port 4000. ✅ MCP_CREATEGAME's flags hold only the difficulty, shifted left by 12.

Coming back from a game. ✅ The client sends a fresh SID_LOGONREALMEX, opens a new realm connection (MCP_STARTUP, then MCP_CHARLOGON for the same character), enters chat again and rejoins the channel it left with SID_JOINCHANNEL flags 0x02. 1.14d sends no SID_LEAVEGAME after a realm game, and never answers the UDP test with SID_UDPPINGRESPONSE.

Counters the client keeps. ✅ SID_LOGONREALMEX's client token is a counter that starts at 1 and goes up by one each time. Realm requests carry request ids that start at 2. MCP_CHARLIST2 asks for 8 characters.

One port or two. Official Battle.net ran the realm on separate hosts. A server can also accept both connections on port 6112, because the next byte after 0x01 tells them apart: a BNCS message starts with FF, while an MCP message starts with its length.

Open Battle.net (characters kept on the player's computer) skips the realm entirely and logs on to chat like StarCraft.

Sources and credits

This page is written in our own words. BNETDocs is credited for its research; none of its text is copied. See Credits.

Last edited October 11, 2026 by tagban.
Edit on GitHub | Page history | Edit with Discord