The Cable Guy - September 2002

Manual Configuration for IPv6

TechNet's The Cable Guy

By The Cable Guy

In most cases, an IPv6 host running Windows XP or a member of the Windows Server 2003 family does not have to be manually configured. However, there are some cases in which the computer must be manually configured with IPv6 addresses. Additionally, there are times when a computer has a special role on the network.

The following sections describe how to manually configure IPv6 for:

  • Manual IPv6 addresses.
  • An IPv6 router.
  • A 6to4 router.
  • An Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) router.
  • A 6over4 router.

Manual IPv6 addresses

The IPv6 protocol for Windows XP and the Windows Server 2003 family supports stateless address autoconfiguration, with which addresses, routes, and other configuration parameters are automatically configured on the basis of the receipt of Router Advertisement messages. However, if you want to configure either IPv6 addresses (without using router advertisements) or anycast addresses, such as anycast addresses for DNS servers, you can manually configure IPv6 addresses with the netsh interface ipv6 add address command. The syntax of this command is:

netsh interface ipv6 add address InterfaceNameOrIndex IPv6Address [[type=]unicast|anycast] [[validlifetime=]Minutes|infinite] [[preferredlifetime=]Minutes|infinite] [[store=]active|persistent]

By default, the address type is unicast, the valid and preferred lifetimes are infinite, and the address is persistent. To obtain the interface name or its index, use the display of the netsh interface ipv6 show interface command.

For example, to configure the site-local address FEC0::1A49:2AA:FF:FE34:CA8F on the interface named Local Area Connection, the command is:

netsh interface ipv6 add address "Local Area Connection" fec0::1a49:2aa:ff:fe34:ca8f

To change an existing address, use the netsh interface ipv6 set address command. To remove an address, use the netsh interface ipv6 delete address command.

IPv6 Router

An IPv6 router not only forwards IPv6 packets between interfaces, but also advertises both its presence and stateless address autoconfiguration information for hosts located on directly-attached subnets. This is done by sending Router Advertisement messages. A computer running Windows XP or a member of the Windows Server 2003 family can be configured as a static router and as an advertising router. A static router does not use routing protocols to maintain the routes in the IPv6 route table.

To create a static IPv6 router, you must enable forwarding and advertising on the required interfaces. An IPv6 router does not have to have two LAN interfaces installed. For example, for an ISATAP router, you can have a single LAN interface and enable forwarding on the LAN interface and both forwarding and advertising on the Automatic Tunneling Pseudo-Interface. More information about ISATAP, see the "ISATAP Router" section of this article.

To enable forwarding and advertising on an interface, use the following command:

netsh interface ipv6 set interface InterfaceNameOrIndex [forwarding=]enabled|disabled] [[advertise=]enabled|disabled] [[mtu=]MTUSize] [[store=]active|persistent]

By default, forwarding and advertising are disabled, the MTU size is the link MTU reported by the interface, and the interface settings are persistent.

For example, a computer running a member of the Windows Server 2003 family is being configured as a router. It has three interfaces named Local Area Connection, Local Area Connection 2, and Local Area Connection 3. To enable forwarding and advertising over Local Area Connection and Local Area Connection 2, and forwarding over Local Area Connection 3, the commands are:

netsh interface ipv6 set interface "Local Area Connection" forwarding=enabled advertise=enabled netsh interface ipv6 set interface "Local Area Connection 2" forwarding=enabled advertise=enabled netsh interface ipv6 set interface "Local Area Connection 3" forwarding=enabled

The Local Area Connection 3 interface is attached to a subnet that already contains an advertising router.

After these commands are run, the router sends Router Advertisement messages through the Local Area Connection and Local Area Connection 2 interfaces. However, they do not contain any Prefix Information or Route Information options through which hosts on the attached subnets can autoconfigure addresses and routes. The router must now be configured with routes to publish.

To add a route, use the following command:

netsh interface ipv6 add route IPv6Address/PrefixLength InterfaceNameOrIndex [[nexthop=]IPv6Address] [[publish=]no|age|yes] [[validlifetime=]Minutes|infinite] [[preferredlifetime=]Minutes|infinite] [[store=]active|persistent]

By default, there is no next-hop address (the prefix is on-link), the route is not published, the valid and preferred lifetimes are infinite, and the route is persistent.

