Windows Giving myself a "permanent" local IP

Discussion in 'Software' started by mattyh1995, 5 Nov 2012.

  1. mattyh1995

    mattyh1995 Minimodder

    Joined:
    1 Oct 2011
    Posts:
    795
    Likes Received:
    25
    Basically, I host a private minecraft server on and off and occasionally I'll need to make changes to my local IP in my router's port forwarding settings and it's a real pain. Is there a way to get the IP to stay the same so I don't have to keep editing the rules?
     
  2. goldstar0011

    goldstar0011 Multimodder

    Joined:
    2 Sep 2007
    Posts:
    3,415
    Likes Received:
    304
    My Netgear lets me always assign same IP to any computer and device
     
  3. ferret141

    ferret141 Minimodder

    Joined:
    18 Oct 2010
    Posts:
    1,314
    Likes Received:
    40
    First of all we need to know what brand and model router you have so we can gudie you through it.

    However if you want to exxperiment. What you're looking for is turning off DHCP and setting up static IPs
     
  4. GeorgeK

    GeorgeK Swinging the banhammer Super Moderator

    Joined:
    18 Sep 2010
    Posts:
    8,666
    Likes Received:
    504
    On my Netgear it's under LAN setup - Address Reservation. Depending on your router's model you may be able to do something similar - on mine you just need the MAC address and then you can specify an IP for it.
     
  5. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,943
    Likes Received:
    268
    1) reserve an address for the specified MAC on DHCP server configuration on your router.
    2) don't use DHCP, and instead set a fixed IP in an IP range which is not handled by the DHCP server in router. Most routers give away only the 192.168.1.100-192.168.1.200 range, that means anything bellow 100 (except 0 and 1 ) and above 200 (except 255) is usually fine for manual IP.
     
  6. mattyh1995

    mattyh1995 Minimodder

    Joined:
    1 Oct 2011
    Posts:
    795
    Likes Received:
    25
    I have a Virgin SuperHub, crappy I know. Not sure on the specifics of it but it doesn't seem to have that feature that GeorgeK mentioned
     
  7. lancer778544

    lancer778544 Multimodder

    Joined:
    5 Jan 2011
    Posts:
    2,932
    Likes Received:
    396
    Have a look here.
     
  8. Margo Baggins

    Margo Baggins I'm good at Soldering Super Moderator

    Joined:
    28 May 2010
    Posts:
    5,650
    Likes Received:
    268
  9. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    I actually wrote a few paragraphs on this topic for someone in the Gaming section, so here it is again:

    Your network probably looks something like this:

    Your PC ------- Router --------- Internet

    The router divides the entire network into two smaller ones - your home network (in this example only your PC, but this can include many devices), and the external Internet. Your internal IP addresses (for the home network) begin with 192.168.x.x, with the router most likely running on 192.168.x.1. Your router also has an external IP address, for the rest of the Internet to see, which you say begins with 8. Just ask Google for your IP address to get your external IP.

    Now comes the concept of port forwarding. Each service runs on a predefined 'port', a port being a number from 0 to 65535. A common port is port 80, which is used for HTTP which carries most of the Internet web traffic. A Minecraft server by default runs on port 25565. On your internal network, your computer's Minecraft server is accessible by 192.168.x.x:25565. This works fine as your computer's firewall allows port 25565 due to the running Minecraft server.
    But out on the Internet, the 192.168.x.x address means nothing. Trying your external address won't yield anything either, as your router has a built in firewall that by default denies all incoming traffic from the Internet side. Another problem is that you can have multiple computers hosting services running on the same ports - for example if 192.168.0.2 is running a Minecraft server, and 192.168.0.3 is also running one, the router has no idea, should a request come on port 25565 on the Internet side, which computer to send it to.
    Thus port forwarding needs to be set up on the router. This rule tells the router that all traffic arriving on the Internet side on port 25565 (Minecraft) should be sent to a particular IP address on the internal network. This also allows port 25565 through the firewall. If it is set up to allow port 25565 to reach 192.168.0.2, all traffic arriving on the Internet side (using your external IP address) on port 25565 will be redirected to 192.168.0.2 on the internal network, and through this, everyone can access your Minecraft server.

    An analogy of this would be a guard at a security checkpoint to a compound. He knows that all traffic arriving should not be allowed inside the gates to prevent a security breach (the firewall). But he also knows that any lorries from NuclearWeapons'R'Us should be forwarded to the nuclear test laboratories (port forwarding). Thus the lorries (Internet traffic) get to the correct destination (your server) and they can drop off their cargo (game data).

    To set up port forwarding, go to your router configuration page and go to firewall settings or the like. You may need to create a 'service' first at port 25565 (just use both TCP and UDP) then allow that in the firewall. Forward to your computer's IP, but you may want to set it as static so look below first.



    Now we deal with static IP addresses. Each computer on your network is given an IP address by the router when they are turned on. Unfortunately, this can change depending on when the computer is turned on in relation to the others. This means that a port forwarding rule to 192.168.0.2 is valid until the machine is rebooted - then it cannot be guaranteed that 192.168.0.2 is assigned to the same computer. Imagine the confusion if the nuclear weapons shipment arrived at the cafeteria instead!
    The solution is to make your machine's IP address static. You first need to change the DHCP settings on your router - these are responsible for handing out the addresses. The range is probably defined as 192.168.x.2 to 192.168.x.254 - change the first one to 192.168.x.10 or something. This will stop the router assigning the first 8 IP addresses, so that you can use them as static IPs. These options are likely to be under LAN settings or similar.
    The next step is to change your computer to run on a static IP address. Assuming it is running Windows 7 - get to the Network and Sharing Centre, then click on Change adapter settings in the left pane. Right click on your network adapter and choose properties. Select Internet Protocol version 4 (or similar) in the drop down box, then click Properties. Choose Use these IP addresses, and set them to the following:
    Code:
    IP address = 192.168.x.2
    Subnet mask = 255.255.255.0
    Default gateway = IP address of router, most likely 192.168.x.1
    And the DNS settings:
    Code:
    Primary = Router IP address
    If these settings prevent you from going on the Internet, try replacing the DNS settings with the following:
    Code:
    Primary = 8.8.8.8
    Secondary = 8.8.4.4
    This will set your computer to use the Google Public DNS servers.
    If you want pictures to guide you through the process, look at this guide here.
     

Share This Page