I have two NICs in a client PC. I have a WDS server.
When I boot from PXE on client computer I receive:
WdsClient: An error occurred while obtaining an IP address from the DHCP server. Please check to ensure that there is an operational DHCP server on this network segment.
I think my client is trying to get an IP adress from the NIC which not connected to LAN. How to avoid this error?
What might be happening is that when you PXE boot, the interface you PXE boot from is not the interface that gets detected first by the OS you are loading. So if you PXE boot from interface 2, then it loads an OS stub which wants a DHCP lease, it will probe out of interface 1 for a lease, then get unhappy because it can't find one.
Put the PXE cable into the other physical interface and PXE boot from that instead.
This may not be possible if you have an expansion card in the computer that is both non-PXE-bootable and is detected first during interface detection routines. In that case, you'll either have to PXE without that interface installed (which is what it sounds like you did from your comment), or fix your PXE environment/stub OS to use the PXE interface as the primary interface at configuration time. This could range from trivial to impossible, depending on what you are doing.
The issue is that one or both of the NICs is hosing the PXENV table, or the register pointers. So PXE loads the OS bootloader, but isn't passing the correct information table to it.
Try updating the firmware on the cards if you can. If not, you'll probably have to try removing/disabling them until you find the offending card.