[Dnsmasq-discuss] Wrong server IP in dual normal/proxyDHCP mode
Alkis Georgopoulos
alkisg at gmail.com
Fri May 15 07:43:15 BST 2015
Hi Simon, thanks for the patch,
it's a bit better, the client reports the correct proxyDHCP, but then
tries to fetch pxelinux.0 from the wrong TFTP server IP and fails.
Some network dump info: *only* when I'm using iPXE for the client, in
`dhcpdump -i eth1`, I see the wrong SIADDR:
---------------------------------------------------------------------------
TIME: 2015-05-15 08:43:32.853
IP: 10.161.254.11 (c0:4a:0:2:bc:1e) > 10.161.254.209 (8:0:27:8f:74:ad)
OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 00000000
SECS: 4
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 10.161.254.209
SIADDR: 192.168.68.1
GIADDR: 0.0.0.0
CHADDR: 08:00:27:8f:74:ad:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: /ltsp/i386/pxelinux.0.
OPTION: 53 ( 1) DHCP message type 5 (DHCPACK)
OPTION: 54 ( 4) Server identifier 192.168.68.1
OPTION: 60 ( 9) Vendor class identifier PXEClient
OPTION: 97 ( 17) UUID/GUID 00e42f96d0e4e357 ../....W
4da25e75dab1f77f M.^u....
ac .
OPTION: 43 ( 7) Vendor specific info 470480000000ff G......
---------------------------------------------------------------------------
In the iPXE's `config` I don't see 192.168.68.x anywhere though.
On the other hand, when I'm using the NIC's PXE stack, I don't see
192.168.68.1 anywhere in the output of `dhcpdump`!!!
I'm attaching the whole output of `tcpdump` below, maybe your
experienced eyes will pinpoint it.
If it makes any difference, I applied your patch to the Ubuntu's 14.04
dnsmasq version (dnsmasq-base 2.68-1ubuntu0.1), but I can also test with
the git trunk if needed.
Thanks a lot,
Alkis
==================================================
alkisg at srv1-dide:~/tmp/dnsmasq/dnsmasq-2.68$ sudo tcpdump -i eth1 port
67 or port 68 or port 69 or port 4011 -e -n -vv
[sudo] password for alkisg:
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size
65535 bytes
09:24:52.784009 08:00:27:8f:74:ad > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 590: (tos 0x0, ttl 20, id 0, offset 0, flags [none],
proto UDP (17), length 576)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request
from 08:00:27:8f:74:ad, length 548, xid 0x288f74ad, secs 4, Flags
[Broadcast] (0x8000)
Client-Ethernet-Address 08:00:27:8f:74:ad
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 36:
Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
IEN-Name-Server, Domain-Name-Server, RL, Hostname
BS, Domain-Name, SS, RP
EP, RSZ, TTL, BR
YD, YS, NTP, Vendor-Option
Requested-IP, Lease-Time, Server-ID, RN
RB, Vendor-Class, TFTP, BF
Option 128, Option 129, Option 130, Option 131
Option 132, Option 133, Option 134, Option 135
MSZ Option 57, length 2: 1260
GUID Option 97, length 17:
0.208.150.47.228.227.228.77.87.162.94.117.218.177.247.127.172
ARCH Option 93, length 2: 0
NDI Option 94, length 3: 1.2.1
Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
09:24:52.784016 08:00:27:8f:74:ad > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 590: (tos 0x0, ttl 20, id 0, offset 0, flags [none],
proto UDP (17), length 576)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request
from 08:00:27:8f:74:ad, length 548, xid 0x288f74ad, secs 4, Flags
[Broadcast] (0x8000)
Client-Ethernet-Address 08:00:27:8f:74:ad
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 36:
Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
IEN-Name-Server, Domain-Name-Server, RL, Hostname
BS, Domain-Name, SS, RP
EP, RSZ, TTL, BR
YD, YS, NTP, Vendor-Option
Requested-IP, Lease-Time, Server-ID, RN
RB, Vendor-Class, TFTP, BF
Option 128, Option 129, Option 130, Option 131
Option 132, Option 133, Option 134, Option 135
MSZ Option 57, length 2: 1260
GUID Option 97, length 17:
0.208.150.47.228.227.228.77.87.162.94.117.218.177.247.127.172
ARCH Option 93, length 2: 0
NDI Option 94, length 3: 1.2.1
Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
09:24:52.784170 c0:4a:00:02:bc:1e > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 365: (tos 0xc0, ttl 64, id 5393, offset 0, flags
[none], proto UDP (17), length 351)
10.161.254.11.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP,
Reply, length 323, xid 0x288f74ad, secs 4, Flags [Broadcast] (0x8000)
Client-Ethernet-Address 08:00:27:8f:74:ad
file "/ltsp/i386/pxelinux.0"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 10.161.254.11
Vendor-Class Option 60, length 9: "PXEClient"
GUID Option 97, length 17:
0.208.150.47.228.227.228.77.87.162.94.117.218.177.247.127.172
Vendor-Option Option 43, length 41:
6.1.3.10.4.0.80.88.69.8.7.128.0.1.10.161.254.11.9.20.128.0.17.66.111.111.116.32.102.114.111.109.32.110.101.116.119.111.114.107.255
09:24:52.786368 00:24:97:f7:d9:06 > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 344: (tos 0x0, ttl 255, id 14657, offset 0, flags
[none], proto UDP (17), length 330)
10.161.254.1.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP,
Reply, length 302, xid 0x288f74ad, Flags [Broadcast] (0x8000)
Your-IP 10.161.254.208
Client-Ethernet-Address 08:00:27:8f:74:ad
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 10.161.254.1
Lease-Time Option 51, length 4: 430603
RN Option 58, length 4: 215301
RB Option 59, length 4: 376777
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name Option 15, length 10: "ioa.sch.gr"
Domain-Name-Server Option 6, length 8: 194.63.239.164,194.63.238.4
Default-Gateway Option 3, length 4: 10.161.254.1
09:24:54.811307 08:00:27:8f:74:ad > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 590: (tos 0x0, ttl 20, id 1, offset 0, flags [none],
proto UDP (17), length 576)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request
from 08:00:27:8f:74:ad, length 548, xid 0x288f74ad, secs 4, Flags
[Broadcast] (0x8000)
Client-Ethernet-Address 08:00:27:8f:74:ad
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
Requested-IP Option 50, length 4: 10.161.254.208
Parameter-Request Option 55, length 36:
Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
IEN-Name-Server, Domain-Name-Server, RL, Hostname
BS, Domain-Name, SS, RP
EP, RSZ, TTL, BR
YD, YS, NTP, Vendor-Option
Requested-IP, Lease-Time, Server-ID, RN
RB, Vendor-Class, TFTP, BF
Option 128, Option 129, Option 130, Option 131
Option 132, Option 133, Option 134, Option 135
MSZ Option 57, length 2: 1260
Server-ID Option 54, length 4: 10.161.254.1
GUID Option 97, length 17:
0.208.150.47.228.227.228.77.87.162.94.117.218.177.247.127.172
ARCH Option 93, length 2: 0
NDI Option 94, length 3: 1.2.1
Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
09:24:54.811313 08:00:27:8f:74:ad > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 590: (tos 0x0, ttl 20, id 1, offset 0, flags [none],
proto UDP (17), length 576)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request
from 08:00:27:8f:74:ad, length 548, xid 0x288f74ad, secs 4, Flags
[Broadcast] (0x8000)
Client-Ethernet-Address 08:00:27:8f:74:ad
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
Requested-IP Option 50, length 4: 10.161.254.208
Parameter-Request Option 55, length 36:
Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
IEN-Name-Server, Domain-Name-Server, RL, Hostname
BS, Domain-Name, SS, RP
EP, RSZ, TTL, BR
YD, YS, NTP, Vendor-Option
Requested-IP, Lease-Time, Server-ID, RN
RB, Vendor-Class, TFTP, BF
Option 128, Option 129, Option 130, Option 131
Option 132, Option 133, Option 134, Option 135
MSZ Option 57, length 2: 1260
Server-ID Option 54, length 4: 10.161.254.1
GUID Option 97, length 17:
0.208.150.47.228.227.228.77.87.162.94.117.218.177.247.127.172
ARCH Option 93, length 2: 0
NDI Option 94, length 3: 1.2.1
Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
09:24:54.813302 00:24:97:f7:d9:06 > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 344: (tos 0x0, ttl 255, id 14658, offset 0, flags
[none], proto UDP (17), length 330)
10.161.254.1.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP,
Reply, length 302, xid 0x288f74ad, Flags [Broadcast] (0x8000)
Your-IP 10.161.254.208
Client-Ethernet-Address 08:00:27:8f:74:ad
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Server-ID Option 54, length 4: 10.161.254.1
Lease-Time Option 51, length 4: 432000
RN Option 58, length 4: 216000
RB Option 59, length 4: 378000
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name Option 15, length 10: "ioa.sch.gr"
Domain-Name-Server Option 6, length 8: 194.63.239.164,194.63.238.4
Default-Gateway Option 3, length 4: 10.161.254.1
09:24:54.817082 08:00:27:8f:74:ad > c0:4a:00:02:bc:1e, ethertype IPv4
(0x0800), length 590: (tos 0x0, ttl 20, id 2, offset 0, flags [none],
proto UDP (17), length 576)
10.161.254.208.4011 > 10.161.254.11.4011: [udp sum ok] UDP, length 548
09:24:54.817183 c0:4a:00:02:bc:1e > 08:00:27:8f:74:ad, ethertype IPv4
(0x0800), length 342: (tos 0xc0, ttl 64, id 24832, offset 0, flags
[none], proto UDP (17), length 328)
10.161.254.11.4011 > 10.161.254.208.4011: [udp sum ok] UDP, length 300
09:24:55.856377 08:00:27:8f:74:ad > 00:24:97:f7:d9:06, ethertype IPv4
(0x0800), length 80: (tos 0x0, ttl 20, id 3, offset 0, flags [none],
proto UDP (17), length 66)
10.161.254.208.2070 > 192.168.68.1.69: [udp sum ok] 38 RRQ
"/ltsp/i386/pxelinux.0" octet tsize 0
09:25:00.545579 2c:27:d7:dc:2e:66 > ff:ff:ff:ff:ff:ff, ethertype IPv4
(0x0800), length 342: (tos 0x0, ttl 128, id 10752, offset 0, flags
[none], proto UDP (17), length 328)
10.161.254.190.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP,
Request from 2c:27:d7:dc:2e:66, length 300, xid 0xb9606c6d, Flags
[Broadcast] (0x8000)
Client-IP 10.161.254.190
Client-Ethernet-Address 2c:27:d7:dc:2e:66
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Inform
Client-ID Option 61, length 7: ether 2c:27:d7:dc:2e:66
Hostname Option 12, length 8: "gymnasio"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 13:
Subnet-Mask, Domain-Name, Default-Gateway, Domain-Name-Server
Netbios-Name-Server, Netbios-Node, Netbios-Scope, Router-Discovery
Static-Route, Classless-Static-Route,
Classless-Static-Route-Microsoft, Vendor-Option
Option 252
================================================================
On 14/05/2015 11:32 μμ, Simon Kelley wrote:
> On 14/05/15 06:34, Alkis Georgopoulos wrote:
>> Since proxyDHCP mode doesn't yet work for UEFI clients, I'm using the
>> following as a workaround:
>>
>> dhcp-range=tag:!efi,10.161.254.0,proxy
>> dhcp-range=tag:efi,192.168.68.20,192.168.68.250,8h
>>
>> This is with a single NIC, dual IP server (10.161.254.11, 192.168.68.1).
>> The 192.168.67.1 server IP is only used to PXE boot the UEFI clients.
>>
>> The problem is that the proxyDHCP clients receive
>> proxyDHCP server IP = 192.168.68.1
>> instead of the expected 10.161.254.11.
>>
>> I.e. I would expect dnsmasq to reply with the server IP that matches the
>> proxyDHCP subnet, not the other one, which the clients can't reach.
>>
>>
>> Would that be a bug or am I doing something wrong?
>
>
> Bug, I think, could you try the code in the git repo HEAD
>
> http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=tree;h=62018e1f720fa11e83879111a4b1b3753b5c25bb;hb=62018e1f720fa11e83879111a4b1b3753b5c25bb
>
> Cheers,
>
> Simon.
More information about the Dnsmasq-discuss
mailing list