Differences between revisions 4 and 7 (spanning 3 versions)
Revision 4 as of 2011-02-08 01:54:29
Size: 185
Editor: SamatJain
Comment: Remove line numbers
Revision 7 as of 2012-09-11 19:40:56
Size: 1803
Editor: SamatJain
Comment: Printing uncompressed IPv6 addresses
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Traceroute to nearest IPv6 6to4 router == == 6to4 ==

=== Debian configuration ===

For dynamic IP:

{{{
auto 6to4
iface 6to4 inet6 v4tunnel
        address $(ipv6calc --quiet --action conv6to4 $(wget -O - 'http://ifconfig.me/ip' --quiet))
        netmask 16
        gateway ::192.88.99.1
        endpoint 192.88.99.1
        local $(wget -O - 'http://ifconfig.me/ip' --quiet)
        post-up service radvd restart
        post-up service shorewall6 restart
        post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
        post-up ip -6 addr add $(ipv6calc --quiet --action conv6to4 $(wget -O - 'http://ifconfig.me/ip' --quiet))1/64 dev eth0
}}}

=== Traceroute to nearest IPv6 6to4 router ===
Line 7: Line 27:
(!) Need to discuss 6ot4 and link to references (!) Need to discuss 6to4 and link to references

== 6rd ==

For Qwest, from [[https://forum.openwrt.org/viewtopic.php?id=37516|OpenWrt's forums]]:

{{{#!highlight sh
#!/bin/sh

MYIPADDRESS=N.N.N.N

CLINKPREFIX="2602"
CLINKLENGTH=24
CLINK6RDNODE=205.171.2.64

LANINTF=br-lan
WANINTF=pppoe-wan

V6IPADDR=$(printf "$CLINKPREFIX:%02x:%02x%02x:%02x00::1\n" $(echo $MYIPADDRESS | tr . ' '))

if [ -n "$V6IPADDR" ]; then
        ip tunnel del 6rd
    ip addr add $V6IPADDR/64 dev br-lan
    ip tunnel add 6rd mode sit local $MYIPADDRESS ttl 64
    ip tunnel 6rd dev 6rd 6rd-prefix $CLINKPREFIX::/$CLINKLENGTH
    ip addr add $V6IPADDR/$CLINKLENGTH dev 6rd
    ip link set 6rd up
    ip route add ::/0 via ::$CLINK6RDNODE dev $WANINTF
fi
}}}

there's also

== ipv6calc ==

=== Uncompressed IPv6 address ===

Print fully uncompressed IPv6 address, w/ colons removed (useful for djbdns):

{{{#!highlight sh numbers=off
ipv6calc 2001:db8::1 --out ipv6addr --printfulluncompressed | sed 's/://g'
}}}

6to4

Debian configuration

For dynamic IP:

auto 6to4
iface 6to4 inet6 v4tunnel
        address $(ipv6calc --quiet --action conv6to4 $(wget -O - 'http://ifconfig.me/ip' --quiet))
        netmask 16
        gateway ::192.88.99.1
        endpoint 192.88.99.1
        local $(wget -O - 'http://ifconfig.me/ip' --quiet)
        post-up service radvd restart
        post-up service shorewall6 restart
        post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
        post-up ip -6 addr add $(ipv6calc --quiet --action conv6to4 $(wget -O - 'http://ifconfig.me/ip' --quiet))1/64 dev eth0

Traceroute to nearest IPv6 6to4 router

traceroute 192.88.99.1

(!) Need to discuss 6to4 and link to references

6rd

For Qwest, from OpenWrt's forums:

   1 #!/bin/sh
   2 
   3 MYIPADDRESS=N.N.N.N
   4 
   5 CLINKPREFIX="2602"
   6 CLINKLENGTH=24
   7 CLINK6RDNODE=205.171.2.64
   8 
   9 LANINTF=br-lan
  10 WANINTF=pppoe-wan
  11 
  12 V6IPADDR=$(printf "$CLINKPREFIX:%02x:%02x%02x:%02x00::1\n" $(echo $MYIPADDRESS | tr . ' '))
  13 
  14 if [ -n "$V6IPADDR" ]; then
  15         ip tunnel del 6rd
  16     ip addr add $V6IPADDR/64 dev br-lan
  17     ip tunnel add 6rd mode sit local $MYIPADDRESS ttl 64
  18     ip tunnel 6rd dev 6rd 6rd-prefix $CLINKPREFIX::/$CLINKLENGTH
  19     ip addr add $V6IPADDR/$CLINKLENGTH dev 6rd
  20     ip link set 6rd up
  21     ip route add ::/0 via ::$CLINK6RDNODE dev $WANINTF
  22 fi

there's also

ipv6calc

Uncompressed IPv6 address

Print fully uncompressed IPv6 address, w/ colons removed (useful for djbdns):

ipv6calc 2001:db8::1 --out ipv6addr --printfulluncompressed | sed 's/://g'


CategoryCheatSheet

SamatsWiki: CheatSheet/IPv6 (last edited 2012-09-11 19:40:56 by SamatJain)