0

My laptop is connected to the internet via a wifi router. In other words my router is connected to the internet. When i check my ip address via a web service i see that the ip address keeps changing. The ip address that my router gets yesterday is different from what i get today.

1) I am wondering when is a computer given a static ip address?

2) Does one need to pay for a static ip address?

3) Since the point of ip address is to uniquely identify a computer in a network, shouldn't the address be always static? in other words if the address keeps changing then how can it help in uniquely identifying a computer?

I appreciate any help to the above curiosities i have. Thanks a lot!

3
  • You might need to clarify which address is being changed. There would normally be 2 addresses involved. 1 is the 'local' address, which is commonly assigned by your router, to your machine, and Identifies the machine to the local network. The other is the 'External' this is assigned by the ISP and identifies the router to the internet. Your router handles the translation of connections between the 'local' network and the internet. – Stese Apr 13 '17 at 8:27
  • thanks! is it true that if i connect bunch of computers to my wifi router then the computers form a lan and NAT is used for address translations? – user734861 Apr 13 '17 at 8:29
  • Yes. Thats correct. Each machine will have it's own local address, but would 'appear' to only have one internet address. – Stese Apr 13 '17 at 8:31
2
  1. This is different from ISP to ISP. Some ISPs only give static IP addresses, but most give dynamic IP addresses. You should talk to your ISP about this.
  2. Some ISP's charge money for it.
  3. You can identify it by mac address for example. The ISP can also see who were assigned the IP at a given time.

If you need static IP addresses on your local network you should be able to do that in your router.

To better help you it would be interesting to know why you want a static IP address. Services like dyndns might be able to help you if you just want to host some kind of service at home.

2
  • thanks! is it true that if i connect bunch of computers to my wifi router then the computers form a lan and NAT is used for address translations? – user734861 Apr 13 '17 at 8:30
  • Yes. You can use NAT to forward different ports from the internet into your LAN. – Mikael Kjær Apr 13 '17 at 8:44
2
  1. Your computer is given an IP address by the router or other DHCP server. ( DHCP is Dynamic Host Configuration Protocol). It would be considered 'static' when the DHCP Server is set to give the same address each time.

  2. Does one need to pay? That depends on if you are talking about a local or internet address.

For local addresses, if you have access/control of the DHCP Server (router, or whatever) then no, you don't. Most have the ability to permanently assign a local address to a particular computer (It does this by checking the MAC address is the same).

For an external address, then that would depend on your ISP. Some charge to do this, some don't.

  1. The address only needs to be static if you are expecting connections that start from outside the concerned machine or network. In things like web browsing the connection is instigated from the machine, and contains the information of where to send the response, this a static address is not required.
2

1) I am wondering when is a computer given a static ip address?

Typically when that computer hosts a service that needs to be accessed by other computers.
Such computers are commonly called servers.

2) Does one need to pay for a static ip address?

Typically an ISP will charge extra for providing static IP addresses.
On your private LAN, which is provided by your router, you are free to use dynamic and static IP addresses.
Your wireless router is assigned a static IP address for its LAN-side interface. This ensures that all hosts in your LAN can find the router.

Note that DHCP can hand out a reserved IP address as well as a dynamic IP address. This reserved address would always be provided to a host specified by MAC address.

3) Since the point of ip address is to uniquely identify a computer in a network, shouldn't the address be always static?

Typically only servers need static (i.e. known) IP addresses.
When you use your web browser on your PC, you're the client in the client-server model. The client makes a request to the server (e.g. Google or Amazon).
The server handles the request by returning a response back to the client.
In theory the client could use a different IP address for each request, because the request contains the return address of the client.
Hence the client (e.g. your PC) does not need a static IP address.

in other words if the address keeps changing then how can it help in uniquely identifying a computer?

There are other mechanisms for finding hosts on a network.

You might use a hostname rather than an IP address to identify a host. Then you need a DNS server to maintain and map hostnames to IP addresses. (Windows has its own protocol/service to keep track of Windows hosts on the LAN, e.g. the workgroup or homegroup.)

Each Ethernet interface is identified by a MAC address. The ARP protocol is used to map an IP address to a MAC address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.