difference between behavior after pxe and normal request and their definitions
Meike Stone
meike.stone at googlemail.com
Mon Jul 21 15:57:28 UTC 2014
Hello,
thanks for answer.
bruce> If I recall correctly, PXE does not use a Client Identifier when it
bruce> asks for an address. When the OS boots and asks for its address, it
bruce> (at least Windows) does specify the client identifier option.
But as you can see, that the PXE-Client also send a Client Identifier
in DISCOVER and REQUEST!
the only different thing ar the PXE extentions in the DHCP-Package...
glenn> However, in your packet capture the PXE client does send a Client-Id, and
glenn>it is the same as the Windows Client-Id, so the chcp server would see this
glenn>as the same client asking for a renewal of an existing lease, so it is ok
glenn>for it to do so.
Hmm, I thought, that there is the Client ID included?!
Streaming boot from Windows is a little bit other than like from Linux
or similar..
After streaming the small bootimage via tftp, the client takes the IP
from the dhcp request from the NIC and geht the OS Files. THIS
connection can't (wont) release the IP, because it streams the
whole OS and use it, after complete booting of the OS!!! No matter, if
the lease time is expired. It can't release .. :-(
If the Windows OS IP-Stack does not get the same IP, it binds a second
adapter, but it will not use this IP-Adress for streaming ...
So it is extreme important, that Windows get the same adress. This
only works with PXE, as the tests figured out.
My Problem is, it works right (with PXE), but I don't know why...
-> So with PXE, the Client gets the same address again,
-> Without PXE the client gets two addresses, especially, if the
leasetime for the PXE package is extrem short, managed like this:
class "PXE" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
default-lease-time 60;
max-lease-time 60;
}
Another question:
Does the isc dhcpd prefer the Client-ID (option 61) before chaddr from
bootp header?
If so, where is it declared? I only found this part in the rfc 2132:
"4.2
A DHCP server needs to use some unique identifier to associate a
client with its lease. The client MAY choose to explicitly provide
the identifier through the 'client identifier' option. If the client
supplies a 'client identifier', the client MUST use the same 'client
identifier' in all subsequent messages, and the server MUST use that
identifier to identify the client. If the client does not provide a
'client identifier' option, the server MUST use the contents of the
'chaddr' field to identify the client. It is crucial for a DHCP
client to use an identifier unique within the subnet to which the
client is attached in the 'client identifier' option. Use of
'chaddr' as the client's unique identifier may cause unexpected
results, as that identifier may be associated with a hardware
interface that could be moved to a new client. Some sites may choose
to use a manufacturer's serial number as the 'client identifier', to
avoid unexpected changes in a clients network address due to transfer
of hardware interfaces among computers. Sites may also choose to use
a DNS name as the 'client identifier', causing address leases to be
associated with the DNS name rather than a specific hardware box."
Thanks Meike
Here the capture again, but with requests:
=========================================
Example without PXE for a)
=========================================
**** NIC (non PXE) ****
--------------------------
*Discover*
15:43:27.390642 192.168.128.12.bootpc > dhcpsrv.vdi.test.bootps:
[udpsum ok] BOOTP/DHCP, Request from 42:b1:60:11:23:12 (oui Unknown),
length 260, hops 1,
xid 0x574fe450, Flags [none]
Gateway-IP 192.168.128.12
Client-Ethernet-Address 42:b1:60:11:23:12 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 42:b1:60:11:23:12
Parameter-Request Option 55, length 5:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
Server-ID
END Option 255, length 0
*Offer*
15:43:27.391136 IP dhcpsrv.vdi.test.bootps >
192.168.128.12.bootps:[udp sum ok] BOOTP/DHCP, Reply, length 300, hops
1,
xid 0x574fe450, Flags [none]
Your-IP 192.168.128.215
Gateway-IP 192.168.128.12
Client-Ethernet-Address 42:b1:60:11:23:12 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Lease-Time Option 51, length 4: 360
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.128.1
Domain-Name-Server Option 6, length 8: dns01.vdi.test,dns02.vdi.test
Domain-Name Option 15, length 11: "d.vdi.test."
END Option 255, length 0
PAD Option 0, length 0, occurs 9
*Request*
15:43:27.399568 192.168.128.12.bootpc > dhcpserv.vdi.test.bootps: [udp
sum ok] BOOTP/DHCP, Request from 42:b1:60:11:23:12 (oui Unknown),
length 272, hops 1,
xid 0x574fe450, Flags [none]
Gateway-IP 192.168.124.12
Client-Ethernet-Address 42:b1:60:11:23:12 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
Client-ID Option 61, length 7: ether 42:b1:60:11:23:12
Requested-IP Option 50, length 4: 192.168.128.215
Server-ID Option 54, length 4: dhcpserv.vdi.test
Parameter-Request Option 55, length 5:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
Server-ID
END Option 255, length 0
**** WINDOWS OS Stack ****
--------------------------
*Discover*
15:46:42.656691 192.168.128.12.bootpc > dhcpsrv.vdi.test.bootps:[udp
sum ok] BOOTP/DHCP, Request from 42:b1:60:11:23:12 (oui Unknown),
length 300, hops 1,
xid 0x42f613d, secs 768, Flags [Broadcast]
Gateway-IP 192.168.128.12
Client-Ethernet-Address 42:b1:60:11:23:12 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
CLASS Option 77, length 7: "vditest"
Client-ID Option 61, length 7: ether 42:b1:60:11:23:12
Hostname Option 12, length 11: "pvs-pd-t-04"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 12:
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
END Option 255, length 0
PAD Option 0, length 0
*Offer*
15:46:43.658587 dhcpsrv.vdi.test.bootps > 192.168.128.12.bootps:
[udpsum ok] BOOTP/DHCP, Reply, length 300, hops 1,
xid 0x42f613d, secs 768, Flags [Broadcast]
Your-IP 192.168.128.184
Gateway-IP 192.168.128.12
Client-Ethernet-Address 42:b1:60:11:23:12 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Lease-Time Option 51, length 4: 3600
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name Option 15, length 11: "d.vdi.test."
Default-Gateway Option 3, length 4: 192.168.128.1
Domain-Name-Server Option 6, length 8: dns01.vdi.test,dns02.vdi.test
END Option 255, length 0
PAD Option 0, length 0, occurs 9
*Request*
15:46:43.668611 192.168.128.12.bootpc > dhcpsrv.vdi.test.bootps: [udp
sum ok] BOOTP/DHCP, Request from 42:b1:60:11:23:12 (oui Unknown),
length 338, hops 1,
xid 0x42f613d, secs 768, Flags [Broadcast] (0x8000)
Gateway-IP 192.168.128.12
Client-Ethernet-Address 42:b1:60:11:23:12 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
CLASS Option 77, length 7: "vditest"
Client-ID Option 61, length 7: ether 42:b1:60:11:23:12
Requested-IP Option 50, length 4: 192.168.128.184
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Hostname Option 12, length 11: "pvs-pd-t-04"
FQDN Option 81, length 25: "pvs-pd-t-04.d.vdi.test"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 12:
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
END Option 255, length 0
=========================================
Example with PXE for b)
=========================================
**** NIC with PXE ****
--------------------------
*Discover*
16:09:23.366919 192.168.128.12.bootps > dhcpsrv.vdi.test.bootps:
[udpsum ok] BOOTP/DHCP, Request from d6:12:16:ef:ab:32 (oui Unknown),
length 384, hops 2,
xid 0x16dae42a, secs 4, Flags [none] (0x0000)
Gateway-IP 192.168.128.12
Client-Ethernet-Address d6:12:16:ef:ab:32 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
MSZ Option 57, length 2: 1260
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"
CLASS Option 77, length 4: "gPXE"
Parameter-Request Option 55, length 13:
Subnet-Mask, Default-Gateway, Domain-Name-Server, LOG
Hostname, Domain-Name, RP, Vendor-Option
Vendor-Class, TFTP, BF, Option 175
Option 203
T175 Option 175, length 42:
45317,272,60545,14616,257,8705,281,257,8449,272,258,4609,275,257,4353,491,769,0,5889,277,257
Client-ID Option 61, length 7: ether d6:12:16:ef:ab:32
GUID Option 97, length 17:
0.76.160.173.120.214.79.202.71.138.35.67.120.117.143.246.52
END Option 255, length 0
*Offer*
16:09:24.367470 dhcpsrv.vdi.test.bootps > 192.168.128.12.bootps:
[udpsum ok] BOOTP/DHCP, Reply, length 300, hops 2,
xid 0x16dae42a, secs 4, Flags [none] (0x0000)
Your-IP 192.168.128.34
Gateway-IP 192.168.128.12
Client-Ethernet-Address d6:12:16:ef:ab:32 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Lease-Time Option 51, length 4: 360
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.128.1
Domain-Name-Server Option 6, length 8: dns01.vdi.test,dns02.vdi.test
Domain-Name Option 15, length 11: "d.vdi.test."
END Option 255, length 0
PAD Option 0, length 0, occurs 9
*Request*
16:09:24.369791 192.168.128.12.bootps > dhcpsrv.vdi.test.bootps:
[udpsum ok] BOOTP/DHCP, Request from d6:12:16:da:e4:2a (oui Unknown),
length 396, hops 2,
xid 0x16dae42a, secs 4, Flags [none] (0x0000)
Gateway-IP 192.168.128.12
Client-Ethernet-Address d6:12:16:ef:ab:32 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
MSZ Option 57, length 2: 1260
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"
CLASS Option 77, length 4: "gPXE"
Parameter-Request Option 55, length 13:
Subnet-Mask, Default-Gateway, Domain-Name-Server, LOG
Hostname, Domain-Name, RP, Vendor-Option
Vendor-Class, TFTP, BF, Option 175
Option 203
T175 Option 175, length 42:
45317,272,60545,14616,257,8705,281,257,8449,272,258,4609,275,257,4353,491,769,0,5889,277,257
Client-ID Option 61, length 7: ether d6:12:16:ef:ab:32
GUID Option 97, length 17:
0.76.160.173.120.214.79.202.71.138.35.67.120.117.143.246.52
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Requested-IP Option 50, length 4: 192.168.128.34
END Option 255, length 0
**** WINDOWS OS Stack ****
---------------------------
*Discover*
16:10:05.079842 192.168.128.12.bootps > dhcpsrv.vdi.test.bootps:
[udpsum ok] BOOTP/DHCP, Request from d6:12:16:ef:ab:32 (oui Unknown),
length 300, hops 2,
xid 0x5ba369f0, Flags [Broadcast] (0x8000)
Gateway-IP 192.168.128.12
Client-Ethernet-Address d6:12:16:ef:ab:32 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
CLASS Option 77, length 5: "vdipc"
Client-ID Option 61, length 7: ether d6:12:16:ef:ab:32
Hostname Option 12, length 12: "vdisk-04-002"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 12:
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
END Option 255, length 0
PAD Option 0, length 0, occurs 2
*Offer*
16:10:05.080139 dhcpsrv.vdi.test.bootps > 192.168.128.12.bootps:
[udpsum ok] BOOTP/DHCP, Reply, length 300, hops 2,
xid 0x5ba369f0, Flags [Broadcast] (0x8000)
Your-IP 192.168.128.34
Gateway-IP 192.168.128.12
Client-Ethernet-Address d6:12:16:ef:ab:32 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Lease-Time Option 51, length 4: 3600
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name Option 15, length 11: "d.vdi.test."
Default-Gateway Option 3, length 4: 192.168.128.1
Domain-Name-Server Option 6, length 8: dns01.vdi.test,dns02.vdi.test
END Option 255, length 0
PAD Option 0, length 0, occurs 9
*Request*
16:10:08.847373 IP 192.168.128.12.bootps > dhcpsrv.vdi.test.bootps:
[udpsum ok] BOOTP/DHCP, Request from d6:12:16:ef:ab:32 (oui Unknown),
length 338, hops 2,
xid 0x5ba369f0, secs 1024, Flags [Broadcast] (0x8000)
Gateway-IP 172.23.128.12
Client-Ethernet-Address d6:12:16:ef:ab:32 (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
CLASS Option 77, length 5: "vdipc"
Client-ID Option 61, length 7: ether d6:12:16:ef:ab:32
Requested-IP Option 50, length 4: 192.168.128.34
Server-ID Option 54, length 4: dhcpsrv.vdi.test
Hostname Option 12, length 12: "vdisk-04-002"
FQDN Option 81, length 26: "vdisk-04-002.d.vdi.test"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 12:
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
END Option 255, length 0
More information about the dhcp-users
mailing list