Why to give your computer a static IP
BitTorrent file transfer requires connectivity between peers, so that they find each other. In practice, most users have their PC behind a modem and/or router, which create a private network for the user's local network utilising NAT technology. With NAT, your computer gets semi-randomly a new local IP address from the router with DHCP technology. Typically DHCP addresses have a defined "lease-time" and they may change at each renewal from the server.
That new IP address works only inside your local network. For incoming new connections to reach your PC, you need to tell your router where to forward the incoming packets. For you to be able to give the router permanent port forwarding instructions, your computer needs to always have the same local IP address.
So, in this context, we are not talking about having a static IP address from your ISP, but instead about having a static IP address inside your local home network.
Also note, that usually in a small home network you will get the same address from the router in any case, so I wouldn't worry too much about setting the fixed/static IP address. This is the least important step in port-forward config in home network.
Setting static IP in router
Easiest way to do this is to configure your router to do that, if possible. Then you do not have to touch the settings in computer at all.
Several possibilities, how your router might support this:
- by setting the default lease-time to "forever" for all given DHCP addresses. There won't be so many computers in your home network, that you would run out of addresses.
- In most cases, also a long lease time (like 2 weeks) is enough, as you most likely boot your computer at least that often.
- by setting a fixed / reserved DHCP IP address for certain (your) computer. In many cases the router supports reserving an address to a certain hardware MAC address. You network card/chip has a fixed hardware MAC address, by which the router recognises it.
- Typically you see a list of given DHCP addresses in router's config, and it offers you a possibility to mark some of them reserved/permanent or something like that.
If your router does not support that, you may have to do the settings in your operating system. Below is some short advice for some operating systems, but also read http://portforward.com/networking/staticip.htm for step-by-step guides for different operating systems.
You do the settings in the TCP/IP settings of your operating system (OS).
Open a CMD command box and write command: IPCONFIG / ALL
That should give you info on the current settings. Write down IP adress, netmask, gateway and DNS server(s) addresses.
What you need to set is more or less the same for every OS, see the example snapshot:
Make sure that the parts of the IP highlighted in green are exactly the same (in the example 192.168.0).
- Main settings
- for IP address you select a new static IP address. (read advice below)
- same Netmask as earlier. In home networks typically 255.255.255.0
- your router IP as Default gateway. (The address shown as gateway in IPCONFIG, and also the address you entered into browser to get into router config screens.
- as Preferred DNS server you should set the same values as currently. Usually they are addresses of your ISP's DNS servers, but some home routers do have own DNS functionality, and then you could use also them (like in the picture above).
- Selecting the static IP address
- Typical home router have a 256-address subnet, in style 192.168.0.(0-255), so that your freedom is limited to the "last number" of the IP address.
- 0 and 255 are forbidden addresses, and typically the router takes either 1 or 254, so other computers can use 2-253.
- Router's DHCP settings define a range, which it then reserves for DHCP addresses. (Most likely, your computer has originally got its current IP from that range by DHCP.) Typical DHCP range in 100-199. It depends quite much from the router, thus read the router manual and check its settings.
- For your PC, you need to select a free address outside that DHCP range. For example, if router has address '1' and DHCP range is 100-199, you could select any address from 2-99 and 200-254.
- 200-250 is rather safe range in most routers.
The router IP is the address that you use in your browser to setup your router, using the web interface. Your router IP might be different, check your router manual (on paper, CD or online) - most common IPs are these:
- Open System Preferences from the finder drop down menu
- Open Network
- Show: Airport or Built-in Ethernet depending on the way you connect to the Internet (wireless or not)
- In the TCP/IP tab, choose Using DHCP with manual address
- Write your IP address: you can only choose the last number of the group of 4 numbers making up the router's IP address:
- router: 192.168.0.1 ... your computer: 192.168.0.22 (for instance)
- You can now go set up your router to forward the Options > Connection > Incoming TCP listen port Azureus uses.
Read the Azureus FAQ