Hi, If you start networking with one MAC address and later change it you will probably have some packet lost. As the switch will try to send to the old MAC address.
Any way you should not connect TCP and during this connection change the MAC. If you do not have any network activity, change MAC and start networking you should not have any problems. As I wrote before in all our devices we give the user (normally only technicians in our production) the ability to change MAC address. This is done only once during software loading etc... BR, Noam. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Freddie Chopin Sent: Thursday, April 07, 2016 6:52 PM To: [email protected] Subject: Re: [lwip-users] Changing MAC address of network interface? On czw, 2016-04-07 at 14:51 +0000, Noam Weissman wrote: > If your TCP stack sends data before you change the MAC the older MAC > address is saved by the router/switch It is connected to.. also it > make sense that some packets are saved within the TCP stack buffering > with the older MAC address (before you change it). That's the thing I'm asking about. If the router saves the MAC, will future connections (after I change the MAC) work correctly? How about currently active TCP connections? > What I am saying that you can change MAC address on the fly but I > think it's better to do it before you connect the cable and start data > transfer. I just want to know whether or not this can be easily done and whether this will work reliably. If it can be done, I would prefer to give the user such possibility. If it cannot be done, then I will write in the documentation that any change of MAC is effective only after hard reset of the device (de-initializing and re-initializing network interface is too disruptive). Changing MAC will most likely be done extremely rarely, that's why I don't want to write a lot of code to actually perform such change. But if just changing hwaddr contents (and changing MAC in the EMAC driver of the chip) is enough, then why not? Regards, FCh _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
