Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How is my IP address assigned?

Given that IP address must be unique for every computer
attached to the internet,how is it possible that we do not plug in IP addresses
for the computer we want to connect?

Well, every device connected to the internet must have a unique IP, it’s
true. And they’re assigned one of two ways: static or dynamic. But there’s also
a useful trick that lets multiple computers share a single IP address … and
that trick is called a router.

Become a Patron of Ask Leo! and go ad-free!

Static IP addresses are exactly that: static or unchanging. They are
assigned by your network administrator or ISP, and yes, you do have to
configure the computer or other internet device manually to respond to that
specific address.

But, as you point out, most folks don’t need to do that. So how do they get
their IP addresses?

Enter the dynamic IP address and “DHCP” or Dynamic Host Configuration
Protocol.

Using DHCP (which is the default for Windows TCP/IP connections) the
computer broadcasts a special request for an IP address to the network. An
upstream device, commonly belonging to your ISP, responds with an IP address
that the computer then configures itself to use. Especially when many computers
aren’t connected continuously, this allows the ISP to reuse the IP addresses of
computers that have disconnected from the internet.

If you need your computer to be identifiable on the internet … for example
if you’re running a web server or want people to be able to connect to your
machine, you’ll probably need or use a static IP address. On the other hand, if
all you do is connect out to surf or read email, as most users do, then a
dynamic IP address is the easiest to configure.

Routers are devices that allow multiple computers to “share” a single IP
address. The device that’s connected to the internet is the router, and it has
a unique IP address. The router can then act as the DHCP server to the local
network handing out local IP addresses to the computers connected to it. As
traffic flows across the router, it does the job of translating the IP
addresses from the local addresses it has assigned, to the external IP address
it was assigned, and routing the right bits of data to the right computer …
hence the name.

One of the many side effects of using a router is that it can be assigned a
static address on the internet, and hand out dynamic IP addresses locally, vice
versa, or any combination.

Do this:

Subscribe to Confident Computing! More confidence & less frustration -- solutions, answers, & tips -- in your inbox every week.

I'll see you there!

