When setting up my 3750 stacks, I enable IPv6 on the Vlan1 interface so that I can manage the stack over IPv6. The stacks are not doing any layer 3 routing. However, it seems that the IPv6 address that gets automatically assigned changes if a different switch becomes the stack master, presumably because the mac address of the vlan interfaces changes as well. Other than manually assigning an IPv6 address, is there a way to prevent this annoying behavior?
You need to enable the 'Persistent MAC-Address' feature of the 3750 with the
stack-mac persistent timer 0 command. There is no way to assign a virtual mac-address to a 3750 stack.
You could use DHCPv6 to send them IPv6 addresses, but your best bet is going to be the same approach with IPv4 - static IP addressing for management interfaces.
Also, consider using a different and unique VLAN for your management interface and applying ACLs limiting access to the management interface.
You are probably getting a Link Local address. The Link Local address is typically formed using EUI-64, which means it is based upon the MAC address of the interface. If the interface changes (due to stack of switches, or redundant switches, or failover, or new SVIs), then the Link Local address is likely to change as well.
The solution? Manually configure a static IPv6 link local address, so that all manors of redundancy use the same one.
You could, theoretically, also disable IPv6 if you weren't looking to use it. But again, that wouldn't be an option if you actually wanted to reach this switch via IPv6.
Always assign static IPv6 addresses to any network device. If you are using the 3750 for routing Statles Address Autoconfiguration (SLAAC) is not even supposed to work . Cisco may think otherwise: I opened a TAC case for an ASA and got "yes we ignore the RFC" as answer.
Using SLAAC the address of the switch is based on a prefix (received from a router on your network) and a the MAC address of the interface (with ff:fe added in the middle and the U/L bit set to locally assigned). If the master of your stack changes the MAC address most likely changes too.
If you try to take the route of DHCPv6, chances are you will have a similar problem with the addresses assigned via DHCP reservations. When we turned on DHCPv6, we would get the reserved IPv6 address we gave it, another randomly assigned address from the reservation that would keep returning no matter how many we deleted it, and a link local address. All of these addresses would confuse the routing table, and our network clients would not be able to find the proper route to try and pass information anywhere.
We have found that if you remove DHCPv6 all together and statically assign IP addresses to everything, your network will know where to go, no matter what the link local address turns out to be. That is where our network is now.
There is a method that we plan to look into within the next few months called SLACC that may also solve your problem. SLACC seems to do the same functionality that DHCP does for v4, but for v6. http://www.ciscopress.com/articles/article.asp?p=2154680
I hope this was helpful!