SRCDS Steam group


fixed ip for my server on the network...
#1
how can i give my server a fixed ip of 192.168.1.111 (this is an example). using a linksys router (wrt54g) and every now and then the servers ip on the lan changes... cutting it off from the outside world becuase the ports i had forwarded for it arent forwarded for its new ip. i dont know why the router sometimes changes its ip. becuase it does this when i leave the server on too. its a real pain getting up in the morning only to see that its not working and hasnt been working all night.
Reply
#2
check your router, it is probably getting a new lease every 24 hours, set the lease to forever and this should give you the dedicated IP, or turn DHCP off altogether and manually set IP's subnets and default gateways on each pc.

hth
Clanplanet.co.uk Gaming Servers
Licensed Ventrilo Host - AA Honor Provider - Great Service & Prices
Reply
#3
I use the WRT54G and I also have assigned a static IP to my server. The simplest way to do it is:-

1. In the router setup limit the ip range that it's built in DHCP server hands out.

For instance, on my router I have set the start ip address to 192.168.1.10 and limited the number of clients to 10. This means that the DHCP will only hand out ip's between 192.168.1.10 and 192.168.1.19.

2. (This bit is for windows - if you're using linux you'll have to find out from your documentation how to setup the TCP/IP properties on your network connection). On your server go into the network connections folder in control panel and bring up the properties on your LAN connection. Find the "Internet Protocol (TCP/IP)" item in the "This connection uses the following items:" list, select it and click the properties button.

Change the connection to use a specific address (i.e. change it from obtaining the address automatically). Enter the static ip you want which can be any 192.168.1.x number that isn't in the DHCP range (mine is 192.168.1.2). You can get it from your router setup page but your subnet mask will probably be 255.255.255.0. Enter the ip for the router where it says "Default Gateway" (mine is 192.168.1.1).

At the bottom of the dialog you need to enter the ip addresses for 2 DNS servers. You can again get these from your router's setup utility. Go to the Status page in the router setup and pick any 2 from the 3 listed just below where it says Default Gateway (note: don't use the subnet mask and default gateway values from this page in the previous step as these are the values from your isp. You need to get the subnet and gateway values from the Basic Setup page in the router setup i.e. the internal LAN values).

And once you've done that your server will now retain it's ip address independantly of what the router may be doing.

HTH...
Reply
#4
thank you both for your replies... learned something from both.
Reply
#5
I should add that with my suggestion if the router reboots you will lose the ip's it his set with an "infinite" lease time and then re-assign them in whatever order the PC's on the network handshake with the DHCP server.

PhatBoy's suggestion it is more precise for keeping a network but IP conflicts can occur if your not careful; although its not difficult to fix.

I would tend to go with PhatBoy if you will have PC's on your network constantly, however if you only use a router to hook up a friends PC for a LAN game its not worth the hassle of assigning IP's just to switch back to DHCP whenever your finished. iykwim
Clanplanet.co.uk Gaming Servers
Licensed Ventrilo Host - AA Honor Provider - Great Service & Prices
Reply
#6
Yep swings and roundabouts. Just go with whichever option is the least hassle overall.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)