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