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

Re: fetch+run extra rcS.d init script via livecd+dhcpcd



Well, i've been at this off and on today.  Not much dice....

to recap, I'm trying to use dhcp-client-identifier on a live cd
(eventually) so I can additional settings when they boot (without
affecting their normal setup while not on the livecd).

If someone else has invented this wheel, let me know where it is!
Just reply to the list.  Thanks.

The configuration snippets and debug output follow:

dhcpd.conf (snippet)

class "supalive" {
#        match if substring (option dhcp-client-identifier, 0, 7) = "supalive";
       match if substring (option dhcp-client-identifier, 1, 8) = "supalive";
}
shared-network 10-40 {
#eth1:2 Link encap:Ethernet  HWaddr 00:A0:C9:A4:C4:2F
#       inet addr:10.40.255.254  Bcast:10.40.255.255  Mask:255.255.0.0
       subnet 10.40.0.0 netmask 255.255.0.0 {
               pool {
                       allow members of "supalive";
                       range 10.40.0.2 10.40.255.254;
                       option routers 10.40.0.1;
                       option root-path "riddle:/var/diskless/x86";
                       filename "/tftpboot/linux.x86-diskless-live";
               }
       }
#eth1   Link encap:Ethernet  HWaddr 00:A0:C9:A4:C4:2F
#       inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
       subnet 10.0.0.0 netmask 255.255.255.0 {
               pool {
                       deny members of "supalive";
                       range 10.0.0.2 10.0.0.254;
                       option domain-name-servers 10.0.0.1;
                       option routers 10.0.0.1;
               }
       }
}

dhcpd3 -d -f

DHCPDISCOVER from 00:02:2a:c7:ca:eb via eth1
DHCPOFFER on 10.0.0.241 to 00:02:2a:c7:ca:eb via eth1
DHCPREQUEST for 10.0.0.241 (10.0.0.1) from 00:02:2a:c7:ca:eb via eth1
DHCPACK on 10.0.0.241 to 00:02:2a:c7:ca:eb via eth1

I want this to be in the 10.40.x.x range

tcpdump -i eth1 -lenx -s 1500 port bootps or port bootpc | dhcpdump

 TIME: 05:48:24.536120
   IP: 0.0.0.0.68 (00:02:2a:c7:ca:eb) >  (ff:ff:ff:ff:ff:ff)
   OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
 HLEN: 6
 HOPS: 0
  XID: c5b8a94f
 SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:02:2a:c7:ca:eb:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
OPTION:  50 (  4) Request IP address        10.0.0.241
OPTION:  55 (  9) Parameter Request List      1 (Subnet mask)
                                            28 (Broadcast address)
                                             2 (Time offset)
                                             3 (Routers)
                                            15 (Domainname)
                                             6 (DNS server)
                                            12 (Host name)
                                            44 (NetBIOS name server)
                                            47 (NetBIOS scope)

OPTION:  61 (  8) Client-identifier         73:75:70:61:6c:69:76:65
---------------------------------------------------------------------------
 TIME: 05:48:25.000438
   IP: 10.0.0.1.67 (00:a0:c9:a4:c4:2f) >  (00:02:2a:c7:ca:eb)
   OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
 HLEN: 6
 HOPS: 0
  XID: c5b8a94f
 SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 10.0.0.241
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:02:2a:c7:ca:eb:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         2 (DHCPOFFER)
OPTION:  54 (  4) Server identifier         10.0.0.1
OPTION:  51 (  4) IP address leasetime      846000 (1w2d19h)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   10.0.0.1
OPTION:  15 (  9) Domainname                example.com
OPTION:   6 (  4) DNS server                10.0.0.1
---------------------------------------------------------------------------
 TIME: 05:48:25.001001
   IP: 0.0.0.0.68 (00:02:2a:c7:ca:eb) >  (ff:ff:ff:ff:ff:ff)
   OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
 HLEN: 6
 HOPS: 0
  XID: c5b8a94f
 SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:02:2a:c7:ca:eb:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  54 (  4) Server identifier         10.0.0.1
OPTION:  50 (  4) Request IP address        10.0.0.241
OPTION:  55 (  9) Parameter Request List      1 (Subnet mask)
                                            28 (Broadcast address)
                                             2 (Time offset)
                                             3 (Routers)
                                            15 (Domainname)
                                             6 (DNS server)
                                            12 (Host name)
                                            44 (NetBIOS name server)
                                            47 (NetBIOS scope)

OPTION:  61 (  8) Client-identifier         73:75:70:61:6c:69:76:65
---------------------------------------------------------------------------
 TIME: 05:48:25.017781
   IP: 10.0.0.1.67 (00:a0:c9:a4:c4:2f) >  (00:02:2a:c7:ca:eb)
   OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
 HLEN: 6
 HOPS: 0
  XID: c5b8a94f
 SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 10.0.0.241
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:02:2a:c7:ca:eb:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         10.0.0.1
OPTION:  51 (  4) IP address leasetime      846000 (1w2d19h)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   10.0.0.1
OPTION:  15 (  9) Domainname                example.com
OPTION:   6 (  4) DNS server                10.0.0.1
---------------------------------------------------------------------------

--
read-between-lines@s-p-a-m-t-r-a-p-s.ignorelist.org
eviI-r0bot-b4it@s-p-a-m-t-r-a-p-s.ignorelist.org
think-twice@s-p-a-m-t-r-a-p-s.ignorelist.org



Reply to: