[gPXE] how to change MAC address
Joshua Oreman
oremanj at rwcr.net
Wed May 5 04:20:46 EDT 2010
On Wed, May 5, 2010 at 4:09 AM, Marco Giunta <giunta at sissa.it> wrote:
> Hi at all,
> I'm a sysadmin in an Italian college; for security reason, our PXE
> server allows only few and well known MAC addresses. When I change mac
> address with gPXE command:
>
> gPXE> set net0/mac ff:ff:ff:11:22:33
>
> and then I check new mac address with:
>
> gPXE> show net0/mac
> net0/mac = ff:ff:ff:11:22:33
>
> it seems changed, but if I want to get a DHCP address, with:
>
> gPXE>dhcp net0
>
> I receive 'Connection timed out' error.
> With Wireshark, I found that mac address is not changed, but is only
> spoofed; in fact, every ethernet frame send by the card has as source
> address the original network card mac address, but DHCP request has done
> with new mac address (ff:ff:ff:11:22:33). Of course, our dhcp server,
> replies with a DHCP offer to new mac address, so the network card cannot
> accept the offer.
>
> My question is: is this behaviour right ? I mean, command 'set netX/mac'
> should be only use for spoofing mac address in network request, or
> should really change mac address, like unix command 'ifconfig eth0 hw
> ether ff:ff:ff:11:22:33' ??
For almost all drivers, the MAC address needs to be set before the
card is initialized. Thus, you should do
gPXE> ifclose net0
gPXE> set net0/mac ff:ff:ff:11:22:33
gPXE> ifopen net0
gPXE> dhcp net0
-- Josh
>
> Thank you,
> Marco
>
> _______________________________________________
> gPXE mailing list
> gPXE at etherboot.org
> http://etherboot.org/mailman/listinfo/gpxe
>
More information about the gPXE
mailing list