Posted by
Sean McMurray on
Jun 10, 2015; 6:25pm
URL: http://isc-dhcp-users.193.s1.nabble.com/dhcpd-doesn-t-acknowledge-dhcp-requests-tp124p212.html
I've run a test using dhtest from
https://github.com/saravana815/dhtestThe dhcpd daemon responds to this test.
DHCP requests from real clients get ignored by the daemon.
I've run tcpdump and strace on both requests to detect the difference.
#ss -anlp | grep dhcp
p_raw UNCONN 0 0 *:em2.112 *
users:(("dhcpd",20077,6))
u_dgr UNCONN 0 0 * 649449
* 8044 users:(("dhcpd",20077,3))
raw UNCONN 0 0 *:1 *:*
users:(("dhcpd",20077,5))
tcp UNCONN 0 0 *:67 *:*
users:(("dhcpd",20077,8))
tcp UNCONN 0 0 *:29204 *:*
users:(("dhcpd",20077,20))
tcp UNCONN 0 0 :::29973 :::*
users:(("dhcpd",20077,21))
First, the dhtest request:
===============
#./dhtest -V -i em2.112 -m 01:02:03:04:05:06
#tcpdump -vv -i em2.112
11:11:37.541868 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
UDP (17), length 272)
0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP,
Request from 01:02:03:04:05:06 (oui Unknown), length 244, xid
0x2103abd8, Flags [none] (0x0000)
Client-Ethernet-Address 01:02:03:04:05:06 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
#strace -p <PID>
select(22, [5 6 8], [], NULL, {40765, 184189}
) = 1 (in [6], left {40745, 888739})
recvmsg(6, {msg_name(0)=NULL,
msg_iov(1)=[{"\377\377\377\377\377\377\1\2\3\4\5\6\10\0E\0\1\20\0\0\0\0@\21y\336\0\0\0\0\377\377"...,
1536}], msg_controllen=36, {cmsg_len=36, cmsg_level=SOL_PACKET,
cmsg_type=, ...}, msg_flags=0}, 0) = 286
write(4, "\0\0\0\7\0\0\1(Ux\200G\0\0\0\0", 16) = 16
write(4,
"\0\0\0\0\0\0\0\4\0\0\0\0\10\0\10\0\200\0\0\0\24\0\6\0\0D\7\1\1\2\3\4"...,
52) = 52
write(4,
"\1\1\6\0U\242b\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\2\3\4"...,
244) = 244
sendto(3, "<182>Jun 10 11:21:59 dhcpd: DHCP"..., 75, MSG_NOSIGNAL, NULL,
0) = 75
write(4, "\0\0\0\17\0\0\0000Ux\200G\0\0\0\0", 16) = 16
write(4, "\4\0\0\0\np\1\0\361\204\331X\t\177\0\0\240\32\303Z", 20) = 20
write(4, "\10\0\266\220Ao\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
28) = 28
sendto(5, "\10\0\266\220Ao\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
28, 0, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("10.112.1.0")}, 16) = 28
Now, the dhcp request from a real client:
=========================
#tcpdump -vv -i em2.112
11:07:45.356945 IP (tos 0x0, ttl 255, id 54051, offset 0, flags [none],
proto UDP (17), length 339)
0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP,
Request from 00:1f:f3:50:1a:83 (oui Unknown), length 311, xid
0x7f73dd69, secs 9, Flags [none] (0x0000)
Client-Ethernet-Address 00:1f:f3:50:1a:83 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 9:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
Option 119, LDAP, Option 252, Netbios-Name-Server
Netbios-Node
MSZ Option 57, length 2: 1500
Client-ID Option 61, length 7: ether 00:1f:f3:50:1a:83
Lease-Time Option 51, length 4: 7776000
Hostname Option 12, length 8: "MVT-IMac"
Agent-Information Option 82, length 25:
Circuit-ID SubOption 1, length 7: Cutover
Remote-ID SubOption 2, length 14: 172.23.101.112
#strace -p <PID>
select(22, [5 6 8], [], NULL, {40953, 482348}) = 1 (in [8], left {40951,
672863})
recvfrom(8,
"\1\1\6\0\177s\335n\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\37\363P"...,
1540, 0, {sa_family=AF_INET, sin_port=htons(68),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 311
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users