On Sun, Jun 19, 2011 at 11:30:19AM +0200, Andreas Bartelt wrote: > Hello, > > one of my hosts has one wired and one wireless interface, and both > interfaces have /64 IPv6 addresses in different subnets. I've > noticed that this host doesn't use the IPv6 address of the outgoing > interface (i.e., the wireless interface) as its source address, but, > instead, the IPv6 address of the wired interface. I've seen this > even when the wired interface is down. According to the routing > table, I don't understand why the IPv6 address of the wired > interface should be used in this case. I've already tried to > increase the priority of the wireless interface (to priority 0), but > this doesn't help. > > Example: > wired interface: 2001:db8:10:10::2/64 > wireless interface: 2001:db8:100:100::2/64 > > destination address: 2001:db8:10:20::1/64 > > The default route is set to the router address 2001:db8:100:100::1, > so the wireless interface is the outgoing interface. The router with > the address 2001:db8:100:100::1 can directly reach 2001:db8:10:20::1 > by using its interface with address 2001:db8:10:20::2/64. > > What surprises me is that although the correct outgoing (wireless) > interface is used, an IPv6 packet to 2001:db8:10:20::1 has the > source address of the wired interface 2001:db8:10:10::2. >
Welcome to IPv6 where source address selection is so complex that nobody understands it. In the end it often selects the address that is numerically closest to the destination. So yes, IPv6 tends to do stupid things and this is actually the way IETF wants it to be. Another reason why most of the network stack hackers think IPv6 is broken by design. -- :wq Claudio

