I'm not sure what you're trying to do here. Windows already does DHCP for you. But nevertheless:
use strict; use warnings;
This makes sense as my local UDP 68 port is in use by svchost.exe for DHCP services already. When I switch to a non-well-known-port (e.g., 6800) it runs but it doesn't send the packet out the interface I expected - which may be your problem when using the alternate NIC. I determined this with a packet capture (Wireshark) capturing on all interfaces with filter 'udp.srcport == 6800'.
Windows has a preferred interface to send traffic out when there are several matches in the host route table. In this case, your destination of 255.255.255.255 could be for *any* network interface / card, so the default one is used, which by priority, may not be the one you "want".
In reply to Re: why i don't receive DHCPDiscover message from server using dongle and why same code give DHCPNac on wifi
by VinsWorldcom
in thread why i don't receive DHCPDiscover message from server using dongle and why same code give DHCPNac on wifi
by ppp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |