Getting an IPv6 private address for local use.

Cheap hack to get an IPv6 address that is routable based on info I learned here.

sudo ip addr add \

` /sbin/ifconfig eth0 | awk ‘/inet6/ && /fe80/ {sub(“fe80″,”fec0”,$3); print $3 }’` \

dev eth0

The feco prefix is defined to be non-routable, but visable beyond the current computer, much like 10.x.x.x or 192.168.x.x in IPv4. the 0xfe80 is scope link.

Once I did this on two machine connected by a simple switch, I was able to ssh from one to the other.

One nice thing is that both mac addresses are identical in their top half, so they show up on the same subnet. I guess that means they come from the same vendor?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.