[ipxe-devel] Adding lldp-agent to ipxe
Thomas Mieslinger
miesi at pc-h.de
Thu Sep 12 10:05:26 UTC 2013
Hi Robin,
thanks for quick and positive answer.
I'm using ipxe as a bootloader in a server assimilation environment. The
script is at the moment
#!ipxe
cpuid --ext 29 && set arch x86_64 || set arch i386
:retry_dhcp
dhcp net0 || goto retry_dhcp
set filename
http://\${gateway}/ipxe/assimilation/boot?mac=\${net0/mac}&manufacturer=\${manufacturer:uristring}&product=\${product:uristring}&serial=\${serial:uristring}&arch=\${arch}
echo mac: \${net0/mac} ip: \${net0/ip}
echo manufacturer: \${manufacturer} product: \${product} arch: \${arch}
echo serial: \${serial}
chain \${filename} ||
ifstat net0
echo Booting \${filename} failed, dropping to shell. Type reboot to reboot.
shell
The server script returns a default boottarget based on vendor, 64bit
capability.
The server script also generates an overview page where one can see
which computers are under assimilation.
It would be helpful for that overview page if I could display the
switchport right away.
So for me, I'd just need PortID and PortDescr. But for other uses, I
guess that ChassisID, SysName and SysDescr could be useful.
For naming ipxe variables, I'd propose the trick to compose the name of
a prefix and the original variable name. Example: lldp-PortDescr which
then would be used as ${net0/lldp-PortID:uristring}.
Ok, so the next step would be wait for the approval of the variable
names and then to propose a patch.
Regards
Thomas
On 12.09.13 11:01, Robin Smidsrød wrote:
> On 12.09.2013 08:24, Thomas Mieslinger wrote:
>> it would be helpful for my tasks, if I could know the switchport the
>> computer is connected to, during the execution of ipxe.
>
> The first step in trying to get any feature into ipxe is to explain how
> you'd use it (e.g. in a script), and what use-case it solves for you.
>
> I can see the value in LLDP information being available, and it would
> make sense to expose it as an information scope beneath each network
> device (similar to DHCP/ProxyDHCP). What values from LLDP are you
> primarily interested in? Just the switch port, or something else as
> well? Naming the variables is always tricky, as the name cascades down
> to the global scope, and overlapping names can cause scripting issues
> (as we saw with builtin/version).
>
> Once a proper syntax has been decided you'd have to come up with a patch
> that implements that behavior (unless you can convince someone else to
> do it for you).
>
>> Has anyone ever tried to add lldpagent to ipxe? Is the license of ipxe
>> compatible with the MIT License of http://vincentbernat.github.io/lldpd/?
>
> I believe it is possible to include MIT-licensed code into a GPL
> codebase, from what I've seen at tldrlegal.com. Not sure if we'd want to
> use any of the code from lldpd, though. Small code size is of paramount
> importance in iPXE, and most other non-embedded projects care little for
> that.
>
> -- Robin
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
>
More information about the ipxe-devel
mailing list