How to set hostnames to specific range of IP addresses on DHCP Server?
I'm working on Diskless Linux Clusters. I'm using Ubuntu Server 12.04( DHCP, TFTP and NFS servers installed and configured). When I boot slave machines via Live CD, all of them have same hostname but different IP addresses. I want to set hostname/ip address pair to slave machines via DHCP server without knowing slaves MAC addresses. For example:
IP Hostname
192.168.1.200 slave1
192.168.1.201 slave2
...
192.168.1.253 slave54
When a slave machine dynamically get 192.168.1.201
IP address from DHCP server, its hostname must be slave2
. I used this solution on client side to get hostname from DHCP Server. But I don't know how to do this matching "192.168.1.201 slave2
" on server side. My DHCP config file:
...
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.200 192.168.1.253; # Range of lease IP address
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}
next-server 192.168.1.10; # PXE server address
filename “pxelinux.0”;
DHCP server dynamically assigns IP addresses to clients without knowing clients MAC address. I think that it can assign hostnames too. Is there a way to do that? Please give me any advice.
server dhcp nfs tftp
add a comment |
I'm working on Diskless Linux Clusters. I'm using Ubuntu Server 12.04( DHCP, TFTP and NFS servers installed and configured). When I boot slave machines via Live CD, all of them have same hostname but different IP addresses. I want to set hostname/ip address pair to slave machines via DHCP server without knowing slaves MAC addresses. For example:
IP Hostname
192.168.1.200 slave1
192.168.1.201 slave2
...
192.168.1.253 slave54
When a slave machine dynamically get 192.168.1.201
IP address from DHCP server, its hostname must be slave2
. I used this solution on client side to get hostname from DHCP Server. But I don't know how to do this matching "192.168.1.201 slave2
" on server side. My DHCP config file:
...
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.200 192.168.1.253; # Range of lease IP address
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}
next-server 192.168.1.10; # PXE server address
filename “pxelinux.0”;
DHCP server dynamically assigns IP addresses to clients without knowing clients MAC address. I think that it can assign hostnames too. Is there a way to do that? Please give me any advice.
server dhcp nfs tftp
add a comment |
I'm working on Diskless Linux Clusters. I'm using Ubuntu Server 12.04( DHCP, TFTP and NFS servers installed and configured). When I boot slave machines via Live CD, all of them have same hostname but different IP addresses. I want to set hostname/ip address pair to slave machines via DHCP server without knowing slaves MAC addresses. For example:
IP Hostname
192.168.1.200 slave1
192.168.1.201 slave2
...
192.168.1.253 slave54
When a slave machine dynamically get 192.168.1.201
IP address from DHCP server, its hostname must be slave2
. I used this solution on client side to get hostname from DHCP Server. But I don't know how to do this matching "192.168.1.201 slave2
" on server side. My DHCP config file:
...
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.200 192.168.1.253; # Range of lease IP address
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}
next-server 192.168.1.10; # PXE server address
filename “pxelinux.0”;
DHCP server dynamically assigns IP addresses to clients without knowing clients MAC address. I think that it can assign hostnames too. Is there a way to do that? Please give me any advice.
server dhcp nfs tftp
I'm working on Diskless Linux Clusters. I'm using Ubuntu Server 12.04( DHCP, TFTP and NFS servers installed and configured). When I boot slave machines via Live CD, all of them have same hostname but different IP addresses. I want to set hostname/ip address pair to slave machines via DHCP server without knowing slaves MAC addresses. For example:
IP Hostname
192.168.1.200 slave1
192.168.1.201 slave2
...
192.168.1.253 slave54
When a slave machine dynamically get 192.168.1.201
IP address from DHCP server, its hostname must be slave2
. I used this solution on client side to get hostname from DHCP Server. But I don't know how to do this matching "192.168.1.201 slave2
" on server side. My DHCP config file:
...
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.200 192.168.1.253; # Range of lease IP address
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}
next-server 192.168.1.10; # PXE server address
filename “pxelinux.0”;
DHCP server dynamically assigns IP addresses to clients without knowing clients MAC address. I think that it can assign hostnames too. Is there a way to do that? Please give me any advice.
server dhcp nfs tftp
server dhcp nfs tftp
edited Apr 13 '17 at 12:23
Community♦
1
1
asked Feb 17 '14 at 16:51
Eyüp AlemdarEyüp Alemdar
80112
80112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
My professor answered my question. There is no specific tool or method to assign hostname and ip address pair without knowing MAC address in Linux Server. Because Linux server uses pure DHCP standards. So I have to assign a hostname/fixed ip address with MAC address for each slave in /etc/dhcp/dhcpd.conf file. For example:
host slave1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.1.200;
option host-name "slave1";
}
host slave2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.1.201;
option host-name "slave2";
}
...
He said: "you can do that with using hostname table in Windows NT Server". But i'm not sure how to do that.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f422188%2fhow-to-set-hostnames-to-specific-range-of-ip-addresses-on-dhcp-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My professor answered my question. There is no specific tool or method to assign hostname and ip address pair without knowing MAC address in Linux Server. Because Linux server uses pure DHCP standards. So I have to assign a hostname/fixed ip address with MAC address for each slave in /etc/dhcp/dhcpd.conf file. For example:
host slave1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.1.200;
option host-name "slave1";
}
host slave2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.1.201;
option host-name "slave2";
}
...
He said: "you can do that with using hostname table in Windows NT Server". But i'm not sure how to do that.
add a comment |
My professor answered my question. There is no specific tool or method to assign hostname and ip address pair without knowing MAC address in Linux Server. Because Linux server uses pure DHCP standards. So I have to assign a hostname/fixed ip address with MAC address for each slave in /etc/dhcp/dhcpd.conf file. For example:
host slave1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.1.200;
option host-name "slave1";
}
host slave2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.1.201;
option host-name "slave2";
}
...
He said: "you can do that with using hostname table in Windows NT Server". But i'm not sure how to do that.
add a comment |
My professor answered my question. There is no specific tool or method to assign hostname and ip address pair without knowing MAC address in Linux Server. Because Linux server uses pure DHCP standards. So I have to assign a hostname/fixed ip address with MAC address for each slave in /etc/dhcp/dhcpd.conf file. For example:
host slave1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.1.200;
option host-name "slave1";
}
host slave2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.1.201;
option host-name "slave2";
}
...
He said: "you can do that with using hostname table in Windows NT Server". But i'm not sure how to do that.
My professor answered my question. There is no specific tool or method to assign hostname and ip address pair without knowing MAC address in Linux Server. Because Linux server uses pure DHCP standards. So I have to assign a hostname/fixed ip address with MAC address for each slave in /etc/dhcp/dhcpd.conf file. For example:
host slave1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.1.200;
option host-name "slave1";
}
host slave2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.1.201;
option host-name "slave2";
}
...
He said: "you can do that with using hostname table in Windows NT Server". But i'm not sure how to do that.
answered Feb 18 '14 at 12:19
Eyüp AlemdarEyüp Alemdar
80112
80112
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f422188%2fhow-to-set-hostnames-to-specific-range-of-ip-addresses-on-dhcp-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown