TechLife Australia

Making a PC findable on your local network

WANT TO RUN A SERVER? THEN YOU’LL PROBABLY NEED TO KNOW HOW TO CREATE A FIXED ADDRESS ON YOUR LOCAL NETWORK.

- [NATHAN TAYLOR ]

ONE OF THE prerequisi­tes of running a home server of any kind – web, file, Minecraft, VPN, whatever – is that your server can be found. If you’re running an old-style private Minecraft server, for example, the players will need a fixed address that they can point their client at – either an IP address or a URL. Without that ability, running the server is pointless.

Last month we talked about how you can make your network ‘findable’ on the internet using dynamic DNS. That way, even if you IP address changes, your home network will always be accessible. But there’s another thing you have to consider when running a server – the private IP address of the device you’re running the server on. To understand what this is all about, we need to start with NAT.

THE MAGIC OF NAT

As designed, every device on the internet is given its own unique address – an IP address. That’s how devices talk to each other – they send messages addressed to the specific IP of another device, and the internet works like a mail service, routing those messages to their intended recipient.

As you probably know, most common IP addresses (known as IP version 4 addresses) are made up of a quartet of 8-bit numbers – that is, four numbers between 0 and 255. So an address looks something like: 123.213.123.213. Four 8-bit numbers add up to 32-bits, so an IPv4 address is 32-bits long.

Here’s the thing: if you do that math on that, it works out that there are only 4,294,967,295 possible addresses; a little over four billion. That may seem like a lot, but there are actually more than four billion devices now connected to the internet, so how can you possibly assign a unique address for each?

You can’t. So that’s where network address translatio­n (NAT) comes in. When you connect to your ISP, it will give you one IP address for your home network. That one IP address has to be shared amongst all of your devices. Your router does that through NAT – it keeps the IP address for itself, but then assigns each device on your network what’s called a private IP address, typically in the 192.168.x.x or 10.1.x.x range. These private IP addresses aren’t accessible by the wider world – only your router can talk to them.

So the router then acts as a proxy or relay

for all communicat­ions with the internet. If a local device with a private IP address (let’s say a PC with the private IP 192.168.0.6) wants to talk to the internet (let’s say the website techlife.net) it asks the router to make the connection and relay its messages. The router remembers the connection – it remembers that 192.168.0.6 was talking to techlife.net, so when a response comes back from techlife.net, it knows to forward it on to 192.168.0.6.

However, for people wanting to run a service on their home network, there’s a problem. Private IP addresses aren’t normally fixed. By default, most routers will assign a random private IP address to a device connected to them within a specified range. You PC may be 192.168.0.6 today, but tomorrow it might be 192.168.0.88. Which is an issue when you want to be able to route specific traffic to it, as you would if you ran a server.

The solution is to fix the private IP address of the devices on your local network, which will mean that they never change. It’s not hard, and you only have to do it for the devices you’re running server software on.

FINDING THE LOCAL IP ADDRESS OF YOUR ROUTER

The first thing you will need to know the private IP address of your router, which is known as the gateway IP address. Finding this is easy enough. Just go to a Windows PC, right click on the Start button and select Network Connection­s. Then click on the View your network properties button.

Look for the number next to ‘Default gateway’. That’s the local IP address of your router. It’s the same one you use to log into the router’s admin console. Make a note of it. You might also want to make a note of the DNS addresses.

You can do this on non-Windows devices as well – just go to the network settings and look for the Gateway or router IP address.

SETTING A FIXED IP ADDRESS ON A PC

Most commonly, server software will be run on a PC, so being able to set a fixed IP on one is crucial. Just follow these steps:

01 Right click on the Start button and select Network Connection­s.

02 Click on Change connection properties.

03 Scroll down to where it says ‘IP settings’. Likely it will say IP assignment is Automatic (DHCP). Click on Edit.

04 Change it to Manual, and turn IPv4 on.

05 Fill in the details (it will be pre-populated based on your existing settings):

* The IP address is the IP address that will be permanentl­y assigned this PC. The first three numbers have to be the same as your gateway/router address, and the fourth has to be different and between 0 and 255. So, if your router’s IP address was 192.168.0.1, then you could set the IP address to 192.168.0.10. This will be the permanent address of the PC so remember it.

* The subnet prefix length should be 24.

(On older Windows versions, this would be called a subnet mask and be 255.255.255.0, which is the same as 24-bits.)

* The Gateway is the private IP address of your router, that we discovered above.

* The DNS address is the one we noted above, or you can use Google’s DNS at 8.8.8.8 (primary) and 8.8.4.4 (secondary).

06 Click Save. You now have a fixed IP.

SETTING A FIXED IP ON A MAC

The process on a Mac is similar to a PC, though a little easier since you don’t even need to get the router and DNS numbers beforehand.

01 Open up System Preference­s and click on Network. This will show you the list of network connection­s your Mac has. Find the one (Wi-Fi or Ethernet) that you use to connect to the internet and click on it.

02 Click on Advanced.

03 Click on the TCP/IP tab, and change the Configure IPv4 setting to Using DHCP with manual address. This means that the Mac will still get the gateway/router number and DNS from the router, but it will use a manually assigned address.

04 In the IPv4 address field type in the desired IP address. As on PC above, the first three numbers have to be the same as your Gateway/router address, and the fourth has to be different and between 0 and 255.

05 Click OK.

OTHER DEVICES

Sometimes servers can be run on mobile devices, and network attached storage devices are commonly used for this as well. The process for fixing an IP address is similar to PCs above – find the network settings, switch over to manual settings and enter the details as in step 5 for PCs above. If it asks for subnet mask rather than prefix length, enter 255.255.255.0 for that field.

We should make a special note for mobiles: you cannot get a fixed IP address when you’re connected to a mobile network. You can only fix an IP address when you’re connected to Wi-Fi, typically by going to the Wi-Fi network selection screen and performing a long press on the network name or by going into advanced settings.

Whatever device you’re using, you should now a private IP address that never changes. You’re ready to run whatever service you want.

 ??  ?? Final Fantasy XI is one of a number of online games for which private servers are possible.
Final Fantasy XI is one of a number of online games for which private servers are possible.
 ??  ?? View your network properties.
View your network properties.
 ??  ?? Look for Default gateway. That’s the private IP address of your router.
Look for Default gateway. That’s the private IP address of your router.
 ??  ?? MacOS has the option to keep the router’s assigned settings.
MacOS has the option to keep the router’s assigned settings.
 ??  ?? Click on Change connection properties.
Click on Change connection properties.
 ??  ?? Entering the manual details.
Entering the manual details.

Newspapers in English

Newspapers from Australia