1 |
> Question: how does one *make* a static IP? I thought that IP was |
2 |
> assigned by DHCP? Isn't that the way that DHCP works? It leases an IP |
3 |
> to a specific computer, which then gives up that lease when it's done |
4 |
> using it. At that point, DHCP is free to re-lease that same IP to |
5 |
> whomever else requests it, correct? If that's the case, what would |
6 |
> prevent another computer from accidentally obtaining that same IP? |
7 |
> |
8 |
> Otherwise, if this is a viable solution, how do I make it work? I'm |
9 |
> comfortable editing config files, but I just don't know where to go |
10 |
> to do it. |
11 |
> |
12 |
> Thanks again, all, for your help. |
13 |
> |
14 |
> Kris |
15 |
this is a more complicated question than it appears. Let's say, for |
16 |
instance that you have an actual dhcp server, not just a router/ap |
17 |
giving out ips. Now, most dhcp servers allow you to either |
18 |
statically, or dynamically, associate an IP with a MAC address |
19 |
(hardware address). I can set my dhcp server up such that you ALWAYS |
20 |
get the same ip address for a given mac address. This is helpful in |
21 |
some cases where you have more ip space than machines and want to |
22 |
know who gets what. I can either do that by manually adding the mac |
23 |
into the configuration, or by making an infinate lease time. in both |
24 |
cases, you've got a static dynamic address :) |
25 |
|
26 |
if you have more machines than ip space (a class C subnet has on the |
27 |
order of 254 possible addresses), you have to have dynamic dhcp for |
28 |
those. in that case, you have a much shorter lease time, and when a |
29 |
box comes on, it asks for the last address it has, and the dhcp |
30 |
server says "yes" if no one is using it, or "no, use this one" if |
31 |
it's in use. |
32 |
|
33 |
however, IP is NOT limited to using dhcp. you can manually set your |
34 |
machine to have a given ip address (since this is the gentoo list, |
35 |
it's in the /etc/conf.d/net file). if you're manually setting an ip |
36 |
address, you do have to be careful that you're not setting it in the |
37 |
range that the dhcp server will assign. |
38 |
|
39 |
email me offline if you need more detail than that....ip theory in |
40 |
general is a little off-topic. |
41 |
-- |
42 |
gentoo-user@g.o mailing list |