Author Topic: dhcp and static ip  (Read 752 times)

Offline richdave

  • Jr. Member
  • **
  • Posts: 27
dhcp and static ip
« on: September 13, 2010, 11:25:16 AM »
Can you have both a static ip and dhcp with one NIC?  If yes, how do you do that?  My searches have come up empty, but I suspect not.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6252
Re: dhcp and static ip
« Reply #1 on: September 13, 2010, 11:50:28 AM »

a computer needs an ip address before it can do anything on the network. When a computer joins a network, it can ask a network to give it an ip address(dhcp) or it can ask a network to use an address of its choice(static).

you can not join a network with both options. You will have to choose one or the other and you can do that in pcc networking section.

what exactly are you trying to do
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline richdave

  • Jr. Member
  • **
  • Posts: 27
Re: dhcp and static ip
« Reply #2 on: September 13, 2010, 12:07:38 PM »
I thought not.  DHCP for internet, static for network. 

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: dhcp and static ip
« Reply #3 on: September 13, 2010, 12:36:10 PM »
I thought not.  DHCP for internet, static for network. 

Your internet IP is what your ISP gives you. Your network IP is what the choice of DHCP or static gives you.

I have applications that communicate with the internet on specific ports. To set the router firewall to allow the opening of these ports, for my specific machine, I must have a static IP. If I used DHCP, all the computers on the network would have to be booted in exactly the same order, each time, to insure I got the same IP assigned to me. This is highly unlikely.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline ThirdOfSix

  • Hero Member
  • *****
  • Posts: 745
Re: dhcp and static ip
« Reply #4 on: September 13, 2010, 09:27:02 PM »
richdave,

If I am reading this thread right, you probably ought to Google "NAT" (network address translation).

If that does not clarify the issue for you, come back and ask some more detailed questions.

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: dhcp and static ip
« Reply #5 on: September 14, 2010, 01:41:44 PM »
It's not common, nor straightforward...you're looking to create an "alias"
(for example: http://articles.techrepublic.com.com/5100-10878_11-5590748.html).

This will give you "virtual" Ethernet adapters (the first, for example, as eth0, the next as eth0:0, then eth0:1, and so on).

It is possible that one of these could be dynamic, and another static, but I'm not sure what you would expect to accomplish from it (unless you plan to have separate networks share the same wire...also not common in home networking...)
Otherwise, it is usually used as a transitional tool, when a server takes over from a pre-existing server, and it's more trouble to re-configure clients, etc., in legacy situations...

More common are dual-homed systems...computers with multiple physical NICs, connected to disparate networks (or, sometimes, aggregated on the same network for redundancy and/or improved performance)...

Offline yodelu

  • PCLinuxOS Tester
  • Sr. Member
  • *******
  • Posts: 317
Re: dhcp and static ip
« Reply #6 on: September 14, 2010, 03:06:41 PM »
Can you have both a static ip and dhcp with one NIC?  If yes, how do you do that? 

Yes you can - on my computer i have two NICs configured as below -
 If you NIC runs in LAN and in that LAN runs a DHCP server then your DHCP server must reserve you an IP by your NIC's MAC adress
If your NIC runs in WAN then you must tell to your internet provider to give you a static IP (in this case you have to pay for this :-( )