For example, to add the route and publish the on-link site-local prefix FEC0:0:0:1::/64 on Local Area Connection, and then add the route and publish the on-link site-local prefix FEC0:0:0:2::/64 on Local Area Connection 2, the commands are:

netsh interface ipv6 add route fec0:0:0:1::/64 "Local Area Connection" publish=yes netsh interface ipv6 add route fec0:0:0:2::/64 "Local Area Connection 2" publish=yes

For this configuration, the router does not advertise itself as a default router. Hosts on the FEC0:0:0:1::/64 and FEC0:0:0:2::/64 subnets automatically configure an appropriate address and add required routes to their route tables, but they do not automatically configure a default route (::/0). A computer running the IPv6 protocol for the Windows Server 2003 family or Windows XP does not advertise itself as a default router unless there is a default route that is configured to be published.

To configure the router to be a default router for hosts on the FEC0:0:0:1::/64 and FEC0:0:0:2::/64 subnets, you must add a default route to the router and publish it. For example, if the subnet of Local Area Connection 3 contains a router with the link-local address of FE80::2AA:FF:FE98:2AB1, the following command adds a default route to the static router and then publishes it:

netsh interface ipv6 add route ::/0 "Local Area Connection 3" nexthop=fe80::2aa:ff:fe98:2ab1 publish=yes

6to4 Router

6to4 is an address assignment and automatic tunneling technology that is used to provide unicast IPv6 connectivity between IPv6 sites and hosts across the IPv4 Internet. For more information about 6to4, see Using IPv6 Today (the July 2001 The Cable Guy article) and RFC 3056.

A computer running Windows XP or a member of the Windows Server 2003 family can be used as a 6to4 router, which is automatically configured when you enable Internet Connection Sharing (ICS) on the interface that is attached to the Internet. However, if you do not want to enable ICS but want the computer to act as a 6to4 router, you must manually configure 6to4 router functionality.

To manually configure a computer running a member of the Windows Server 2003 family or Windows XP as a 6to4 router, you must do the following:

  • Ensure that the 6to4 router computer has a public address assigned to its Internet interface and has not received a Router Advertisement message from either an IPv6 router on an attached subnet or an ISATAP router. If this is the case, the 6to4 component automatically creates an interface named 6to4 Pseudo-Interface, adds a 2002::/16 route to the routing table that uses the 6to4 Pseudo-Interface, and adds a default route that points to a 6to4 relay router on the IPv4 Internet.
  • Enable forwarding and advertising on the interfaces attached to your intranet. You can do this with the following command: netsh interface ipv6 set interface InterfaceNameOrIndex forwarding=enabled advertise=enabled
  • Enable forwarding on the 6to4 Pseudo-Interface. You can do this with the following command: netsh interface ipv6 set interface "6to4 Pseudo-Interface" forwarding=enabled
  • Add routes for 6to4 prefixes to the interfaces attached to your intranet and configure them to be published. You can do this with the following command: netsh interface ipv6 add route 2002:WWXX:YYZZ:SubnetID::/64 InterfaceNameOrIndex publish=yes

WWXX:YYZZ is the colon-hexadecimal notation for w.x.y.z, the public IPv4 address that is assigned to the interface that is attached to the Internet. SubnetID is used to identify an individual subnet within the 6to4 site.

For example, a computer has three LAN interfaces with the following configuration:

  • Local Area Connection is attached to the Internet and is assigned the public IPv4 address 131.107.0.1.
  • Local Area Connection 2 is an intranet interface that is using interface index 5.
  • Local Area Connection 3 is an intranet interface that is using interface index 6.

To configure this computer as a 6to4 router (assuming that it has not received a router advertisement), run the following commands:

netsh interface ipv6 set interface "Local Area Connection 2" forwarding=enabled advertise=enabled netsh interface ipv6 set interface "Local Area Connection 3" forwarding=enabled netsh interface ipv6 set interface "6to4 Pseudo-Interface" forwarding=enabled netsh interface ipv6 add route 2002:836b:1:5::/64 "Local Area Connection 2" publish=yes netsh interface ipv6 add route 2002:836b:1:6::/64 "Local Area Connection 3" publish=yes

For this example, the prefix 2002:836B:1:5::/64 is advertised over Local Area Connection 2 and the prefix 2002:836B:1:6::/64 is advertised over Local Area Connection 3 (836B:1 is the hexadecimal colon notation for the public IPv4 address 131.107.0.1). By convention, the subnet ID is set to the interface index of the interface over which the prefix is advertised. You can specify any subnet ID you want (from 0 to 0xFFFF).

