Ask Leo!

How do I configure my static IP address?

Home » Networking » Network IP Addressing

Summary: Once you've been assigned a static IP address you'll need to configure the network-connected device manually to use it. We'll look at how.

I have a server, and have been assigned a static IP by my ISP. How do I go about configuring my server to work on its assigned IP?

99% of Windows internet users use what are called "dynamic" IP addresses. That means each time you connect to the internet, your ISP assigns you an IP address to use when you connect. The next time you connect, you might get a different address. If you're only connecting out to the internet, that's all you need.

If you expect people to connect in, say you want to run a web server that you want people to be able to find and visit, you'll most likely need a static IP address. A static IP is assigned by your ISP to you permanently, and identifies your server to the world.

The question is: once the IP is assigned ... then what?

If your computer is connected directly to the internet, meaning it's not behind a router or a firewall, it's actually pretty simple. In Control Panel, Network Connections, find the network connection that represents your connection to the internet. Most often it's labeled simply Local Area Connection. Right click on that and select properties. Now click on the Internet Protocol (TCP/IP) item in the list (you may have to scroll down within the list to find it):

Local Area Connection Properties

Now click on the properties button.

A default configuration will have both Obtain an IP address automatically, and Obtain DNS server address automatically selected.

Internet Protocol Properties

Click on Use the following IP address: and enter the IP address, subnet mask, and default gateway information that your ISP should have given you. (If they did not give you all three, ask them.)

In most cases they will also give you IP addresses for the DNS servers you should use. Click on Use the following DNS server addresses, and enter that information as well.

That's it. Once you "OK" your way out of those configuration dialogs, your computer should now respond to its assigned IP address.

If you're behind a router, things get a little more complicated.

The first thing to realize is that the static IP address should probably be assigned to the router. That will require configuring the router, much like we configured your server above. Exactly how will vary from router to router, but the principals are the same: you'll configure the router to not get an IP address dynamically, but instead you'll enter the IP, gateway, subnet, and possibly DNS information by hand, using whatever approach your router uses for configuration.

The "trick", if you want to call it that, is telling the router to pass on requests it receives from the internet to your server. It's typically referred to as port-forwarding. Once again, depending on how your router is configured, the general idea is that you configure it to accept requests on certain "ports" and direct them to certain computers on your LAN.

The port part is fairly easy. If you want to set up a web server, then you'll know that port 80, where http requests are handled, is the port you want to forward. But to where?

Much like your direct connection to the internet, you'll need to assign your server a static IP address within your local network, so that the router knows what machine to forward the requests to. Typically a router will tell you, or let you configure, the range of IP addresses it will assign from dynamically, so you'll simply want to choose an IP address outside of that range. For example my router at home is configured to assign dynamic IPs starting at 192.168.1.100 and up. So I've elected to assign a static IP on my local area network of 192.168.1.2 (192.168.1.1 is the address of the router on the local network).

So the rest is simply a variation on what I've already covered: configure that server with the static IP you've chosen, a subnet mask of 255.255.255.0 should do, the default gateway should be the router (192.168.1.1 in my case), and quite probably the router should also be your DNS. If not, use the DNS settings that your ISP assigned you.

Now configure the router to forward port 80 traffic to the static IP address you chose, and ... there you are. Your web server, behind a router, should be visible from the internet.

Port forwarding is actually very powerful, when set up correctly. In my case, I have port 80 traffic, for a web server, directed at one machine, Remote Desktop traffic (port 3389) is directed at another, and Skype (a post Skype selects randomly at setup time) to yet another.

Related:

Article 8682 | Posted June 16, 2005

Recent Comments
102 Comments

I am having issue with my static IP address. I followed your instructions and was able to connect to the internet. I am using Windows XP. However, it seems that every other day my computer resets the IP protocol to "obtain an IP address automatically" and I have to manually input the static IP address along with all the other subnet mask and default gateway addresses. I can't figure out anyway to get it to stop. Every other day like clockwork it simply resets itself and I have to reconfigure the address. Any ideas?

Thanks,

Posted by: Chad at May 24, 2008 12:14 AM

Hi all!
I have an static IP adress and my conection works fine, until after some hours, 4, 8 or what ever it loses connectivity.
Every thing seems to be OK and suddenly there is no connectivity.
I think is something with my ISP DNS to do, because when I set the ipconfig/registerdns command, it works igen for a while, but it seems not to be the best solution.
What I have to do is unplug the modem (reset under a couple minutes) plug again and it works again, until the next 3,4 hours.
What can it be? TTL that does not map my ip or what?
I called my ISP, but they couldn“t solve the problem...
Any ideas?

Posted by: Cocco at July 9, 2008 2:42 PM

Hi Leo,

I have some questions about installing a second server in a network, the existing one is SBS 2003 and is the file server/emails/DC/basically everything in one.

I'm wanting to add a second server running 2003 server standard and wondering if its possible to do all that you mentioned in this article including assigning a static ip address (do i have to get another static ip address assigned to my 2nd server??)?

You mentioned that you had your port forward different programs to different pc's and just wondering if i can use this type of system?

It is also because i want to create a new domain for this server and its users, and if possible i would restrict both servers from being able to communicate from each other.

Any help with this would be very much appreciated

Posted by: Jon at July 9, 2008 8:16 PM

i got ps3 and i have the router WRT54G and i keep getting disconnected from network every time i go online gamming with it

Posted by: Brandon at July 14, 2008 4:57 PM

Hi Leo,

Many thanks for your easy to use notes and advice - you hit just the right level of technical explanation for me.

Keep it up,

Pugwash :-)

Posted by: Captain Pugwash (AKA David Gard) at July 28, 2008 2:29 AM

How do I configure my static IP address in Red Hat EnterPrice Linux 3.

Posted by: Santhosh Chully at August 5, 2008 4:59 AM

If I set up a fixed IP address for my work server so that I can log into it from home. Does this mean I need to adjust all the computers on my work network or will it only need adjusting on the server and my home computer?

Posted by: Matt Debreczeni at September 1, 2008 10:26 PM

hey! I want to know how do i configure an IP address without using a router but a switch.
and if we add one computer how do i connect it to the server and give it own IP address and connect it to the network station.

Posted by: ace at September 6, 2008 5:14 AM

Hi Leo,

Great page. Simple and told me exactly what to do to set up my router to forward ports. Thanks!

Posted by: Matthew Paine at September 19, 2008 7:14 AM

The explanation is very good and easy to understand for a new user..............

Posted by: varun at September 28, 2008 10:54 AM

Post a comment on "How do I configure my static IP address?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

New!

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Ask Your Question:


ask-leo.com
Web

Stay Informed

Weekly Newsletter

Archives

By Category
By Date

Advertisers

Advertise on Ask Leo!

««   »»

Question? - Ask Leo!
Who is Leo?
Link to Leo!

Terms, Conditions & Privacy