Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SMF Manifest to bring up IPv6 on SmartOS
Need to open /usbkey/config and add
place ipv6 in /opt/custom/smf
place ipv6.xml in /opt/custom/scripts
. /lib/svc/share/
. /lib/sdc/
ifconfig ${SYSINFO_NIC_admin} inet6 plumb up
if [[ -n "${CONFIG_admin_v6_ip}" ]] && [[ -n "${CONFIG_admin_v6_gateway}" ]]; then
ifconfig ${SYSINFO_NIC_admin} inet6 addif ${CONFIG_admin_v6_ip} up
route add -inet6 ${CONFIG_admin_v6_gateway} ${CONFIG_admin_v6_ip} -interface
route add -inet6 default ${CONFIG_admin_v6_gateway}
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="export">
<service name="site/ipv6" type="service" version="0">
<create_default_instance enabled="true"/>
<dependency name="network" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/milestone/network:default"/>
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/system/filesystem/local"/>
<exec_method name="start" type="method" exec="/opt/custom/scripts/ipv6" timeout_seconds="60"/>
<exec_method name="stop" type="method" exec=":kill" timeout_seconds="60"/>
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="transient"/>
<propval name="ignore_error" type="astring" value="core,signal"/>
<property_group name="application" type="application"/>
<stability value="Evolving"/>
<loctext xml:lang="C">Create an IPv6 vnic, bind to admin and bring up for global zone</loctext>
Copy link

badboy commented Dec 3, 2012

Took me sometime to figure this out.To actually enable IPv6:

cd /opt/custom/smf
svccfg validate ipv6.xml 
svccfg import ipv6.xml 
svcadm enable site/ipv6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment