Pages

Left 4 Dead 2 Play on LAN (Offline)

Those who like to play the original Left 4 Dead with their friends locally, ergo without an Internet connection, may also want to play the sequel Left 4 Dead 2 on a local area network (LAN) as well. I've created a guide on how to host and join a local game session without relying on Steam or any other online game matchmakers.

Update (February 7, 2012)
Almost two years have passed since I created this guide and a lot of game updates have been pushed through by Valve since then. As a possible fix to recent multiplayer connection problems, create a shortcut for Left 4 Dead 2.
Open the shortcut’s properties, proceed to Shortcut tab and add the following at the end of the Target field: –insecure. Click Apply/OK to save the new setting.
CaptureEvery time you run Left 4 Dead 2, you should do so by using this modified shortcut. The guide below will not work if you don’t use the shortcut.

After following the steps above, run the game. You will then need to enable the developer console. Optionally, you can also enable automatic detection of LAN games for convenience to those who will join your hosted game. Here's how:
How to enable Developer Console:


1. At the game main menu, click Options.
2. Click Keyboard/Mouse.
3. Click Allow Developer Console and select Enabled.
Left 4 Dead 2 main menu with console open.
Click image to enlarge.
How to automatically detect LAN games:

1. At the game main menu, click Options.
2. Click Multiplayer.
3. Click Automatically Discover LAN Games and select Enabled.

With all the necessary settings set up, it's now time to host a game.

How to create or host a Left 4 Dead 2 local (LAN) game:

