dhclient with '-s ' flag
I want to understand under which circumstance this command is valid. As i can see, using this command the discover packets have unicast destination ip same as that of the provided server ip while the destination mac is broadcast. Is this a valid packet, as I am not able to get ip using this flag.
dhcp ip-address ipv4 dhcp-server
add a comment |
I want to understand under which circumstance this command is valid. As i can see, using this command the discover packets have unicast destination ip same as that of the provided server ip while the destination mac is broadcast. Is this a valid packet, as I am not able to get ip using this flag.
dhcp ip-address ipv4 dhcp-server
add a comment |
I want to understand under which circumstance this command is valid. As i can see, using this command the discover packets have unicast destination ip same as that of the provided server ip while the destination mac is broadcast. Is this a valid packet, as I am not able to get ip using this flag.
dhcp ip-address ipv4 dhcp-server
I want to understand under which circumstance this command is valid. As i can see, using this command the discover packets have unicast destination ip same as that of the provided server ip while the destination mac is broadcast. Is this a valid packet, as I am not able to get ip using this flag.
dhcp ip-address ipv4 dhcp-server
dhcp ip-address ipv4 dhcp-server
asked Jul 4 '18 at 18:51
user8070445user8070445
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I think that receiving an answer with -s flag it depends on the listening dhcp server (or its configuration).
Short answer, it works with dhcpd server but it fails with dnsmasq one.
Long(er) answer, using "dhclient -v -s 172.16.0.1 eth1" will get an IP if the listening server is dhcpd:
[root@c602 ~]# dhclient -v -s 172.16.0.1 eth1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/08:00:27:31:f2:d6
Sending on LPF/eth1/08:00:27:31:f2:d6
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 172.16.0.1 port 67 interval 7 (xid=0x6161a797)
DHCPOFFER from 172.16.0.1
DHCPREQUEST on eth1 to 172.16.0.1 port 67 (xid=0x6161a797)
DHCPACK from 172.16.0.1 (xid=0x6161a797)
bound to 172.16.0.230 -- renewal in 19087 seconds.
[root@c602 ~]# ip -4 a show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.16.0.230/24 brd 172.16.0.255 scope global eth1
In both circumstances, when dhcpd or dnsmasq are the acting dhcp server, the DHCPDISCOVER is reaching the server but is not answered by dnsmasq; seen this with tcpdump on server machine. (tcpdump -nnnvvvi eth1 port 67 and port 68)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1336545%2fdhclient-with-s-server-ip-flag%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
I think that receiving an answer with -s flag it depends on the listening dhcp server (or its configuration).
Short answer, it works with dhcpd server but it fails with dnsmasq one.
Long(er) answer, using "dhclient -v -s 172.16.0.1 eth1" will get an IP if the listening server is dhcpd:
[root@c602 ~]# dhclient -v -s 172.16.0.1 eth1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/08:00:27:31:f2:d6
Sending on LPF/eth1/08:00:27:31:f2:d6
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 172.16.0.1 port 67 interval 7 (xid=0x6161a797)
DHCPOFFER from 172.16.0.1
DHCPREQUEST on eth1 to 172.16.0.1 port 67 (xid=0x6161a797)
DHCPACK from 172.16.0.1 (xid=0x6161a797)
bound to 172.16.0.230 -- renewal in 19087 seconds.
[root@c602 ~]# ip -4 a show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.16.0.230/24 brd 172.16.0.255 scope global eth1
In both circumstances, when dhcpd or dnsmasq are the acting dhcp server, the DHCPDISCOVER is reaching the server but is not answered by dnsmasq; seen this with tcpdump on server machine. (tcpdump -nnnvvvi eth1 port 67 and port 68)
add a comment |
I think that receiving an answer with -s flag it depends on the listening dhcp server (or its configuration).
Short answer, it works with dhcpd server but it fails with dnsmasq one.
Long(er) answer, using "dhclient -v -s 172.16.0.1 eth1" will get an IP if the listening server is dhcpd:
[root@c602 ~]# dhclient -v -s 172.16.0.1 eth1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/08:00:27:31:f2:d6
Sending on LPF/eth1/08:00:27:31:f2:d6
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 172.16.0.1 port 67 interval 7 (xid=0x6161a797)
DHCPOFFER from 172.16.0.1
DHCPREQUEST on eth1 to 172.16.0.1 port 67 (xid=0x6161a797)
DHCPACK from 172.16.0.1 (xid=0x6161a797)
bound to 172.16.0.230 -- renewal in 19087 seconds.
[root@c602 ~]# ip -4 a show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.16.0.230/24 brd 172.16.0.255 scope global eth1
In both circumstances, when dhcpd or dnsmasq are the acting dhcp server, the DHCPDISCOVER is reaching the server but is not answered by dnsmasq; seen this with tcpdump on server machine. (tcpdump -nnnvvvi eth1 port 67 and port 68)
add a comment |
I think that receiving an answer with -s flag it depends on the listening dhcp server (or its configuration).
Short answer, it works with dhcpd server but it fails with dnsmasq one.
Long(er) answer, using "dhclient -v -s 172.16.0.1 eth1" will get an IP if the listening server is dhcpd:
[root@c602 ~]# dhclient -v -s 172.16.0.1 eth1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/08:00:27:31:f2:d6
Sending on LPF/eth1/08:00:27:31:f2:d6
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 172.16.0.1 port 67 interval 7 (xid=0x6161a797)
DHCPOFFER from 172.16.0.1
DHCPREQUEST on eth1 to 172.16.0.1 port 67 (xid=0x6161a797)
DHCPACK from 172.16.0.1 (xid=0x6161a797)
bound to 172.16.0.230 -- renewal in 19087 seconds.
[root@c602 ~]# ip -4 a show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.16.0.230/24 brd 172.16.0.255 scope global eth1
In both circumstances, when dhcpd or dnsmasq are the acting dhcp server, the DHCPDISCOVER is reaching the server but is not answered by dnsmasq; seen this with tcpdump on server machine. (tcpdump -nnnvvvi eth1 port 67 and port 68)
I think that receiving an answer with -s flag it depends on the listening dhcp server (or its configuration).
Short answer, it works with dhcpd server but it fails with dnsmasq one.
Long(er) answer, using "dhclient -v -s 172.16.0.1 eth1" will get an IP if the listening server is dhcpd:
[root@c602 ~]# dhclient -v -s 172.16.0.1 eth1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/08:00:27:31:f2:d6
Sending on LPF/eth1/08:00:27:31:f2:d6
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 172.16.0.1 port 67 interval 7 (xid=0x6161a797)
DHCPOFFER from 172.16.0.1
DHCPREQUEST on eth1 to 172.16.0.1 port 67 (xid=0x6161a797)
DHCPACK from 172.16.0.1 (xid=0x6161a797)
bound to 172.16.0.230 -- renewal in 19087 seconds.
[root@c602 ~]# ip -4 a show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.16.0.230/24 brd 172.16.0.255 scope global eth1
In both circumstances, when dhcpd or dnsmasq are the acting dhcp server, the DHCPDISCOVER is reaching the server but is not answered by dnsmasq; seen this with tcpdump on server machine. (tcpdump -nnnvvvi eth1 port 67 and port 68)
answered Feb 10 at 17:24
Cosmin MironCosmin Miron
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1336545%2fdhclient-with-s-server-ip-flag%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