View Single Post
  #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, 645 views)
Reply With Quote