1. Open the Developer Console by pressing ` on your keyboard. (It is the key below Esc.)
2. Type sv_lan 1 then press Enter.
3. Type sv_allow_lobby_connect_only 0 then press Enter.
4. In the console, type map then press Space.
5. Right after you press Space all the playable maps will be displayed.
6. Use your keyboard arrows to scroll to your desired map.
7. Press Enter.

Basically the command to create a local game is this:
map nameOfMapHere gameType

An example of a map is this c5m1_waterfrontc5 stands for campaign five, m1 for chapter/map one, and waterfront the corresponding name. Those with The Passing campaign, the campaign code assignment is c6.

List of all Left 4 Dead 2 maps:

Dead Center:
c1m1_hotel   c1m2_streets
c1m3_mall    c1m4_atrium

The Passing:
c6m1_riverbank   c6m2_bedlam   c6m1_port

Dark Carnival:
c2m1_highway   c2m2_fairgrounds   c2m3_coaster
c2m4_barns     c2m5_concert

Swamp Fever:
c3m1_plankcountry   c3m2_swamp
c3m3_shantytown     c3m4_plantation

Hard Rain:
c4m1_milltown_a   c4m2_sugarmill_a   c4m3_sugarmill_b
c4m4_milltown_b   c4m5_milltown_escape

The Parish:
c5m1_waterfront   c5m2_park c5m3_cemetery
c5m4_quarter      c5m5_bridge

List of all game modes:

campaign   scavenge   realism
survival   versus     mutation

If the gameType is left blank, the hosted game will default to a campaign game with normal difficulty. To choose another mode, just type in the console the game mode after the map name.

Example: map c1m4_atrium realism

How to join a LAN game:

When the game is created, the remaining thing to do is to let other players join the game. IfAutomatically Discover LAN Games is enabled, Steam Group Servers may appear in the main menu which players can use to join your game.

Alternately, the console command to join is connect hostIPAdresshere.

Example: connect 123.123.123.123
Steam Group Servers (at the bottom center) appears when it detects a game.
Click image to enlarge.
When clicked, you will then proceed to this window that lists all available games.
Click image to enlarge.
Determining the host's IP address:

Determining your local IP address can be tricky when you're connected to the Internet, so it's best to stay offline when hosting a game. Anyway, the game host must type net_status in the developer console. Some data will appear afterwards. You will need to look for a phrase similar to this: "Net status for host 11.111.11.11:" The numbers that appear on that phrase is the host's IP address.

Other notes and info:

This offline LAN game guide does not require Hamachi, Garena, or Steam. However, I suppose the version of the game installed on all computers must be the same.

Make sure Left 4 Dead 2 is added to the firewall exemption.

sv_allow_lobby_connect_only
If set, players may only join this server from matchmaking lobby, and may not connect directly.

sv_lan ( def. "0" )
If set, server is a lan server ( no heartbeat, no authentication, no non-class C addresses).




Left 4 Dead Play on LAN (Offline)




Source

37 comments:

  1. this works perfectly, thanks dude!

    ReplyDelete
  2. hello
    im using
    - Left 4 Dead 2 version 2.0.0.8

    i've followed you steps
    but it doesn't work for me
    when my friends tried to connect
    it is stuck on the loading page
    and then pop-up
    "failed to connect after 10 retries"

    ReplyDelete
  3. very nice, thanks...

    ReplyDelete
  4. It only display unable to execute command (86) when I try to add
    -insecure to the shortcut

    ReplyDelete
  5. Cool. I like this. thanks....................

    ReplyDelete
  6. if you failed to connect after 10 retries, try disable your firewall or make your dns automatic..

    ReplyDelete
  7. A misprint in 'exception'
    >> Make sure Left 4 Dead 2 is added to the firewall exemption.

    ReplyDelete
  8. Works like a charm, thanks dude

    ReplyDelete
  9. Almost done...and BOOM. It works.thanks bro

    ReplyDelete
  10. Though they could never beat Capcom's Resident Evil Series, Valve corporation did gave them some competition with their Left 4 Dead and Left 4 Dead 2 for sure. The first installment of this franchise was really awesome.
    Thank you for your hard work... All the best!

    ReplyDelete
  11. when i try creating a game. it says connection blocked Please remove plug-ins before attempting to connect to a VAC secure server."

    ReplyDelete
    Replies
    1. Remove -insecure from the launch options. It prevents you from joining servers.

      Delete
  12. Works great! We have 3 licenses in the family and a crappy internet connection...it's easier for 3 of us to connect locally to have a lag free game this way!

    ReplyDelete
  13. Awesome Admin Thanks For sharing This Article............ Now I know how to play

    ReplyDelete
  14. hi guys, i have problem, I want to play that game on lan with my friend, but when he add -insecure into target and launch game, it shows him please remove insecure :/ do you know where the problem is? thanks

    ReplyDelete
    Replies
    1. Remove -insecure, your plugins don't work on a server that isn't yours.

      Delete
  15. Awesome guide man!!! I honestly installed the game to play in lan, i was kinda disappointed to see that i couldn't... But then i found this perfect guide! Thanks!
    Just one last question, how can i change difficulty or character? Thanks again :)

    ReplyDelete
  16. i have problem..does anyone knows how to play offline mode but LAN and WIFI connections??(2 players) thankss

    ReplyDelete
  17. does anyone know how to play offline or setup but 2 players only(1 lan and 1 via wifi connection) thanks

    ReplyDelete
  18. Thanks! That was really helpful!!

    ReplyDelete
  19. Great, this worked a treat. Thank you from me and the rest of my lan party :).

    ReplyDelete
  20. Help guys....How to varify a game without using steam..?

    ReplyDelete
  21. It works! Thanks a lot!

    ReplyDelete
  22. My friend can join me by using this method although we use different wifi ?

    ReplyDelete
  23. Thank you bro, you made my day!

    ReplyDelete
  24. Does the people joining need to create the shortcut too?

    ReplyDelete
  25. thank you very much... you're the best

    ReplyDelete
  26. Can anyone please guide me on how to play addon campaigns with my friends on lan/ host an addon campaign cause there's no console command to launch an addon campaign of course, and also when I try to change the current campaign the "Addon Campaigns" option is blurred, I can't select it. I've seen many online non steam servers that are hosting addon campaigns too. Idk how to? Help would be highly appreciated.

    ReplyDelete
    Replies
    1. I'm super late but you would type the map name into the console like so: "map (map name here) campaign"

      Delete
  27. I can't put the –insecure please help me

    ReplyDelete
    Replies
    1. Don't put the -insecure command in. Your plugins won't work on your friend's server.

      Delete
  28. Hey bro can you tell if this work with pirated version of the game?

    ReplyDelete
  29. Very late, but thank you! Works like a charm!

    ReplyDelete