ISATAP Router

ISATAP is an address assignment and automatic tunneling technology that is used to provide unicast IPv6 connectivity between IPv6 hosts on an IPv4 intranet. ISATAP is described in the Internet draft titled "Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)" (draft-ietf-ngtrans-isatap-0x.txt). By default, the IPv6 protocol for Windows XP and the Windows Server 2003 family configures link-local ISATAP addresses on the Automatic Tunneling Pseudo-Interface for every IPv4 address assigned to the computer.

To configure site-local or global ISATAP addresses or to communicate beyond the logical subnet defined by the IPv4 intranet, you need an ISATAP router. An ISATAP router performs the following functions:

  • Forwards IPv6 packets between ISATAP hosts on the IPv4 intranet and IPv6 hosts beyond it.
  • Advertises its presence and address prefixes to configure site-local or global ISATAP addresses.

An ISATAP router can perform either function, but typically is configured to perform both. Most often, an ISATAP router acts as the forwarder between ISATAP hosts on an IPv4 intranet and IPv6 hosts on an IPv6-enabled portion of an intranet.

For example, an ISATAP router could be connected to two physically separate networks; an IPv4 intranet and an IPv6 intranet. For this case, the ISATAP router has at least two LAN interfaces'at least one is attached to the IPv4 intranet and as least one is attached to the IPv6-enabled intranet. To enable this computer as an ISATAP router, you must do the following:

  • Enable forwarding on the LAN interfaces attached to the IPv6-enabled intranet. You can do this with the following command: netsh interface ipv6 set interface InterfaceNameOrIndex forwarding=enabled
  • Enable forwarding and advertising on the Automatic Tunneling Pseudo-Interface. You can do this with the following command: netsh interface ipv6 set interface "Automatic Tunneling Pseudo- Interface" forwarding=enabled advertise=enabled
  • Add routes for the subnet IDs of the logical subnet of the IPv4 intranet to the Automatic Tunneling Pseudo-Interface and configure them to be published. You can do this with the following command: netsh interface ipv6 add route IPv6Address/PrefixLength "Automatic Tunneling Pseudo-Interface" publish=yes
  • Add a default route using a LAN interface attached to the IPv6 intranet and configure it to be published. You can do this with the following command: netsh interface ipv6 add route ::/0 InterfaceNameOrIndex nexthop=IPv6Address publish=yes

For example, a computer has a LAN interface attached to an IPv4 intranet named Local Area Connection and a LAN interface attached to an IPv6-enabled intranet named Local Area Connection 2. The subnet IDs assigned to the logical subnet of the IPv4 intranet are 3FFE:FFFF:0:10::/64 and FEC0:0:0:10::/64. The computer uses a default router on the IPv6 subnet to which the interface named Local Area Connection 2 is attached with the next hop address of FE80::2AA:FF:FE98:2AB1. To configure this computer as an ISATAP router, run the following commands:

netsh interface ipv6 set interface "Local Area Connection 2" forwarding=enabled netsh interface ipv6 set interface "Automatic Tunneling Pseudo-Interface" forwarding=enabled advertise=enabled netsh interface ipv6 add route 3ffe:ffff:0:10::/64 "Automatic Tunneling Pseudo-Interface" publish=yes netsh interface ipv6 add route fec0:0:0:10::/64 "Automatic Tunneling Pseudo-Interface" publish=yes netsh interface ipv6 add route ::/0 "Local Area Connection 2" nexthop=fe80::2aa:ff:fe98:2ab1 publish=yes

ISATAP hosts running Windows XP with Service Pack 1 or a member of the Windows Server 2003 family on the IPv4 intranet discover the ISATAP router by attempting to resolve the name "ISATAP". To ensure the successful resolution of this name, you can either name the router computer "ISATAP" or add the appropriate host address (A) or canonical name (CNAME) records to your DNS infrastructure. The resource records used must resolve the name "ISATAP" to the IPv4 address of the ISATAP router's intranet interface.

If the ISATAP router is not named "ISATAP" or the name "ISATAP" is not resolved to the IPv4 address of the router's IPv4 intranet interface, you need to run the following command on the ISATAP router and all of the ISATAP hosts:

netsh interface ipv6 isatap set state router=AddressOrName

AddressOrName is either the IPv4 address of the router's intranet interface or the name of the router that resolves to it.

