DHCP Woes I actually think my head is going to explode

ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
Howdy all I have been fighting with a Clonezilla box running on Ubuntu Server 16:10 I am trying to get the whole setup isolated away from our other main DHCP server on the network.

My current setup is the following:

Server>Switch>Router - Router is handling DHCP to all nodes on the switch.

I have tested that DHCP is working when I hook up machines to the switch I can also ping the router.

The next bit is where I need some serious hand holding.

My server only has one nic which I have assigned a static i.p
Conezilla runs a drbl service which I have downloaded the required packages ( I temporarily connected to main network to do this part)
Whenever I issue the command drblpush -i to get the drbl setup started I am greeted by a warning stating that I am only use one nic.
and that no DHCP is running on this network card?

questions since I am already running a DHCP service from the router why isn't it being detected?
Do I have to manually specify what device is actually issuing DHCP? by editing /etc/default/isc-dhcp-server
I noticed that initially when I was greeted with the no DHCP service that isc-dhcp-server wasn't even installed.

I am so confused thank you for help
Microsoft's strategy to conquer the I.T industry

" Embrace, evolve, extinguish "
«1

Comments

  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Ah, so your setup caused you problems afterall. I tried to look into clonezilla a bit when I was answering your network question, but info on it isn't so great.

    Perhaps it can detect a dhcp service running and ports listening in on 67 and 68 udp on the nic? I suppose that means Clonezilla expects you to be running the dhcp service on the same box it's on?

    Maybe you could try installing a dhcp service onto the clonezilla box, give it a quick configuration and see what happens? Following this guide should get it going:

    https://help.ubuntu.com/lts/serverguide/dhcp.html
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Yeah dude I have literally been on it solid for nearly two days trying to get the thing to work, It is starting to irritate me I actually had dreams about DHCP, :)

    Maybe you could replicate my setup and see if you can get it up and running? I think you may be on to something by having DHCP setup on the server. Have you setup DHCP on Linux before?

    I currently will have to ensure that the server i.p is set to a static address as I haven't done that yet whoops.

    so if I issue the following information as a static i.p 192.168.2.1, 255.255.255.0 g/w 192.168.2.254

    What would my DHCP setup look like? this is the bit i'm really confused about I will post the following bits which I am confused by regarding the DHCP.conf these are taking from examples of a dhcpd.conf

    (example1)

    I don't have any domain-name servers do I leave this out? also what would the domain name be? can I set it as anything?

    [...]

    # option definitions common to all supported networks...
    option domain-name "ostechnix.lan";

    option domain-name-servers ubuntuserver.ostechnix.lan;


    (example2)

    What the hell is a broadcast address?

    [...]
    # A slightly different configuration for an internal subnet.
    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.20 192.168.1.30;
    option domain-name-servers ubuntuserver.ostechnix.lan;
    option domain-name "ostechnix.lan";
    option routers 192.168.1.1;
    option broadcast-address 192.168.1.255;
    default-lease-time 600;
    max-lease-time 7200;
    }
    [...]

    Many Thanks for you help we will conquer this :) and when we do we will document it lol
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Ah. Ok fristly DHCP options are completely optional. you do not have to set them. You aren't using a domain at all, so ignore. The broadcast in your case is 192.168.2.255. Broadcast is where a message will go to every device on the network, not just 1.

    The only major part to get it going is the network address, subnet mask and the DHCP scope. everything else is basically optional and not required to get DHCP going. SO:-

    Network 192.168.2.0
    Subnet Mask 255.255.255.0
    DHCP scope 192.168.2.20 - 192.168.2.30 (Just as an example)
    Shouldn't need anything else... but...

    I wonder if you need to specifiy an image server / PXE server. I've been covering this in my MCSA study, so I'm actually lacking in knowledge still. But for windows imaging with WDS you have to point a network booting machine to the image server by setting DHCP options 66 and 67.

    Setting Option 66 and 67 for DHCP

    66 tells the host which server to reach out to and 67 points to the file they will be using for the imaging. Any idea if Clonezilla needs to do this too?

    If your still having problems tomorrow I can try to recreate your setup in my VM lab and have a bash at it. This is kind of fun in a way =P
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Hi the part about the ports for the image server are not mentioned at all in the documentation. You literally download the packages and run the command drblpush -I

    This will kickstart the configuration process you then specify what clonezilla services to setup and what network settings etc.

    This is the part where it screams about my lack of DHCP server.

    I assume during this process the whole PXE, TFTP is automatically configured.Because in the documentation it just says once this aspect has been completed you can fire up a machine and PXE boot it to the Clonezilla box.

    We already have a Serva 32/64 box which serves up Windows images with updates intergrated. This is already running PXE across the whole network. ( I didn't set it up)
    That's why I am trying to isolate my setup so the two Pxes will not clash.

    Unfortunately I cannot get hands on with my configuration until Monday. However it would be awesome to have you on board ;)

    Rember the setup needs to be isolated and is only using one nic

    Thank you for helping me understand more about networking. I appreciate it
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • bootboot Member Posts: 22 ■□□□□□□□□□
    Some basics, for clarity: When a computer boots via PXE, it receives several things from the DHCP server (DHCP options). An IP address, default gateway, DNS server, the usual. It also receives the name or IP address of a TFTP server, and the name of the program to load from the TFTP server (and potentially other stuff which is irrelevant).

    You have to configure your DHCP server to hand out the correct TFTP server address and program name. An arbitrary computer on the network can't just do that on its own, which is why the auto configuration script is complaining (it probably runs with root privileges on your Clonezilla server, and could configure a DHCP server on it by itself because it has access, but it doesn't have access to your real DHCP server). If you already have an existing PXE setup you are not going to touch, you have a few options:

    • If a predefined set of clients will PXE boot from Clonezilla and another predefined set of clients will boot from Serva, you can make the DHCP server aware of the two (by lists of MAC addresses, VLAN tagging information, potentially PXE ROM vendor strings), and configure it to hand out Clonezilla TFTP and program name to clients in set A, and Serva TFTP server and program name to clients in set B. Exact instructions vary for each DHCP server.
    • If you can separate the Serva DHCP server and its clients, and the Clonezilla server and its clients into separate VLANs, the Clonezilla server can be configured as a DHCP server for that VLAN
    • You can chain boot PXE ROMs to get to the proper ROM. You configure your DHCP server to hand out the same TFTP server address and program name to all clients. This program can just be a menu where you can select to load Serva/Windows PXE program or Clonezilla PXE program, or do some automatic stuff to figure out whether it should load the Clonezilla or Serva/Windows PXE program, and loads the appropriate program from the appropriate TFTP server automatically. You can use iPXE for this. The menu concept is self explanatory, but iPXE has lots of capabilities to help you do loading automatically. It also supports loading from HTTP servers, so you can write a PHP script or something on a web server, tell iPXE to load that, and make the PHP script (or any language, iPXE just talks HTTP back and forth) do the work of figuring out which program it should load (the PHP script will then respond with the URL to the correct PXE program, and iPXE will load and run it). You could look up the IP address in Active Directory if that's helpful to determine what client it should have, or just check which IP range it is if that helps - only you know what questions to ask to figure out if the computer should boot Clonezilla or Serva/Windows, and which answers will be helpful to make the decision automatically.

    Bottom line, PXE booting is simple if you have all the related tasks (DHCP, TFTP) on one box, and only one kind of client (everyone loads the same PXE program). Which means it's pretty straightforward in a lab where one-size-fits-all, but few or none automated scripts can set this up in a real business network without some intervention, which requires learning how these things work.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Interesting information Boot I will be honest alot of it went over my head.

    Im still having a headache lol. Infact reading documentation to setup Clonzilla there is no mention of TFTP.

    I have no vlans setup on the network, im not allowed to fiddle with much we don't have any exotic layouts or cisco wizadry. Literally the main topology is a router connected to a SME server, Dhcp for the whole building handled by the router.

    A Serva box is setup in the workshop which is in charge of PXE,

    I'm still confused about my setup

    1) server > switch > router
    2) server has 1 nic connected to switch
    3) server has static I.P no DNS
    4) my router has no outward connection.
    5) Server currently has no DHCP service running to handle the Pxe/TFTP
    6) Whenever I fire up the DRBL install and work through the process of configuring I am warned that I only have one nic,
    7) it fails to find a DHCP service running on this NIC

    icon_cool.gif should I go ahead and manually configire a dhcpd.conf and see what happens?

    9) wouldn't it conflict with my router ( the Dhcp running on router)

    10) my understanding is once you have setup DRBL you hook up a client and PXE boot and it should bring up a Clonezilla menu. I assume the whole
    drblpush -I takes care of the pxe TFTP setup. Not once in the documentation are you told to manually configure services or Dhcp.......or pxe


    So many questions lol I'm going to bed seriously my head hurts.

    Guys you are superb I appreciate all your help greatly.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Morning guys, I am checking in after a rubbish nights sleep I have had vivid dreams about DHCP.

    One thing is not sinking in and it is literally driving me bonkers

    When I plug computers into the switch I have connected to the router nodes are being assinged a basic i.p, s/m g/w

    Why do I need to run another DHCP service on the server? surely they would clash?

    I can kind of understand that I need to offer PXE/TFTP services, but I am having a hard time understanding the concept of the server handing out DHCP and the router.....

    Am I being a idiot here? please feel free to go Ally you asshat it's this...... haha please somebody explain because the whole thing is turning into a obsession and I cannot get my thinking off of it.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Morning. Your right that 2 dhcp servers can clash. To be fair the only reason why you'd need another dhcp is cause of clonezilla itself, because it won't work, apprently, with your existing dhcp.

    I've been doing some research and found...

    1. There is evidence that Clonezilla does involve setting up DHCP options 67 and 68
    https://ubuntuforums.org/showthread.php?t=1095417
    https://www.experts-exchange.com/questions/28658257/clonezilla-server-on-existing-DHCP.html

    2. Drbl has it's own DHCP service built in. This is likely the cause of most of your problems cuz it wants to probably use it's own service. That message your getting about no dhcp found, maybe it's dhcp hasn't been fully enabled? I kinda doubt now that it can detect the presence of other dhcp service anymore. Only interested if drbl is running dhcp on same box I think.
    DRBL - FAQ/Q&A

    Tbh I would check out the dhcp that comes with drbl. It would be way easier to get this up and running if you can use the dhcp it wants to use by default. If you want to use your own dhcp it seems clear that it's going to be harder to setup and to fully disable dhcp on drbl. Also I imagine the router your using probably won't allow you to set options 67 and 68, unless it's a custom firmware like dd-wrt.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Hi thank you for your input.

    This is the confusing part, If I have a server connected our main network with a full outside connection initially and use it to setup the server i.e install ssh, install required packages for the server and update it including installing the drbl packages. I then get it to a stage where I want to install the drbl.

    I then disconnect from the main network and connect the server directly to a switch. ( no router nothing)

    I then configure a static i.p on my ethernet I dunno say 192.168.1.2 255.255.255.0 ( no g/w)

    I then run the drblpush -i I get a warning stating that I have no dhcp service.

    So at this part I would have to configure a DHCP manually? I was getting permission errors before when trying to start DHCP possible app armour?

    Another scenario what if I kept the server on the main network installed the required drbl services got the DHCP automatically detected and then connected the server to a switch would it still work?

    Man this whole thing is driving me nuts. :)
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    I don't really know myself about whats happening with drblpush -i. What resources / guides are you following to do this setup? If you could give me a link to them I can try and get my head around whats going on. I guess you are meant to do some manual config on dhcp, but again I just don't know.

    If you want to place it on the main network to get the req drbl services and DHCP auto detected you can try. I don't know all the implications of having 2 dhcp servers yet, but there are safe guards in place inside the protocol to stop stupid stuff happening. Worst thing I think that could happen is you'd have to renew the IP addresses of a few machines if dhcp on your clonezilla server goes active. If all the hosts in your enviroment already are up and running with IP addresses then another dhcp server for few mins won't matter. You might have to fiddle with your IP settings a bit too for switching from main to isolated network, but shouldn't matter much.

    I bet WDS and server 2012 wouldn't be this much headaches as this =)

    Edit: If your main router is not a complete crap soho router you could just setup another ethernet interface on it, say 172.16.0.0, and get internet access for the isolated network and still keeps main network seperate.
  • TheNewITGuyTheNewITGuy Member Posts: 169 ■■■■□□□□□□
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    DRBL installation

    The install guide I have been following have fun dude if you can make further progress than me then that would be epic.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    ally_uk wrote: »
    DRBL installation

    The install guide I have been following have fun dude if you can make further progress than me then that would be epic.

    I've skimmed through it and it seems that your single NIC could be causing some hiccups, unless that alias interface step is done properly, but by default it wants an internet connection and will try to get updates when running drblpush -i. It's own dhcp service also doesn't get setup until drblpush -i is run frist.

    If I get time I'll give it a bash tomorrow. Try running it first using your own setup of single NIC and no internet, see what happens.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    I can't get hands up until Monday dude my setup is at work.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Sorry I didn't reply earlier like I said I would in your other thread. I actually wrote out a whole post and lost it too.....lets redo that post from scratch now...

    So I created a Ubuntu server VM and followed the guide for drbl. When I got to the virtual network interface after restarting my networking all my network connectivity broke. Dunno exactly why, though I think it was cuz I put both on same network.

    I decided to instead try 2 physical (VM network adapter in reality) interfaces and used this guide to help me along:
    https://ittutorials.net/linux/ubuntu/clonezilla-server-installation/

    These are the steps I went through:
    -Added 2nd NIC into network config file
    Heres my config

    auto enp0s3
    iface enp0s3 inet static
    address 172.16.0.205
    netmask 255.255.0.0
    network 172.16.0.0
    broadcast 172.16.255.255
    gateway 172.16.0.1
    dns-nameservers 8.8.8.8
    dns-search localdomain

    # Secondary Interface setup by me
    auto enp0s8
    iface enp0s8 inet static
    address 172.17.0.200
    netmask 255.255.0.0
    broadcast 172.17.255.255


    (Continuing from there...)
    -Restarted networking
    -Added the drbl key
    -add entries into /ect/apt/sources.list file
    -ran drblsrv -I
    -ran drblpush -I

    Everything worked and whole process completed. Also drbl reported clients could now be set to boot from PXE. One major detail was I left my internet connection active to the server from start to finish.

    I know this isn't exactly your setup, but it's a step forward that I could make it work at all. Now I'll try to setup the virtual interface again, use internet all the way till I'm ready to use drblpush -I at which point I'll shut that off and see what happens.

    By the way, using ssh and putty to set this all up is way easier for copy pasting stuff for Ubuntu server =P
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Awesome I found some resources that show you how to set it up with an existing DHCP server and using one nic with a virtual interface, I havent tried it yet but the link for the alternative DHCP ports pxe cd is down. Although somebody mentioned creating a ipxe disc with the DHCP port number changes not sure how to do this........

    For the installation

    Apparently you assign a static i.p your normal i.p with gateway and DHCP then create a virtual interface on a different subnet.

    Then change the ports of DHCP one DRBL has been installed.


    Dashamir Hoxha - Technical Notes: Installing a Clonezilla Server

    Setup a Clonezilla Server on Ubuntu


    ( Change DHCP Ports)

    Use different port to run DHCP service in DRBL server, this won't conflict with your existing DHCP service. This can be done after you install and configure your DRBL server. Here we take Debian as an example. Make sure your DRBL is version 1.9.0-35 or later:
    Edit your /etc/dhcp3/dhcpd.conf in drbl server, add these two lines:
    local-port 1067;
    remote-port 1068;
    Then restart dhcp service like this:
    /etc/init.d/dhcp3-server restart
    Run this command on DRBL server:
    mknic-nbi --udhcpc-port 1068
    Create Etherboot boot floppy or iso file, which will be used to boot the clients. Use this website http://www.rom-o-matic.net, choose network card and the type you want to create, and the most important is to choose "3. (optional) To customize ROM configuration press:", then check "ALTERNATE_DHCP_PORTS_1067_1068". You will get a dsk for iso file which you can put in the floppy or CD to boot it.
    For more details, refer to this discussion.

    https://sourceforge.net/p/drbl/discussion/DRBL_for_Debian/thread/444fb37c/



    Can you try and get it working using one nic :) I think we will get this dude we are so close


    * POST edit I assume when you install the virtual / 2nd nic the DRBL will automatically that this card will be on a .2 subnet and will setup it's own scope for hosts in the .2 range.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    I will have to rollback all my changes to a fresh install again. I'll give it a go tomorrow and see what happens, hopefully having the virtual NIC on another subnet will fix my problem.

    If I was in your shoes I'd want to get this going with it's original setup with single NIC. Using a secondary dhcp and changing the default dhcp ports is adding a lot of extra steps and complexity to this setup.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    But wouldn't that clash with the other PXE Server on the network? Or could I get the clients to boot to the Clonezilla setup by CD instead of network boot.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    eh? What other PXE server are you talking about? I thought this was just about setting up clonezilla for imaging.

    If you just follow the drbl setup guide you'll have the only PXE imaging solution you need, right?

    Now I'm confused too =/
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    We have another PXE server on our network dude it's a server32/64 box which is hosting windows isos, memtest, pc check infact if you boot any computer off the network it will point to this machine.



    This is why I am trying to isolate the whole setup to figure out a way to make it not clash with this PXE. Unless I can get them both to work together somehow?
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Ah ok. Now I'm with you.

    Well switching port numbers could work, but tbh it will be a lot more work. I'd go with having a seperate switch like you have been doing to keep everything neatly isolated.

    Another option would be VLAN's. You'd tell each port what vlan it belonged to. For example say ports 1 - 20 production network. Ports 21 - 25 Imaging network. Then even if both dhcp servers are connected to this switch their traffic is kept apart. You said your switch can do multicast? Should be a managed switch meaning you can setup VLAN's on it too. All very nice and easy if it's just a single switch in your enviroment. If your interconnecting 2 or more switchs that raises the complexity a lot. If thats the case probably not for you.

    Last option would be to just keep everything on a seperate switch like you have. If your router is decent (Not a soho router pile of crap eg: sky broadband router) you could setup another network interface for a new network to give you internet access to your isolated network on that switch. You could also keep your main network and the imaging network from being able to pass traffic with a simple firewall rule too.

    I'll continue to check out the drbl when I can and let u know how it turns out.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    I will give you an overview of the network layout I am working with

    Draytek Router > ADSL MOdem in front office

    cables go to another room in front office where the server cabinet is

    In here we have


    SME Server (handles Domain, DNS, DHCP,) > switch, patch panels

    the link is then fed upstairs to other switches in the Workshop

    In the Workshop we have a Serva32/64 Setup hooked up running PXE broadcasting to the whole network

    There are no subnets, vlans on this network is is just one big setup operating on the .1 subnet.




    My initial problem was putting my Clonezilla Server on the .1 subnet would clash with the other PXE I think the serva one would overide any boot attempts and would be the first server that would boot when when I attempt to make any PXE communications.

    Subnetting and vlans are way above my level dude :)

    Anyways that is my layout
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Right. So subnetting and vlans are too high level, but changing the default tcp / udp ports for a protocol aren't that hard? :D I'm going to argue against this, as to the best of my knowledge you still need to go to each work station and insert a cd or something which effectively gives them a pre boot enviroment that is configured with the changed ports. Otherwise they will work using standerd dhcp 67 and 68 ports. Correct me if im wrong about that. Your gaining a lot of additional work having to stick a media device into each desktop before you network boot them.

    I still think the easiest option for you is seperate switch. If you can run an addtional cable from the router to give you internet access via a new network all the better. If thats no possible, then just put the imagine server onto the main network for updates and software downloads.

    Personally I'd fix this by VLAN's, there not even that hard to setup.
  • bootboot Member Posts: 22 ■□□□□□□□□□
    ally_uk wrote: »
    My initial problem was putting my Clonezilla Server on the .1 subnet would clash with the other PXE I think the serva one would overide any boot attempts and would be the first server that would boot when when I attempt to make any PXE communications.

    I'll partially repeat myself, to address some misconceptions you have that makes solving this difficult. Sorry to be pedantic, but the confusion makes it a bigger problem than it needs to be.
    1. There is no such thing as a "PXE server". Software that combine DHCP, TFTP and possibly other services all-in-one and hides these internals from you may refer to itself as such, but it's a misnomer. You may have one piece of software providing a DHCP server, TFTP server and possibly other servers - as far as client machines are concerned they are separate services provided by the same host, and you must recognize this to configure them properly.
    2. PXE consists of the following process:
      • Machine boots, PXE-enabled NIC boots its internal ROM.
      • The PXE ROM on the NIC requests a DHCP lease on the network. If successful, it receives an IP address, a default gateway, DNS server(s), a TFTP server address, a program name, and other options the DHCP server may provide.
      • The PXE ROM connects to the provided TFTP server, and asks for the file name handed out by DHCP. The program file is downloaded from the TFTP server, and then executed.
      • The downloaded program can now do whatever it is configured to do by the creator of the program file. It can for example be the wdsnbp.com program provided with Windows Deployment Services, which will download Windows PE from a server, execute it and start the Windows PE environment or a predefined imaging task sequence. The downloaded program could also just request a new DHCP lease, receive TFTP server and program name and so forth, download the program, execute it, and potentially repeat this cycle endlessly.
    3. Multiple TFTP servers can happily coexist on a single subnet/broadcast domain. They do not rely on broadcast traffic, and will not cause collisions. A client simply connects to the TFTP server it is told to connect to by the DHCP server, and downloads the program named by the DHCP server. A TFTP server doesn't have to be on the same subnet as the client either. TFTP uses UDP as a transport, and can connect to remote subnets just like any other UDP-based (or TCP-based) protocol.

    Multiple DHCP servers cannot exist on a single subnet/broadcast domain (they actually can if configured appropriately, but let's say they can't for now). Therefore, you either have to (a) configure your existing DHCP server to send the correct TFTP server address and program name to DHCP clients, or (b) set up an isolated subnet/broadcast domain with a DHCP server you have full control over (VLAN, or a separate switch with no connection to the existing network). If everything is one big subnet, a) will require configuring the DHCP server to be aware of all your computers MAC addresses, and for each MAC address set up which TFTP server and program name that client should connect to and download (you can say that "unknown MACs connect to Serva, known MACs connect to whichever TFTP server they are configured for" or vice versa, if necessary).

    If you don't have access to do a), or your existing DHCP server doesn't support configuring different TFTP server address / program name per MAC, you have to go with b).

    Option c), making a PXE menu where you can select to boot either Clonezilla/drbl or from your Serva setup is still a possibility, but you first have to get Clonezilla/drbl up and running, then wrap your head around how the PXE boot process really works and what each of the services (DHCP, TFTP) do in that process. Then you need to dissect your Serva and your Clonezilla setup to pull out the relevant pieces from each of them, and piece them together into one unified setup that an all-in-one script can't build for you.

    Also, running TFTP or DHCP on alternate ports isn't going to work. Unlike HTTP and many other protocols, all computers and software supporting DHCP and TFTP expect them to be on their assigned standardised ports. You just don't have any way to tell a client to connect to a DHCP or TFTP server on a non-standard port, there isn't any : port syntax like in e.g. HTTP.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Thank you for patience and your explanations unfortunately I lack the authority to go dabbling with network gear in our company so cannot set up vlans.

    I have a new setup in place feel free to critique how I have setup I haven't undertook any installation yet just have got the hardware in place.

    Dell Optiplex 390 I have installed two network cards. O/S will be Ubuntu Server 16:10

    One connected out our main network 192.168.1 which has access to gateway and DHCP

    Second network card is installed I assume I can just give it an i.p address of 192.168.2.1

    Second network card is connected to a Dell Power Connect 5324 Switch, And I have a Thompson Router connected to this Switch.

    I was going to setup a .2 DHCP range on the router for anything on this switch.

    Please critique anything wrong with this setup?


    I appreciate the help you guys are helping me loads
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • bootboot Member Posts: 22 ■□□□□□□□□□
    ally_uk wrote: »
    I was going to setup a .2 DHCP range on the router for anything on this switch.

    Please critique anything wrong with this setup?

    What is the router for? Just to be a DHCP server? Ubuntu can do that with e.g. the isc-dhcp-server package. Also, didn't you mention a setup script that failed earlier? The whole point of creating an isolated network is so that you can use the all-in-one automated setup, without worrying about conflicts with your existing setup.
  • Nik 99Nik 99 Member Posts: 154 ■■■□□□□□□□
    Boot is right you don't need another dhcp server. drbl / clonezilla is both dhcp + tftp service. I tested a network boot in my lab with the fully working clonezilla VM and a client VM. It got it's IP from drbl's dhcp with no issues and was ready to deploy an OS (Not that I had that part setup).

    Drop the router from the setup. Since you got 2 interfaces now on that server you can follow my steps from previous page and that should have you up and running.

    @boot Thanks for the info you posted on previous page, was very informative. I'm not all that experienced yet, so didn't know that imaging via PXE is basically just a tftp service.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Hi guys I will try and have a go with the setup tommorow thank you for the advice, I initially thought I need a router hooked up to the switch to issues a DHCP scope for the ,2 range of clients that would use the switch ( my networking sucks I know :) :P

    I didn't want the box to clash with the other DHCP server on the 192.168.1 network wanted to avoid i.p address conflicts and avoid the serva32/64 PXE box.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Just checking in lads I setup a box with 2 network cards earlier. I run drbpush and I see the DHCP layout setup with a scope for 10 clients.

    Finished the process and got a prompt saying connect clients.

    Great I thought I've got this :)

    However my clients I hook up to the switch to make contact with DRBL.

    Something has gone wrong with the dhcpd.conf

    When I issue a systemctl status

    I am unable to manually start the DHCP service. It is moaning about something is wrong with the dhcpd.conf

    Bit cryptic I know will try and get a log up.

    I think I might of balls things up during drbsrv I said yes to update the O/S.

    Lastly this link:

    Server Side Setup and client setup for Clonezilla | Dell UK

    At the end of documentation

    Explains that a option exists to start Clonezilla

    However this is not mentioned on the clonezilla wiki.......

    I'm going to go again tommorow and start again. Will report progress :) hopefully I will get the sodding thing to work.

    Sharpening the Linux skills :)
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    back again lads :) still can't get the DHCP to work: I will post up configs hopefully some Linux Ninja can call me a idiot and correct any issues.


    I still cannot get DHCP working I have tried plugging clients directly into the switch and connecting the 2nd network card into the client.
    When I check the isc-dhcp-server status I am getting a warning saying failed. bad configuration.
    Not sure where to go from here I have posterd up detials of my configuration. Thank you for help It means alot.
    Ethernet settings:
    auto enp2s0
    iface enp2s0 inet static
    auto enp2s0
    address 192.168.21.67
    netmask 255.255.255.0
    gateway 192.168.21.1
    dns-nameservers 8.8.8.8
    enp3s0
    iface enp3s0 inet static
    address 192.168.3.1
    netmask 255.255.0
    gateway 192.168.21.67
    /etc/default/isc-dhcp-server
    INTERFACES="enp3s0"
    my dhcpd.conf
    # Generated by DRBL.
    # Do NOT modify this file unless you know what you are doing!

    default-lease-time 300;
    max-lease-time 300;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 8.8.8.8
    127.0.0.53;
    option domain-name "drbl.org";
    ddns-update-style none;
    server-name drbl;

    allow booting;
    allow bootp;

    option arch code 93 = unsigned integer 16;
    option space pxelinux;
    option pxelinux.magic code 208 = string;
    option pxelinux.configfile code 209 = text;
    option pxelinux.pathprefix code 210 = text;
    option pxelinux.reboottime code 211 = unsigned integer 32;

    site-option-space "pxelinux";
    if exists dhcp-parameter-request-list {
    # Always send the PXELINUX options (specified in hexadecimal)
    option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
    }
    # Ref:
    # PXELINUX - Syslinux Wiki
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589
    # //NOTE// From DRBL 2.15, bootia32.efi and bootx64.efi could be the one from
    # (1) syslinux (scripts/sbin/prepare-files-for-PXE-client)
    # or
    # (2) grub (drbl-gen-grub-efi-nb)
    if option arch = 00:06 {
    filename "bootia32.efi";
    } else if option arch = 00:07 {
    filename "bootx64.efi";
    } else if option arch = 00:09 {
    # For iPXE uEFI client. Ref: iPXE - open source boot firmware [cfg:platform]
    # Thanks to Danny Russ for providing this.
    filename "bootx64.efi";
    } else {
    filename "pxelinux.0";
    }

    ## Uncomment the following "if block" when you have some buggy PXE NIC card (such as annoying sis900 NIC). Remember to modify the MAC vendor prefix and restart dhcpd se
    rvice!!!
    ## This is a workround for some network card with BAD PXE code in firmware.
    ## It will only affect those clients with MAC vendor prefix you assigned.
    ## Ref: [syslinux] Help me with my memory

    #if substring (option vendor-class-identifier, 0, 3) = "PXE" {
    # # **************************************************************
    # # ***MODIFY*** the MAC vendor prefix of client network card here.
    # # **************************************************************
    # # For annoying sis900 network card, maybe it is 00:07:95, 00:0C:6E...
    # if substring (hardware, 1, 3) = 00:0C:6E {
    # # sis900.zpxe is specially for sis900 NIC, you can download it from
    # # http://rom-o-matic.net/etherboot/etherboot-5.4.4/contrib/rom-o-matic
    # filename = "sis900.zpxe";
    # }
    #}

    # Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
    # PXEClient:Arch:00009:UNDI:003016
    # Begin of log command
    #log ( info, vendor-class-identifier ) ;
    # End of log command

    # Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
    # Client 0:c:29:3b:34:fb requests 1:2:3:5:6:b:c:d:f:10:11:12:2b:36:3c:43:80:81:82:83:84:85:86:87 - PXEClient:Arch:00000:UNDI:002001 - no dhcp-client-id
    # Client 0:c:29:3b:34:fb requests 1:3:6:c:f:1c:28:29:2a - DRBLClient - no dhcp-client-id
    # Begin of log command
    #log(info, concat("Client ",
    # binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
    # " requests ",
    # binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
    # " - ",
    # pick-first-value(option vendor-class-identifier, "no vendor-id"),
    # " - ",
    # pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
    # );
    # End of log command

    # This class 'DRBL-Client' defines 3 kind of clients: PXE, Etherboot (1st stage) or DRBL client (2nd stage, i.e. in network initrd/initramfs (mkpxeinitrd-net)) to lease
    IP address. This will only affect 'range' statement only, not the 'host' statement.
    # Note! The following line(s) in the pool statement: 'allow members of "DRBL-Client";' is/are commented to disable this mechanism by default.
    # If you do want to use this mechanism, uncomment all 'allow members of "DRBL-Client";', then only PXE, etherboot and DRBL client can lease IP address from this DHCP se
    rvice.
    # ///NOTE/// In summary, two cases you can turn on this mechanism:
    # (1) This DRBL server is not used as a clonezilla server.
    # (2) This DRBL server is used as a Clonezilla server, with the following conditions:
    # (a) 'range' statement is used in this DRBL service.
    # (b) There is an existing DHCP service which can provide IP address leases to the restored OS (either GNU/inux or MS Windows) in the client. Otherwise if you uncom
    ment 'allow members of "DRBL-Client";', restored OS won't be able to lease IP address.

    # The DRBL client class: PXE, Etherboot or DRBL client
    class "DRBL-Client" {
    match if
    (substring(option vendor-class-identifier, 0, 9) = "PXEClient") or
    (substring(option vendor-class-identifier, 0, 9) = "Etherboot") or
    (substring(option vendor-class-identifier, 0, 10) = "DRBLClient") ;
    }

    # If you want to use special port for DHCP service, edit here:
    # For more info, ref: DRBL - FAQ/Q&A
    # local-port 1067;
    # remote-port 1068;

    subnet 192.168.3.0 netmask 255.255.255.0 {
    option subnet-mask 255.255.255.0;
    option routers 192.168.3.1;
    next-server 192.168.3.1;

    pool {
    # allow members of "DRBL-Client";
    range 192.168.3.2 192.168.3.31;
    }
    }****
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
Sign In or Register to comment.