DHCP with static address
Jonathan
dj_goku at boobie.no-ip.com
Tue Aug 24 04:37:29 CDT 2004
On Mon, 2004-08-23 at 15:46, Gene Dascher wrote:
> I am running Gentoo on an AMD box. Is it possible to set up my NIC for
> dhcp from a Linksys router, but give it a static IP address? I would
> like my machine to have the same IP address, but be able to get new DNS
> server entries, etc. when necessary.
>
> Thanks
> Gene
Well if you were using your Gentoo (tm) box as a dhcp server you would do something like this:
shared-network LOCAL-NET {
option domain-name "blah.test";
option domain-name-servers 24.94.165.25, 24.94.163.113,
24.94.165.132;
default-lease-time 60000;
max-lease-time 72000;
subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.1;
range 10.0.0.4 10.0.0.10; }
host test1
{
hardware ethernet 00:00:AA:BB:CC:DD;
fixed-address 10.0.0.2;
}
host test2
{
hardware ethernet 00:00:00:AA:BB:CC;
fixed-address 10.0.0.3;
}
}
NOW to your question. I would just say look in /etc/conf.d/net for
setting a static ip. Just enter in the information of what the Linksys
router sets, and make sure not to use an ip in use =). Other then that
it should just work just fine. Oh and comment out all dhcpd references.
Example: /etc/conf.d/net
iface_eth0="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0
Jonathan
More information about the Kclug
mailing list