Re: Kickstart http parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2 Apr 2003, Tony Nugent wrote:

> On Tue Apr 01 2003 at 21:56, John wrote:
> 
> (G'day John!  How's things out west... lots of drought-breaking rain?)

We have a Mediterranean climate here - still confuses my wife. Hour
normal summer is your drought.


That said, we've had some autumn rain, and it surely poored down. Like
munitions over Baghdad. 

Of course, I speak only of Perth. Inland, up north, down south -
different climates, different expectations.


> 
> > On Mon, 31 Mar 2003, Daniel Nilsson (GIS) wrote:
> 
> > > Is there a way to get the ethernet-adress of a client when its
> > > requesting the ks.cfg-file from a http-server?
> > >
> > > I want to generate the ks.cfg with a cfg-script and the only
> > > unique id on my hosts is ethernet-adress.
> > 
> > If you use cgi to generate the ks file, then you can use the arp command
> > (/sbin/arp -n) to get the IP and MAC addresses of those hosts known to
> > your kernel.
> 
> Just a small point here (and almost off-topic)... the /sbin/ip
> utility can often (usually) be a far more useful (and powerful) tool
> for doing things like that.  It would be very easy to grep and then
> sed hardware addresses from the output of "/sbin/ip n".

That supposed the two machines are on the same subnet. That is not how
my LAN is structured: my debs and rpms are on my primary server, and
there's a firewall between there and the clients I install on.


> 
>   The /sbin/ip utility replaces (and obseletes) /sbin/route
>   /sbin/arp and /sbin/ifconfig (and gives access to a huge amount of
>   other networking functionality within the kernel, such as policy
>   routing).
> 
> It would require some cleaver server-side magic (eg, using php) to
> generate or supply kickstart config files based on client hardware
> addresses (certainly not impossible to do:)
> 
> But in the end, wouldn't it be much easier to have a dhcpd server
> allocate static IPs based on the HW address, then have the
> host-specific ks.cfg file available based on IP rather than HW
> addresses?  (This is the more traditional approach).


As I've already pointed out, you cannot rely on MAC addresses unless you
have the knowledge that the server and client are on the same piece of
wire.


What you can rely on having is an IP address, but on _my_ LAN that would
be the IP address of the firewall, NMBG either.

Now, if you're using PXE bootroms, everyting is probably on the same
wire and all is good.

If not, then you get to use boot floppies. I'd not put the ks files on
those though, I'd have them request the ks file from the server, and the
server can use CGI, and the CGI sacript can use the client's IP address,
information from the URL, the time of day and date to figure out what to
put in the ks file.

This way, if you want to change a configuration, you don't have to
recall all the boot floppies. If you want to withdeaw a configuratio,
you stop the server from generating it.



-- 
Please, reply only to the list.






[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux