On Fri, 2005-11-25 at 20:14 +0200, Maxim Vexler wrote: 
> On 11/25/05, Kenneth Jacker <[EMAIL PROTECTED]> wrote:
> >   am> If you're using DHCP and you want to have "static" IPs for your
> >   am> devices what you need to do is assign a static lease on the DHCP
> >   am> server.  Assuming you're using dhcpd you'll want something
> >   am> similar to this in your dhcpd.conf:
> >
> >   am> host yourhostname {
> >   am>   hardware ethernet 00:11:22:AA:BB:CC;
> >   am>   fixed-address 192.168.0.123;
> >   am> }
> >
> > Good idea!
> >
> > However, 'dhcpd' is running within my LinkSys router, not on one of my
> > Debian boxen ...
> >
> > I spent quite a few minutes going through the router's option pages,
> > but couldn't see a way to specify this.
> >
> > Anyone know how to configure a LinkSys router to use the above approach?
--snip-- 
> I believe you would find man page of interface(5) useful for your needs.
> Especially concentrate on the mapping script
> 
> Quoting the man page:
> <<<
>        Stanzas defining logical interfaces start with a line consisting of the
>        word  "iface" followed by the name of the logical interface.  In simple
>        configurations without mapping stanzas this name should simply  be  the
>        name  of  the  physical  interface  to which it is to be applied.  (The
>        default mapping script is, in effect, the echo command.)  The interface
>        name  is  followed by the name of the address family that the interface
>        uses.  This will be "inet" for TCP/IP networking,  but  there  is  also
>        some support for IPX networking ("ipx"), and IPv6 networking ("inet6").
>        Following that is the name of the method used to configure  the  inter-
>        face.
> >>>
> 
> You could set inside the mapping script a "static" IP but let dhcp
> configure the rest.
> See also /usr/share/doc/ifupdown/examples/network-interfaces.gz for
> "confirmed" mapping examples.

While it would be possible to write a custom ifupdown script to run
after DHCP supplies you with any necessary info, it would be far from
the ideal solution.

Specifying a static IP in /etc/network/interfaces with the dhcp option
set would also not work as the dhcp option would cause any static IP's
listed to just be ignored.

The "correct" way to do this is to use a static lease. That's the reason
that static leases exist in the DHCP spec in the first place.

-- 
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to