Battle.net is a free-to-use gaming service developed by Blizzard Entertainment to connect their games, specifically from their three big franchises, StarCraft, Diablo, and WarCraft. It is proprietary.
The Battle.net service is an old service dating back to 1996 with the release of the original Diablo game, and is best known as the first gaming service integrated into the games.
Battle.net as a set of servers has always provided three basic things, chatting, matchmaking, and player statistics.
Classic Battle.net (or BNET), the name retroactively given to the first set of servers, allows game owners to connect to their servers and chat with other players in channels. Battle.net was meant to loosely work like IRC, though its moderation capabilities are less powerful, and the fact that players are limited to a single channel at a time says otherwise.
- Chat (1996-2005) (they used to allow standard Telnet clients to connect to their servers for chat purposes)
- Diablo (1996-present) (limited to public chat channels)
- StarCraft (1998-present) (and expansion)
- WarCraft II (1999-present) (support added by the "Battle.net Edition" expansion)
- Diablo II (2000-present) (and expansion)
- WarCraft III (2002-present) (and expansion)
The shareware and Spawn versions of the above games (Diablo Shareware, StarCraft Spawn, WarCraft II Spawn) work too, but are limited to public chat channels.
Battle.net Chat Server
The Battle.net Chat Server (BNCS) allows players to connect and join a channel.
- Updating game clients
- Product key checking
- Account logon, creation, and password changes
- E-mail binding to accounts, and initiating e-mail-based password resetting
- Multiple-user public and private channels, where each player can be in one channel at a time
- A list of Battle.net news and a message of the day
- A friends list
- A list of games you can advertise to or join one of (in Diablo II this is Open Battle.net, and inWarCraft III, this is Custom Games)
- User profiles and game statistics
- For WarCraft III, ladder arranged-team matches
- For WarCraft III, ladder random-opponent matches
- For WarCraft III, tournament matches and statistics
- For WarCraft III, clan joining, creating, and management
- For WarCraft III, clan game statistics
Chat channels are either public, or private. Blizzard has the policy of not interfering with players in private channels.
List of public channels:
- Blizzard Tech Support (used to conduct moderated tech support by Blizzard employees, now defunct)
- Open Tech Support (for players to help other players with technical issues)
- Blizzard Chat (for public chat about Blizzard)
- Public Chat (#) (historically the product channel for Telnet Chat, now used for public chat, for example * "Public Chat 3")
- Clan Recruitment (for advertising your clan or group)
- (product name) (region-3-letter-code)-(#) (product channel for the client, for example "Brood War USA-1")
- Diablo II (realm)-(region-3-letter-code)-(#) (product channel for a closed Diablo II realm, for example "Diablo II Europe-GBR-10")
- various product-related channels (for example, channels for map making or strategy)
Any channel with the product name (list of product names: "Diablo", "StarCraft", "StarCraftJ", "Brood War", "WarCraft II", "Diablo II", "LoD", "WarCraft III", "Frozen Throne") followed by any single name is a product channel for that client. All non-Diablo II product channels are public channels, while Diablo II product channels are only public to users on the correct Realm on Diablo II.
There are four official BNCS "gateways", which are a set of servers that correspond to a certain region and have an associated domain and two associated "namespaces":
- USEast/Azeroth (useast.battle.net)
- USWest/Lordaeron (uswest.battle.net)
- Europe/Northrend (europe.battle.net)
- Asia/Kalimdor (asia.battle.net)
There were sometimes additional official servers:
- Beta/Westfall (beta.battle.net) (used to publicly test future patches)
- USTest/Stratholme (ustest.battle.net) (used to publicly test a hardware update)
- (unknown namespace) (demo.war3.battle.net) (an old version of the Battle.net server software used to host the WarCraft III Demo. This is still running, but does not support chatting or many other features, as they wanted to push you to buy WarCraft III)
Unofficial (private) servers have been hosted by various people, leading to the bnetd controversy. This has since been resolved. Hosting of private servers such as the open source PvPGN software is deemed legal as long as you do not check players' CD Keys.
A namespace is an unofficial term for the way BNCS handles multiple account
logon systems. All clients except WarCraft III used a broken SHA-1 based logon
system. With the release of WarCraft III, Blizzard wanted to allow users to
create all new accounts using their new SRP-based logon system that was more
secure, but they wanted to keep all old accounts for their previous games. All
'@' + namespace added to their username and new namespaces were
added, named after regions in the WarCraft universe. When you are on an
account, usernames appear without your current namespace.
A is on WarCraft III and
B is on StarCraft on
A@Azeroth. Both see
themselves and players on their namespace as the username they logged on with.
A special namespace exists for Blizzard employees. All Blizzard Representatives
and System Operators appear as
To connect, use TCP port 6112 and the domain name or IP address of the gateway/server.
Battle.net has had many players using various forms of automated programs, "bots", on the Battle.net servers. They have been made to do everything from chat and moderation, "warring" (the act of spamming or filling up a channel to annoy or aggrevate the players), cheating (win bots, which fake games to increase a win record, or Diablo II run bots). Blizzard does not approve of any of these uses, but has only taken action against those bots which affect the game experience, namely any bots who join a game server or hosted game. They ignore bots who do chat and moderation with the policy that they won't interfere with private channel disputes.
To log on to Battle.net with a game you own, BNCS requires that you securely send your game's product key (known as a CD Key, as all these titles came only on CDs when they came out).
CD Keys come in 13-digit (StarCraft), 16-character (WarCraft II and Diablo II), and 26-character (WarCraft III and all digital download/digital purchase keys) variants, and are decoded into a product value, public value, and private value using different algorithms for each key type. You send the product and public values and do a hash of the three values to verify that you have the key.
Spawning is a method by which friends could share copies of the game. Though heavily restricted, the spawned client could join the official client on Battle.net as long as the official client hosted the game. Battle.net 2 recently brought the feature back with StarCraft II where joining a party with a Starter Edition (basically someone who hasn't bought the game) upgrades the SE player to the full client for the time the person is in the party.
Diablo, WarCraft II, and StarCraft bases their peer-to-peer networking on a system dubbed the Storm UDP Protocol, based on its similarities between the three games, and their common reliance on the Storm library packaged with the games. Games are set up by the BNCS game list and hosted by one player. They are joinable by up to three other players (Diablo), or seven other players (StarCraft and WarCraft II). The BNCS determines UDP support during logon and clients will warn you if it cannot be established.
Game clients bind to UDP port 6112 to allow hosting games. During BNCS logon they communicate with the BNCS server at port 6112. For games, the game list specifies how to connect to the game host. The game host manages connecting to the other players to create a fully connected network for the other members of a game.
Diablo II Realms
Players of Diablo II may see that there are two ways to connect to Battle.net, known as open and closed. Open allows players to share their singleplayer save with multiplayer, and has no way of verifying characters are not modified. When playing games on open Battle.net, Diablo II uses the BNCS to advertise and join games the same way as the peer-to-peer clients, except the "host" is an official game server, not a player.
Closed Battle.net restricts players from cheating, by storing character data on their Realm servers. When playing games on closed Battle.net, the BNCS tells Diablo II clients how to connect to the Realm server during logon. This Realm server keeps track of characters and game lists for closed Battle.net. The Realm server tells closed Diablo II clients how to connect to a game server when joining a game.
All Diablo II communication uses TCP, often port 6112. However, the Realm server and the game server have their IP and port specified during logon.
Warcraft III Peer-to-Peer
WarCraft III returns to peer-to-peer networking for games, but uses TCP exclusively and a protocol unrelated to Storm UDP. Games are again set up by the BNCS game list and hosted by one player. They are joinable by up to fourteen other players. For ladder games (random matchups or arranged team matchups), the host may be an official Battle.net server, to lessen cheating.
Game clients bind to TCP port 6112 to allow hosting games, though this is configurable in the client. During BNCS logon the client advertises the port it is bound to so that the game list can list your hosted games correctly.
The second set of servers, dubbed Battle.net 2 (or BN2), was released around the time of StarCraft II's release and supports the modern Blizzard games. The Battle.net account is integrated with the Battle.net website. Though there have been rumors and claims of Classic Battle.net games and accounts being upgraded or somehow integrated with the modern Battle.net 2 systems, no changes have taken place.
- StarCraft II (2010-present) (and expansion)
- World of Warcraft (2010-present) (and four expansions, support added in 2010 with the "migration" of WoW accounts)
- Diablo III (2012-present) (and expansion)
- Battle.net Desktop App (future) (this is in open beta now, allowing players to communicate with other players while not in-game or game menus)
- Hearthstone (future) (this is in closed beta now)
Each product seems to have their own different protocol with BN2, however they all use TCP port 1119.
- BnetDocs Redux - a complete reference for the procedure for connecting to and using the BNCS and Diablo II's MCP (for Realms), and some infromation on the various game protocols.
- vL Bot Development Forum - a forum for a clan whose members are known for doing a lot of the reverse engineering of BNET.
- Classic Battle.net Plugin for Pidgin - allows users to connect to and use BNCS for chatting while they are not able or willing to run the game clients, for any libpurple client.