43 comments on “How is my IP address assigned?”

  1. Hello Sir

    I tried to give static ip address but thats not working at all.when i give command ipconfig no ip address was found

    Thanks

    Reply
  2. Is there any way to fool IP reading websites into thinking you have a different IP from the same computer? For example some websites limit the amount of downloads one IP address can make. Is there any way to make it think I have a different IP address even though I’m on the same computer?

    Reply
  3. when will you post your answer to the question posted by Mark on Nov.2, 2005 asking if you can fool IP reading websites into thinking you have a different IP from the same computer.

    Reply
  4. There’s no way that I know of. Your IP address is fundamental to locating your computer on the network. Trying to “fooling” it would only break the communication.

    Reply
  5. My Pc is connected to a router.
    Say my ip address is 165.58.26.12 and the router assigns the ip address 10.0.0.3 to my PC… what Ip address must i use when setting up an ftp server on my PC. (Submask – 255.0.0.0)

    Reply
  6. A group of IP addresses are assigned to your ISP, it will give you one of it, or they will do something to get one ip address from that group each time you connect to the internet.

    If you do some investigations and some look-ups using http://www.ipgp.net , you will see that IP’s assigned to each country are someway grouped.

    Reply
  7. Say I have a business out of Canada that I’m running from the United States.
    Is there anyway I can get my IP address in the united states to match my business location in Canada? Any help greatly appreciated.

    Reply
  8. I was trying to connect to my internet with a Compaq laptop that was given to me. I have Charter High Speed Internet. It will not connect and after the Charter IT person came out to my house, he said that the Compaq laptop that was given to me has a bad IP address. How do I correct a bad IP address in the laptop?

    Reply
  9. My ISP has given me what they say is a fixed IP address but when I switch off my PC my IP address gets assigned to another PC somewhere else. I don’t use a router so can’t leave it switched on with the fixed ip address stored in it.
    My ISP says “it happens” and I’m “unlucky” to loose my IP address, is this heard of or is there a way around this?

    Reply
  10. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    If it can change, you have a dynamic IP address, no matter what your ISP says.
    What you want, it seems, is a “static” address.

    Thanks,

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFHTgx5CMEe9B/8oqERAiEGAJ4udc3TASYztJ7bi2DyTmk8OKuBowCdHVvo
    wW4lkaf61viyUVPdiORfDxQ=
    =uFvt
    —–END PGP SIGNATURE—–

    Reply
  11. My roommate has my ip address, can they get acccess into my computer through theirs? Like can they see what I do and see my email?
    I gave it to them so they could try to get online with their computer, but now I’m not so sure I should of gave it to them.
    By the way I have a cable connection if that matters and no router.
    Please help!
    Thank you

    Reply
  12. I have a sonicwall TZ 180 and I want to make 3 servers static. For some reason I cannot get the sonicwall to work with static ip addresses that I set in windows (TCP/IP settings). It works just fine with DHCP on router, but I cannot get the servers to work statically. Am I missing something?

    Reply
  13. WRONG! A router connects two (or more) networks together. Look up what a gateway and proxy are. And read a book. It’s always funny to see n00bs writting articles for other n00bs trying to sound like they know what they are doing.

    Reply
  14. I have a hp pavilion desk top,I’m try to set up my quest qiuckconnect,The phone company told me I need to set my IP address to default,How do I do this?

    Reply
  15. if only the last two number is not the same and im getting email from 2 different person from same ip for eg

    ddd.DD.FF.RT
    ddd.DD.FF.HG
    does this mean they using one pc ??

    Reply
  16. setting up a security system with internet connection with a router on the network. however when trying to connect from net no response. when ping the ip message destination port unknown comes up

    Reply
  17. good day Leo

    I have a static IP at home but i cannot get througth to my pc from the my office.

    can you tell me if i have to do some adjustments to my home pc.

    thanks regards

    Reply
  18. Dear Sir,

    I have a static IP configured but I have not connected my home and office computer. my router is connected with my static ip but my both computer not connected… please give me some guide…
    Thanks,

    With Regards,
    Hitesh Joshi

    Reply
  19. What causes multiple computers set for DHCP to fail to the internet. If a static address is assigned it will connect, but it will not connect via DHCP. Or if it does, it drops out eventually. This happens with both ethernet and wireless clients.

    I’d suspect a problem with the router or gateway device. If you have a consumer router, try just rebooting it.

    Leo
    10-Mar-2011

    Reply
  20. can every computer with a external ip address able to ping every other computer to its external ip address.
    I am unable to ping my computer connected using one ISP with my friends ip connected using another ISP provider.

    Sometimes ping is blocked. Usually it works, but not all the time.

    Leo
    28-Jul-2011

    Reply
  21. 1/ Do I need to pay for a static IP address from the ISP? Ex. 125.25.5.1
    2/ If I get this static IP address – I would use it for my router. Can I then create a range for all devices connected to this router? Example 125.25.5.2 – 125.25.5.30…
    Thanks
    Provi

    1) typically, yes, but it depends on your ISP. 2) typically NO. You would have to get those IP addresses from your ISP as well. Usually you would get local IP addresses (192.168.x.x) behind your router.

    Leo
    23-Sep-2011

    Reply
  22. I have satellite Internet service providing a single IP address. I can only connect with one PC on my network. I’ve been told to install a router ahead of our Netgear 16-port switch which is what you’ve described here and it makes perfect sense but will any router work for this application or do I need something very specific?

    Nope, pretty much any consumer-level router should do the trick. It’s perhaps the single most common reason people get, need and use a router at home.

    Leo
    31-Jan-2012
    Reply
  23. Hi Leo,

    Running home office notebook PC computer #1 (Windows XP Home addition Service Pack 3) connected by Ethernet cable to an all in one Motorola Surfboard SBG 6580 modem/router. System working correctly with this configuration; can access the internet through Ethernet connection.

    Problem (error message see below) when disconnecting notebook from Ethernet cable and turning on notebook wireless connection. Wireless device is an Athero AR5005G Wireless Network Adapter with current driver. System properties indicate that network adapter is working properly.

    Error Message – Windows System Error

    There is an IP address conflict with another system on the network.

    I’ve reconnected the Ethernet cable and turned off the notebook wireless adapter, then login to the Motorola all in one modem/router online using IP address 192.168.0.1. Then proceeded to select wireless section then access control section.

    Screen shows Connected Clients:
    IP Address Host Name
    192.168.0.2 2nd Notebook with wireless connection
    192.168.0.4 LG Home Entertainment Center
    192.168.0.7 Wireless Printer

    If I leave the Ethernet cable plugged into #1 Notebook then turn on the wireless network adapter the Desktop Tray shows that the Motorola wireless adapter is now connected and signal excellent.

    Shortly afterwards an error message appears on the 1st notebook screen reading:

    Windows System Error

    There is an IP address conflict with another system on the network.

    Also, internet connection is lost. Must turn off the wireless adapter and select refresh the internet browser to reconnect to the internet through the ethernet cable connection.

    Is there a way I can try and resolve this IP address conflict and be able to use #1 notebook using the wireless adapter?

    Thank you. Gary

    Reply
  24. I have a two part question. Perhaps I lack the understanding to ask the right question or perhaps the answer is too long and interwoven and I am not putting the pieces together. I ran across your page, and wonder if you might help.

    a) how does one IP address become blocked on a “gateway” inhibiting entire populations of customers from one ISP to become blocked from visiting 1 site? (Gateway being the term used by those who “fixed the problem)

    b) How does an IP address get listed by spam sites leading to blacklists, etc. Could this be caused by behavior of the IP provider, the previous assigned user of the IP?

    c) suggested remedy for the above?

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.