simple ipv6 on a home network cheatsheet

since ipv6 is supposed to be pretty much plug-n-pray- automatic link local addresses, etc, it should Just Work, right? hmm. here are some tips and gotcha’s to make it easier. note, this is all command line stuff; if you’re looking for simple procedures using gui tools, you’re in the wrong place.

assumptions used in the following notes:

  • these are just notes, not comprehensive explanations

  • link local connections, i.e., fe80::

  • bsd, linux, mac (all i have to work with at the moment)

  • host firewalls disabled (use a dedicated firewall or do it on the router)

  • linux interface is wlan0

  • linux address is fe80::6bff:febe:1111

  • mac/bsd interface is en1

  • mac/bsd address is fe80::6bff:febe:2222

  • ipv6 supported on this host?

    • ifconfig wlan0 or ifconfig en1

  • get my ipv6 address(es)

    • ifconfig as above

  • view the ipv6 routing table

    • linux: netstat -nr6

    • bsd/mac: netstat -nrfinet6

  • add an address (contrived- not necessary for link local addresses, of course.)

    • linux: ifconfig wlan0 inet6 add fe80::6bff:febe:1111/64

    • mac/bsd: ifconfig en0 inet6 fe80::6bff:febe:2222 prefixlen 64 alias

  • remove an address

    • linux: ifconfig wlan0 inet6 del fe80::6bff:febe:1111/64

    • mac/bsd: ifconfig en1 inet6 fe80::6bff:febe:2222/64 delete

  • add a route

    • linux route -A inet6 add ::/0 gw fe80::6bff:febe:1111

    • bsd/mac: route -A inet6 add ::/0 fe80::6bff:febe:1111

  • remove a route

    • same for all os’s

    • route -A inet6 del ::/0

  • network discovery (find other hosts on the local link)

    • ping6 ff02::1%wlan0 or ping6 ff02::1%en1

    • if it fails on mac, ensure ipv6 enabled in the network configs:

mymac ~ $ sudo ping6 ff02::1%en1
ping6: UDP connect: No route to host
  • list neighbors (sorta like arp -a for ipv4)

    • mac/bsd: ndp -a

    • linux: ip -6 neigh show

      • linux is getting so stupid…

  • * /etc/hosts *

    • notice these won’t work w/o the interface name appended

    • same for all os’s

fe80::6bff:febe:1111%wlan0 linux6
fe80::6bff:febe:2222%wlan0 bsd6
  • ping with names

    • same for all os’s

    • ping6 -I wlan0 bsd6

  • ssh/scp

    • same for all os’s

    • addresses need interface name appended

    • scp also requires brackets (which need to be escaped or quoted)

    • using link-local addresses:

      • ssh fe80::6bff:febe:1111%wlan0

      • scp testfile '[fe80::6bff:febe:1111%wlan0]:\'

    • using names:

      • ssh linux6

      • scp testfile bsd6: