When configuring 6to4 tunnels, a 6to4 router must act as the IPv6 router to the nodes that are in the network's 6to4 sites. Thus, when configuring a 6to4 router, you must also configure the router as an IPv6 router on its physical interfaces. For more information about configuring an Oracle Solaris system as a router, see Configuring an IPv6 Router in Configuring an Oracle Solaris 11.3 System as a Router or a Load Balancer.
# dladm create-iptun -T 6to4 -a local=address tunnel-link
Specifies the tunnel local address, which must already be existing in the system to be a valid address.
Specifies the IP tunnel link that you can assign a tunnel.
# ipadm create-ip tunnel-interface
where tunnel-interface uses the same name as the tunnel link.
The system automatically configures an IPv6 address for the local interface by using interface-id ::1.
# pfedit /etc/inet/ndpd.conf
if subnet-interface AdvSendAdvertisements 1 prefix IPv6-prefix subnet-interface
where the first line specifies the local IPv6 interface to send router advertisements over and the second line specifies the IPv6 subnet prefix to use on the LAN that is attached to that interface. The IPv6 prefix must start with the same 48-bit 6to4 prefix that is used on the 6to4 tunnel interface.
For detailed information about the ndpd.conf file, see the ndpd.conf(4) man page.
# ipadm set-prop -p forwarding=on ipv6
The IPv6 nodes on each subnet to receive the 6to4 prefix autoconfigured with the new 6to4-derived addresses.
For instructions, see Chapter 4, Administering Naming and Directory Services on an Oracle Solaris Client in Configuring and Managing Network Components in Oracle Solaris 11.3.
The following example shows you would create a 6to4 tunnel. Note that only IPv6 interfaces can be configured over 6to4 tunnels. In this example, the subnet interface is net0 to which the /etc/inet/ndpd.conf refers.
# dladm create-iptun -T 6to4 -a local=192.0.2.23 tun0 # ipadm create-ip tun0 # ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.0.2.23/24 lo0/v6 static ok ::1/128 tun0/v6 static ok 2002:c000:217::1/16 # ipadm create-addr -T addrconf net0 net0/v6 # ipadm create-addr -a 2002:c000:217:cafe::1 net0 net0/v6a # ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.0.2.23/24 lo0/v6 static ok ::1/128 net0/v6 addrconf ok fe80::214:4fff:fef9:b1a9/10 net0/v6a static ok 2002:c000:217:cafe::1/64 tun0/v6 static ok 2002:c000:217::1/16 # vi /etc/inet/ndpd.conf if net0 AdvSendAdvertisements on prefix 2002:c000:217:cafe::0/64 net0 # ipadm set-prop -p forwarding=on ipv6
Note that for 6to4 tunnels, the prefix for the IPv6 address is 2002.