From what I can see, the change of the MAC (ioctl EIOCSADDR) is known to the
driver only. After the change the simple ping will not work... If I do the change on startup, when system reads the MAC (and return the new MAC), it is
fine... So the runtime change is not "propagated" automatically through out the
OS... There has to be some action "reloading" the info from the driver...
You have to wait 5-20 minutes for the ARP tables on all the machines on the local
LAN to time out their entry for your IP address. OR you need to broadcast an unsolicited or gratuitous ARP to update their ARP tables.
There are a few ways you can do this:
- Bring the interface down then up. The TCP/IP stack should broadcast an unsolicited
ARP when it brings up an interface with an IP address.
- call ifAddrSet() on the interface. The stack broadcasts an unsolicited ARP when an
IP address is assigned to an interface.
- open a raw socket, create and populate your own unsolicited ARP packet, then
broadcast it.
James.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 353 |
Nodes: | 16 (2 / 14) |
Uptime: | 75:51:10 |
Calls: | 7,639 |
Files: | 12,802 |
Messages: | 5,691,804 |