Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have setup-ed a PXE boot server for installing ubuntu via network. Currently i am using hosts mac address to install the ubuntu operating system. I would like to enable the DHCP server in all the subnets for example 172.29.34.0/24 172.29.36.0/24 etc.. instead of using its mac address. Please find my current configuration below,

DHCP Server Configuration:

allow booting;
allow bootp;
subnet 172.29.32.0 netmask 255.255.255.0 {
    range 172.29.32.20 172.29.32.200;
    option broadcast-address 172.29.1.255;
    option routers 172.29.32.1;
}
group {
    next-server 172.29.32.9;
    filename "/pxelinux.0";
    host webppc {
        hardware ethernet BC:30:5B:C3:23:69;
        option host-name  "webppc";
    }
}
share|improve this question
    
I'm not sure if I understand your question. If you don't enter the hosts' MAC addresses, you won't be able to assign specific IP addresses and host names, but if this is not a problem for you (usually it's not) you can do this. If you want to configure DHCP for multiple subnets, you can also do this but I don't see any connection to the MAC addresses. Here is an example. –  lumbric Feb 8 '12 at 11:44
    
What i need to do is, right now i am using mac address for every hosts to use PXE boot. I want access PXE boot menu without using hosts mac address. –  karthick87 Feb 8 '12 at 14:27
    
Why do need several different subnets with only one server? –  lumbric Feb 9 '12 at 17:51
    
I feel like DHCP forwarding on the subnet routers will solve this. –  Huckle Feb 9 '12 at 19:40
add comment

2 Answers 2

up vote 5 down vote accepted
+500

I can't guarantee it will work, but you could specify the options per subnet and not by group (though you'll lose assignment of the hostname - that's to be expected if you don't have a unique way (i.e. MAC) of identifying each system).

allow booting;
allow bootp;
subnet 172.29.32.0 netmask 255.255.255.0 {
    next-server 172.29.32.9;
    filename "/pxelinux.0";

    range 172.29.32.20 172.29.32.200;
    option broadcast-address 172.29.32.255;
    option routers 172.29.32.1;
}
#Repeat this block for each subnet
subnet 172.29.34.0 netmask 255.255.255.0 {
    next-server 172.29.32.9; #Note this is on another subnet.
    filename "/pxelinux.0";

    range 172.29.34.20 172.29.34.200;
    option broadcast-address 172.29.34.255;
    option routers 172.29.34.1;
}
share|improve this answer
    
what you mean by next-server 172.29.34.9; ? next-server 172.29.32.9; is the ip address of the PXE boot server. –  karthick87 Feb 8 '12 at 17:25
    
I'm just replicating the configuration previously found in your "group" block but putting it in the subnet scope, so it will apply to all hosts in the subnet regardless of their MAC address. "The next-server statement is used to specify the host address of the server from which the initial boot file (specified in the filename statement) is to be loaded." So yes, next-server should be the PXE boot server that's going to hand out files to the client systems. –  roadmr Feb 8 '12 at 19:26
    
PXE boot server is running in 172.29.32.9 but you have mentioned next-server 172.29.34.9 in subnet 34. Also i am not able to access PXE boot menu is subnet 34, but i am able to access PXE boot menu in subnet 32. –  karthick87 Feb 9 '12 at 5:17
    
Sorry, I'd assumed you were going to have a PXE server on each subnet. I fixed the config file, though I'm not sure this will work across subnets. please give it a try and let us know if it works. –  roadmr Feb 9 '12 at 17:10
    
No it is not working, pls help. –  karthick87 Feb 9 '12 at 20:11
show 2 more comments
allow booting;
allow bootp;
subnet 172.29.32.0 netmask 255.255.255.0 {
    range 172.29.32.20 172.29.32.200;
    range 172.29.33.20 172.29.33.200;
    range 172.29.34.20 172.29.34.200;
    option broadcast-address 172.29.1.255;
    option routers 172.29.32.1;
}
group {
    next-server 172.29.32.9;
    filename "/pxelinux.0";
    host webppc {
        hardware ethernet BC:30:5B:C3:23:69;
        option host-name  "webppc";
    }
}
share|improve this answer
    
I think this is wrong. Clients from the networks 172.29.33.0 and 172.29.34.0 won't be able to find the default gatway 172.29.32.1 - it's in a different subnetwork. –  lumbric Feb 8 '12 at 14:17
    
Yes thats not working. –  karthick87 Feb 8 '12 at 14:25
2  
If each network is indeed it's own /24 with it's own router then you'll have to duplicate the subnet section. –  Caesium Feb 8 '12 at 14:37
    
@Caesium yep, you are right. The example I linked above is doing something like that. –  lumbric Feb 8 '12 at 19:19
1  
Add route it will solve the problem –  Deepak Rajput Feb 9 '12 at 10:50
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.