Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,516 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,754 people online right now. Registration is fast and FREE... Join Now!




Static IP and DHCP

 
Reply to this topicStart new topic

Static IP and DHCP, How to configure DHCP-server with Static IP client?

jens
13 Aug, 2008 - 02:19 AM
Post #1

D.I.C Head
Group Icon

Joined: 9 May, 2008
Posts: 113



Thanked: 3 times
Dream Kudos: 150
My Contributions
Hello!

Suppose my firewall router is on the adress 1.2.3.4 and that the safe side is 192.168.0.0 - 192.168.0.254 with the firewall router as 192.168.0.1. The firewall router also acts as a DHCP server.

Now I want to have a fileserver with static IP of 192.168.0.10. What is the correct or best way of solving this?

1)
I configure the file server to have a static IP of 192.168.0.10 and tell the DHCP server to hand out IPs 192.168.0.11 - 192.168.0.200.

2)
I configure the file server to have a static IP of 192.168.0.10 and tell the DHCP server to hand out IPs 192.168.0.0 - 192.168.0.200.

3)
I configure the file server to have a static IP of 192.168.0.10 and tell the DHCP server to hand out IPs 192.168.0.0 - 192.168.0.200 reserving 192.168.0.10 for the file server.

4)
I configure the file server to have a dynamicIP and tell the DHCP server to hand out IPs 192.168.0.0 - 192.168.0.200 reserving 192.168.0.10 for the file server.

5)
None of the above, the best way is to....

Please elaborate a little on why your sulotion is the best or correct way. Currently I'm using (1).

/Jens

This post has been edited by jens: 13 Aug, 2008 - 11:24 AM
User is offlineProfile CardPM
+Quote Post

DeCompile
RE: Static IP And DHCP
13 Aug, 2008 - 02:31 AM
Post #2

D.I.C Head
**

Joined: 20 Jul, 2008
Posts: 180



Thanked: 6 times
My Contributions
Depending on your network situation, both 1 and 3 are suitable solutions.

If the file server is only to be accessed locally then allowing the DHCP server to allocate an IP reservation is more advisable as if the DHCP server was to go down then your local clients will still be able to access the server.
User is offlineProfile CardPM
+Quote Post

jens
RE: Static IP And DHCP
13 Aug, 2008 - 11:37 AM
Post #3

D.I.C Head
Group Icon

Joined: 9 May, 2008
Posts: 113



Thanked: 3 times
Dream Kudos: 150
My Contributions
Ok, what will happen in the different cases?

1) No problem. No conflicts and the DHCP is unaware of the file server. But this case makes me wonder WHY there's an option in the DHCP to reserve certain addresses for specific MAC addresses.

2) Might result in address conflicts, or might it really? What will happen when the DHCP tries to give the file sever address to somthing else? Will the DHCP do that, won't it "know" that the address is already in use?

3) Shouldn't be a problem. But if the file server already has an static address and the DHCP expects it to respond in some way? What happens if I change NIC on the file sever in this case?

4) (I edited this due to a typo wich made it hard to understand) In this case the file server is identified by the MAC so if I change NIC on it this will not work. Also, as pointed out, if the DHCP goes down it will be unreachable (but that will be the case anyway I guess, since the work stations have dynamic IP).

I'm just curious.

smile.gif
/Jens
User is offlineProfile CardPM
+Quote Post

DeCompile
RE: Static IP And DHCP
13 Aug, 2008 - 01:59 PM
Post #4

D.I.C Head
**

Joined: 20 Jul, 2008
Posts: 180



Thanked: 6 times
My Contributions
1. This option is there to allow you to reserve IP address for networking hardware that will not accept a static IP address. Then you can allow them to access the DHCP and the DHCP server will assign them a reservation according to their MAC address.

2. The DHCP will still attempt to send a dynamic IP address, but when the client will not accept the address the DHCP server will create an error saying that the IP address is already in use.

3. If you change the NIC in the file server, you will have to update the IP reservation as the reservation is assigned to the MAC address of the NIC and not the actual computer. All NIC's have a unique MAC address.

4. If your DHCP server does go down and all your clients are on a dynamic IP address, they will still be able to communicate with each other by the use of an APIPA address.

This is in the range of 169.x.x.x
User is offlineProfile CardPM
+Quote Post

jens
RE: Static IP And DHCP
13 Aug, 2008 - 10:53 PM
Post #5

D.I.C Head
Group Icon

Joined: 9 May, 2008
Posts: 113



Thanked: 3 times
Dream Kudos: 150
My Contributions
Thank you. I didn't know about the APIPA stuff.

/Jens
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Static IP And DHCP
13 Aug, 2008 - 10:57 PM
Post #6

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,465



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
I was under the impression that the Windows OS assigns the card with a 169.254.x.x address when a DHCP address could not be found, & this does not allow it to communicate with other nodes on the network (even if they are 169.254.x.x), because this is a Microsoft only (adaptation?) technology.

If the card is set to accept an ip from DHCP & it ends up with 169.254.x.x how does resolution work? Since it's set to request an address, & not assign one itself, I would think communication would fail. DeCompile, do you have more information on APIPA? I'd be interested to learn more if this is the case.
User is online!Profile CardPM
+Quote Post

DeCompile
RE: Static IP And DHCP
14 Aug, 2008 - 02:14 PM
Post #7

D.I.C Head
**

Joined: 20 Jul, 2008
Posts: 180



Thanked: 6 times
My Contributions
APIPA is not a Microsoft implementation, it's a standard from the IEEE. The Institute of Electrical Engineers, who design and implement the networking standards used today.

If a network device is set to accept DHCP and it does not receive one, it will revert to a random APIPA address. This means that every device on the network will gain an APIPA device and it makes sure it's IP address is unique by setting it then checking, if it has a conflict it will reassign itself a new one.

Communication over an APIPA assigned network is very slow. It's nothing something that should be used except for extreme emergencies. It will allow an entire network to continue running, it will just loose the ability to route information.

Everytime a device attempts to connect to something over an APIPA network, it will send out a request for the computer with the information it requires. From there, it gains it's own map of the network. Sort of like the hosts file on a computer.

All this information is lost once the network device gains a proper IP address.

There's a lot more information out there than what I could reiterate in a single post. But if you have questions, feel free to ask. It's what I do for a crust smile.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 09:07PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month