Note ISATAP hosts running Windows XP on the IPv4 intranet discover the ISATAP router by attempting to resolve the name "_ISATAP", rather than "ISATAP".

6over4 Router

6over4, also known as IPv4 multicast tunneling, is an automatic tunneling technology that is used to provide unicast and multicast IPv6 connectivity between IPv6 nodes across a multicast-enabled IPv4 intranet within a site. 6over4 is described in RFC 2529. By default, 6over4 for the IPv6 protocol available in Windows XP and the Windows Server 2003 family is disabled. To enable 6over4 and create a 6over4 interface, you can run the following command:

netsh interface ipv6 add 6over4tunnel 6over4InterfaceName IPv4Address [[store=]active|persistent]

6over4InterfaceName is the name of the 6over4 interface and IPv4Address is the IPv4 public or private address that is used for the 6over4-based interface ID. By default, the 6over4 interface is persistent.

For example, to create a 6over4 interface named 6over4 Tunnel Interface that uses an interface ID based on the assigned IPv4 address 10.60.90.21, you can run the following command:

netsh interface ipv6 add 6over4tunnel "6over4 Tunnel Interface" 10.60.90.21

After it is enabled, 6over4 is similar to ISATAP, except that it also supports multicast IPv6 traffic. However, 6over4 requires a multicast-enabled IPv4 intranet.

To configure site-local or global 6over4 addresses or to communicate beyond the logical subnet defined by the IPv4 intranet, a 6over4 router is required. A 6over4 router performs the following functions:

  • Forwards IPv6 packets between 6over4 hosts on the IPv4 intranet and IPv6 hosts beyond it.
  • Advertises its presence and address prefixes to configure site-local or global 6over4 addresses.

Most often, a 6over4 router acts as the forwarder between 6over4 hosts on an IPv4 intranet and IPv6 hosts on an IPv6-enabled portion of an intranet.

For example, a 6over4 router could be connected to two physically separate networks: a multicast-enabled IPv4 intranet and an IPv6 intranet. For this case, the 6over4 router has at least two LAN interfaces'at least one is attached to the IPv4 intranet and at least one is attached to the IPv6-enabled intranet. To enable this computer as a 6over4 router, you must do the following:

  • Enable forwarding on the LAN interfaces attached to the IPv6-enabled intranet. You can do this with the following command: netsh interface ipv6 set interface InterfaceNameOrIndex forwarding=enabled
  • Enable forwarding and advertising on the 6over4 interface. You can do this with the following command: netsh interface ipv6 set interface 6over4InterfaceName forwarding=enabled advertise=enabled
  • Add routes for the subnet IDs of the logical subnet of the IPv4 intranet to the 6over4 interface and configure them to be published. You can do this with the following command: netsh interface ipv6 add route IPv6Address/PrefixLength 6over4InterfaceName publish=yes
  • Add a default route using a LAN interface attached to the IPv6 intranet and configure it to be published. You can do this with the following command: netsh interface ipv6 add route ::/0 InterfaceNameOrIndex nexthop=IPv6Address publish=yes

For example, a computer has a LAN interface attached to an IPv4 intranet named Local Area Connection and a LAN interface attached to an IPv6-enabled intranet named Local Area Connection 2. A 6over4 interface named 6over4 Tunnel Interface is created. The subnet IDs assigned to the logical subnet of the IPv4 intranet are 3FFE:FFFF:0:2A1C::/64 and FEC0:0:0:2A1C::/64. The computer uses a default router on the IPv6 subnet to which Local Area Connection 2 is attached with the next hop address of FE80::2AA:FF:FEA7:412E. To configure this computer as a 6over4 router, run the following netsh commands:

netsh interface ipv6 set interface "Local Area Connection 2" forwarding=enabled netsh interface ipv6 set interface "6over4 Tunnel Interface" forwarding=enabled advertise=enabled netsh interface ipv6 add route 3ffe:ffff:0:2a1c::/64 "6over4 Tunnel Interface" publish=yes netsh interface ipv6 add route fec0:0:0:2a1c::/64 "6over4 Tunnel Interface" publish=yes netsh interface ipv6 add route ::/0 "Local Area Connection 2" nexthop=fe80::2aa:ff:fea7:412e publish=yes

For More Information

For more information about IPv6, 6to4, ISATAP, 6over4, and Netsh, consult the following resources:

For a list of all The Cable Guy articles, click here.