Hi all I'm trying to resolve a problem that's recently popped up by turning on auxillary VLANs for our Linux workstations. The problem shows as DHCP failling for anaconda (but always succeeds for PXE). I tried adding 'ipappend 1' to the pxelinux config files but had no joy. I'm thinking that if I write a COM32 module that adds "ip=1.2.3.4 gateway=1.2.3.1 netmask=255.255.255.0 dns= etc" to the end of the append line my problem may be solved. Is there an API call of function to get this info? I've seen the "resolve hostname" (AX=0010h) but it's what I'm looking for. Any ideas? CC NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Coe, Colin C. (Unix Engineer) wrote:> Hi all > > I'm trying to resolve a problem that's recently popped up by turning on > auxillary VLANs for our Linux workstations. The problem shows as DHCP > failling for anaconda (but always succeeds for PXE). > > I tried adding 'ipappend 1' to the pxelinux config files but had no joy. > > I'm thinking that if I write a COM32 module that adds "ip=1.2.3.4 > gateway=1.2.3.1 netmask=255.255.255.0 dns= etc" to the end of the append > line my problem may be solved. Is there an API call of function to get > this info? I've seen the "resolve hostname" (AX=0010h) but it's what > I'm looking for. >There are two ways to do it. API 000Fh "get ipappend strings" will give you the ip= string that ipappend would add. API 0009h can be used to call the PXE stack and get the entire DHCP packets. In 3.50-pre* there are library wrappers for these -- they are called syslinux_ipappend_strings (<syslinux/config.h>) and pxe_get_cached_info (<syslinux/pxe.h>) repectively. -hpa
"Coe, Colin C. (Unix Engineer)" <Colin.Coe at woodside.com.au> writes:> I tried adding 'ipappend 1' to the pxelinux config files but had no > joy.Didn't it work as advertised? It should.> I'm thinking that if I write a COM32 module that adds "ip=1.2.3.4 > gateway=1.2.3.1 netmask=255.255.255.0 dns= etc" to the end of the > append line my problem may be solved.See http://syslinux.zytor.com/archives/2007-April/008308.html for a patch that does what you need (if I understand it correctly). Basically, it lets you use macros in the kernel command line, which expand to values read from the DHCP packet. So in your pxelinux config file you would write something like label example linux vmlinuz-2.6.18 append ip=$YIADDR$ gateway=$ROUTERS$ netmask=$MASK$ dns=$DNS$ In the previous you can find another path, which probably does almost the same. My patch is against 3.50-pre2, by I'd expect it to apply to the current 3.50 release candidate. If it does not, I'm willing to shake it into form. -- Cheers, Feri.
> "Coe, Colin C. (Unix Engineer)" <Colin.Coe at woodside.com.au> writes: > > > I tried adding 'ipappend 1' to the pxelinux config files but had no > > joy. > > Didn't it work as advertised? It should. > > > I'm thinking that if I write a COM32 module that adds "ip=1.2.3.4 > > gateway=1.2.3.1 netmask=255.255.255.0 dns= etc" to the end of the > > append line my problem may be solved. > > See http://syslinux.zytor.com/archives/2007-April/008308.html > for a patch that does what you need (if I understand it correctly). > Basically, it lets you use macros in the kernel command line, > which expand to values read from the DHCP packet. So in your > pxelinux config file you would write something like > > label example > linux vmlinuz-2.6.18 > append ip=$YIADDR$ gateway=$ROUTERS$ netmask=$MASK$ dns=$DNS$ > > In the previous you can find another path, which probably > does almost the same. My patch is against 3.50-pre2, by I'd > expect it to apply to the current 3.50 release candidate. If > it does not, I'm willing to shake it into form. > -- > Cheers, > Feri. > > _______________________________________________ > SYSLINUX mailing list > Submissions to SYSLINUX at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux > Please do not send private replies to mailing list traffic.This looks exactly what I want. I tried applying the patch against 3.50pre18 but it doesn't apply cleanly. Any chance you could whack it into shape? Do you think this might be included in SYSLINUX proper soon? When I say "ipappend 1" didn't work, what I mean is, Anaconda, the RedHat installer, still tried to get a dhcp lease when I wanted it to use the IP info specified from PXELINUX. Thanks heaps CC NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.