DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd July 2020
dekloper dekloper is offline
Real Name: dekloper
New User
 
Join Date: May 2020
Posts: 7
Default pxe boot: I'm confused :((

Hello!

According to the man pxeboot, you need to declare in the host section
Code:
     host myhost {
         hardware ethernet 00:00:00:00:00:00;
         fixed-address myhost;
         option host-name "myhost";
         next-server mytftpserver;

         # This section allows dhcpd to respond with different answers
         # for the different tftp requests for the bootloader and kernel.
         if substring (option vendor-class-identifier, 0, 20)
           = "PXEClient:Arch:00000" {
             filename "pxeboot_ia32.bin";
         } elsif substring (option vendor-class-identifier, 0, 17)
           = "NetBSD:i386:libsa" {
             if filename = "boot.cfg" {
                 filename "tftp:boot.cfg";
             } else if filename = "netbsd" {
                 filename "tftp:netbsd-INSTALL.gz";
             }
         }
     }

But what if I want to load any host from the range (with a previously unknown client mac)?
But even if mac address is known, it is acceptable for one, two.. ten hosts.. What if there are 100, 200, 1000 of them?




If place an declare pxeboot options above the host directive

Code:
subnet 10.0.0.0 netmask 255.255.255.0 {
  interface tap1;
  range 10.0.0.200 10.0.0.230;
  option broadcast-address 10.0.0.255;
  option routers 10.0.0.1;
  option time-servers 10.0.0.1;
  option domain-name "home.local";
  option domain-search "home.local";
  ddns-domainname "home.local";

         # This section allows dhcpd to respond with different answers
         if substring (option vendor-class-identifier, 0, 20)
           = "PXEClient:Arch:00000" {
             filename "pxeboot_ia32.bin";
         } elsif substring (option vendor-class-identifier, 0, 17)
           = "NetBSD:i386:libsa" {
             if filename = "boot.cfg" {
                 filename "tftp:boot.cfg";
             } else if filename = "netbsd" {
                 filename "tftp:netbsd-INSTALL.gz";
             }
         }

  host tst1 {
          hardware ethernet 10:20:30:40:50:61;
#          hardware ethernet 10:20:30:40:50:60;
          fixed-address 10.0.0.60;
  }
}
then we get an error: "bootp: no reply"....
Attached Images
File Type: jpg bad.jpg (27.0 KB, 642 views)
Reply With Quote
  #2   (View Single Post)  
Old 23rd July 2020
dekloper dekloper is offline
Real Name: dekloper
New User
 
Join Date: May 2020
Posts: 7
Default

I analyzed the dhcp dump for two cases: a client with a declared mac address (10:20:30:40:50:60) and a client (not having declared mac address 10:20:30:40:50:60) in the address range 10.0.0.200 10.0.0.230...
Attached Images
File Type: jpg dump.jpg (82.6 KB, 263 views)

Last edited by dekloper; 26th July 2020 at 08:14 AM. Reason: table input
Reply With Quote
  #3   (View Single Post)  
Old 23rd July 2020
dekloper dekloper is offline
Real Name: dekloper
New User
 
Join Date: May 2020
Posts: 7
Default

At the final stage of requesting a boot file in the framework of the option 53 of the message exchange discover\request, we see that the problem client does not have a dhcprequest message:

HTML Code:
4)
IP: 10.0.0.60(mac_cli) > bcast	IP: 10.0.0.200(mac_cli) > bcast	
XID: 3f121970			XID: 59f8e9db
OP: 1 (BOOT REQUEST)		OP: 1 (BOOT REQUEST)
OPT: 53 = 1 (DHCP DISCOVER)	OPT: 53 = 1 (DHCP DISCOVER)
OPT: 60 = NetBSD:i386:libsa	OPT: 60 = NetBSD:i386:libsa
FNAME: boot.cfg			FNAME: boot.cfg

5)	
IP: 10.0.0.60(mac_cli) > bcast	IP: 10.0.0.200(mac_cli) > bcast
XID: 3f121970			XID: 59f8e9db
OP: 1 (BOOT REQUEST)		OP: 1 (BOOT REQUEST)
OPT: 53 = 3 (DHCP REQUEST)	OPT: 53 = 1 (DHCP DISCOVER)
OPT: 60 = NetBSD:i386:libsa	OPT: 60 = NetBSD:i386:libsa
FNAME: boot.cfg			FNAME: boot.cfg

6)	
boot ok				IP: 10.0.0.200(mac_cli) > bcast
				XID: 59f8e9db
				OP: 1 (BOOT REQUEST)
				OPT: 53 = 1 (DHCP DISCOVER)
				OPT: 60 = NetBSD:i386:libsa
				FNAME: boot.cfg
Is there any way to fix this?
Reply With Quote
  #4   (View Single Post)  
Old 23rd October 2020
dekloper dekloper is offline
Real Name: dekloper
New User
 
Join Date: May 2020
Posts: 7
Default

help! help! help me!
Reply With Quote
  #5   (View Single Post)  
Old 24th October 2020
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

I don' quite understand what you are trying to achieve. But when reading https://man.netbsd.org/NetBSD-9.0/amd64/pxeboot.8 I notice this notice:

Quote:
By default, the pxeboot program is configured with modules loading and
boot.cfg(5) support disabled. See EXAMPLES for how to enable these
options individually. This manual page assumes that boot.cfg(5) support
is enabled.
The passage in the EXAMPLES section that shows how to configure pxeboot to use boot.cfg instead of modules:

Quote:
EXAMPLES

To enable boot.cfg(5) support in the pxeboot program:

installboot -e -o bootconf pxeboot_ia32.bin
Did you do this? ;-)
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused about Sandboxing in OpenBSD paranoidone OpenBSD Security 3 15th August 2019 10:31 PM
Installation: Choosing a host & domain name ... (slightly confused) jackthechemist OpenBSD General 10 10th December 2010 07:51 PM
A little confused. Do "snapshots" (vs dump=image) have any correlation, non-unix? jb_daefo FreeBSD General 9 21st November 2009 04:41 AM
Dual-boot laptop won't boot OpenBSD after upgrade to 4.3 kbeaucha OpenBSD Installation and Upgrading 17 30th May 2008 02:40 PM
Wireless + wired = confused network setup davidgurvich FreeBSD General 3 27th May 2008 06:10 PM


All times are GMT. The time now is 07:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick