srcds.com Home Tutorials Forums Mods Game Server Providers Source

Setup: Assigning IPs to srcds

Usually you get several IP addresses with your dedicated server company. Not all of us know how to assign those and I will explain how to do so.

First we need to explain the operating system there is more than one IP address.
1a) Windows 95/98/98SE/ME

Under Windows we have to take a look in the registry. I could do a nice copy paste of a site that explains this perfectly well but I could also link you up to that site and that is what I am going to do. >> Assigning IPs for 98 etc.

1b) Windows 2000/XP/2003

Go to your Network properties screen and click on TCP/IP. Now click on properties and advanced. Under the box Ip Addresses you can simply add or remove several IP addresses. Piece of cake :)

1c) Linux (Redhat, Fedora etc.)

On most Linux systems you can easily use ifconfig to assign multiple IPs.
To do so, you first have to try it out before you lock it to the "on startup" execution file. Here the usage:
/sbin/ifconfig eth0:0 123.123.123.123
This is the secondary IP. This means this is NOT the base IP, as the number suggests. Now if we want a third IP we are going to increase the number after the semicolon by one:
/sbin/ifconfig eth0:1 123.123.123.124
If you follow this pattern it should work fine depending on your Linux distribution. Also note your networkcard could be named different than eth0.
To save changes, you have to add all commands you had to use to assign the IPs to your "on boot" execution file". Under Redhat and Fedora this is /etc/rc.local. Please verify the location of your distribution with an advanced Linux user to be sure.

2) Telling srcds what IP to use

In order to tell srcds what IP you want to use, you add the +ip switch to the command line. Eg. ./srcds_run -game cstrike +ip 123.123.123.124

This allows you to run multiple srcds instances at one box with several IPs.
Have fun!
10 Dec 2004 by Webmaster

Half-Life 2, Counter-Strike Source and Day of Defeat Source are trademarks and/or registered trademarks of Valve Corporation.
We are NOT affiliated with VALVe in any way. Our goal is to provide the community a decent amount of information regarding srcds. ? SirTiger 2004