On Wed, Oct 12, 2016 at 2:24 AM, Per Jessen <per@computer.org> wrote:
Greg Freemyer wrote:
So, I haven't done anything with IPv6 in a month, but I thought I would see how things look now:
~> /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 30:5A:3A:54:0D:E1 inet addr:192.168.1.13 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: 2601:c0:8105:82f0:dc12:1b54:f78c:771b/64 Scope:Global inet6 addr: 2601:c0:8105:82f0:325a:3aff:fe54:de1/64 Scope:Global inet6 addr: fe80::325a:3aff:fe54:de1/64 Scope:Link inet6 addr: 2601:c0:8105:82f0:9d4e:b509:cc85:9129/64 Scope:Global inet6 addr: 2601:c0:8105:82f0:3457:ddc2:f1ca:27ac/64 Scope:Global inet6 addr: 2601:c0:8105:82f0:e563:7d8a:d099:5fa0/64 Scope:Global inet6 addr: 2601:c0:8105:82f0:e145:4681:48ee:de0d/64 Scope:Global inet6 addr: 2601:c0:8105:82f0:550f:8f7a:f464:3d3a/64 Scope:Global
I assume 6 random IP addresses and one derived from the MAC. This is the same machine as above (a month ago). How do I know which IP was derived from the MAC.
It's the one with 'FF:FE" in the middle. FFFE is an IEEE reserved value for MAC-derived IPv6 addresses. It's also very similar to your link-local (fe80::) address.
Looks like I'm (transparently) using IPv6 to connect to google:
~> netstat -an|grep 2601 tcp 0 0 2601:c0:8105:82f0:44992 2607:f8b0:4002:c06::443 ESTABLISHED tcp 1 78 2601:c0:8105:82f0:53892 2607:f8b0:4002:c06::443 CLOSING tcp 1 78 2601:c0:8105:82f0:34698 2607:f8b0:4002:c06::443 CLOSING tcp 0 0 2601:c0:8105:82f0:39676 2607:f8b0:4002:c06::443 ESTABLISHED
Those only list the prefix 2601:c0:8105:82f0, try adding '-T' to see the full addresses. Assuming you have not touched /etc/gai.conf, your machine will prefer IPv6 over IPv4 when it is available.
You're right, it is using the NIC based IP for outbound.
netstat -anT|grep 2601 tcp 0 0 2601:c0:8105:82f0:325a:3aff:fe54:de1:47380 2607:f8b0:4002:c03::8b:443 ESTABLISHED tcp 0 0 2601:c0:8105:82f0:325a:3aff:fe54:de1:57544 2607:f8b0:4002:c08::bd:443 ESTABLISHED tcp 0 0 2601:c0:8105:82f0:325a:3aff:fe54:de1:33816 2607:f8b0:4002:c03::65:443 ESTABLISHED tcp 0 0 2601:c0:8105:82f0:325a:3aff:fe54:de1:33814 2607:f8b0:4002:c03::65:443 ESTABLISHED tcp 0 0 2601:c0:8105:82f0:325a:3aff:fe54:de1:22 2601:c0:8105:82f0:f9e0:3fc2:e77b:7316:56392 ESTABLISHED <snip>
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org