共用方式為


Netsh Routing IPv6 Relayv6 Context Commands

Applies To: Windows Server 2008, Windows Server 2008 R2

The following commands are specific to the routing IPv6 relayv6 context within the Netsh environment.

To view the command syntax, click a command:

  • dump

  • install

  • uninstall

Add commands

  • add dhcpserver

  • add interface

Delete commands

  • delete dhcpserver

  • delete interface

Set commands

  • set global

  • set interface

Show commands

  • show global

  • show interface

Netsh commands for routing IPv6 relayv6

  • The following entries provide details for each command.

dump

Displays the Dynamic Host Configuration Protocol (DHCP) Relay Agent configuration of a remote access server in script form.

Syntax

dump

Remarks

  • You can dump the contents of the current configuration to a file that can be used to restore altered configuration settings.

Example

The following commands save the current configuration as a script in the c:\test\ipv6relaycfg.dmp file.

  • From the command prompt:

    netsh routing ipv6 relayv6 dump > c:\test\ipv6relaycfg.dmp

  • From the netsh routing ipv6 relayv6 context prompt:

    set file open c:\test\ipv6relaycfg.dmp

    dump

    set file close

You can use the netsh exec command to run the script created by the netsh dump command.

add dhcpserver

Adds a DHCPv6 server to the list of DHCP servers whose messages will be forwarded by DHCPv6 Relay Agent.

Syntax

add dhcpserver

server = ] IPv6Address

Parameters

  • server = ] IPv6Address
    Required. Specifies the global IPv6 address of a DHCPv6 server to add to the global list.

Example

To add a DHCPv6 server with the IPv6 address of 3000:1234:1234:1234::1 to the global list of DHCPv6 servers, type:

add dhcpserver 3000:1234:1234:1234::1

add interface

Enables the DHCPv6 Relay Agent on the specified interface.

Syntax

add interface

name = ] InterfaceName

Parameters

  • name = ] InterfaceName
    Required. Specifies, by name, the interface on which you want to enable the DHCPv6 Relay Agent. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").

Example

To enable the DHCPv6 Relay Agent on the “Local Area Connection” interface, type:

add interface "Local Area Connection"

delete interface

Disables DHCPv6 Relay Agent on the specified interface.

Syntax

delete interface

name = ] InterfaceName

Parameters

  • name = ] InterfaceName
    Required. Specifies, by name, the interface on which you want to disable the DHCPv6 Relay Agent. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").

Example

To disable the DHCPv6 Relay Agent on the “Local Area Connection” interface, type:

delete interface "Local Area Connection"

delete dhcpserver

Removes a DHCPv6 server from the list of DHCPv6 servers whose messages will be forwarded by DHCPv6 Relay Agent.

Syntax

delete dhcpserver

server = ] IPv6Address

Parameters

  • server = ] IPv6Address
    Required. Specifies, by IPv6 address, the DHCPv6 server to be removed from the global list.

Example

To delete a DHCPv6 server with the IPv6 address of 3000:1234:1234:1234::1 from the global list of DHCPv6 servers, type:

delete dhcpserver 3000:1234:1234:1234::1

set global

Sets global parameters for DHCPv6 Relay Agent configuration.

Syntax

set global

loglevel = ] { none | error | warn | info }

Parameters

  • loglevel = ] { none | error | warn | info }
    Required. Specifies which DHCPv6 Relay Agent events should be logged.

    • none specifies that no events related to DHCPv6 Relay Agent should be logged.

    • error specifies that only errors related to DHCPv6 Relay Agent should be logged.

    • warn specifies that both errors and warnings related to DHCPv6 Relay Agent should be logged.

    • info specifies that all events related to DHCPv6 Relay Agent should be logged.

Example

To configure global parameters for DHCPv6 Relay Agent to not log events, type:

set global loglevel=none

set interface

Modifies the DHCPv6 Relay Agent configuration on an interface.

Syntax

set interface

name = ] InterfaceName

relaymode = ] { enable | disable }

[ [ maxhop = ] Integer ]

[ [ minsecs = ] Integer ]

Parameters

  • name = ] InterfaceName
    Required. Specifies, by name, the interface on which you want to modify the configuration of DHCPv6 Relay Agent. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").
  • relaymode = ] { enable | disable }
    Required. Specifies whether the DHCPv6 Relay Agent is enabled or disabled.
  • maxhop = ] Integer
    Specifies the number of hops a DHCPv6 packet can make before it should be dropped and should no longer be relayed.
  • minsecs = ] Integer
    Specifies the minimum number of seconds from boot time that must appear in a DHCPv6 packet before it should be sent to a DHCPv6 server in the list of servers whose messages will be forwarded by DHCPv6 Relay Agent.

Example

To update the DHCPv6 Relay Agent configuration on the “Local Area Connection” interface with a maximum hop count of 16 and a value of 3200 seconds for the minimum seconds from boot time, type:

set interface name="Local Area Connection" enable 16 3200

show interface

Displays configuration information for the DHCPv6 Relay Agent on the specified interface. Used without parameters, show interface displays DHCPv6 Relay Agent configuration information for all interfaces.

Syntax

show interface

name = ] InterfaceName

Parameters

  • name = ] InterfaceName
    Required. Specifies, by name, the interface for which you want to display information. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").

show global

Displays DHCPv6 Relay Agent global configuration.

Syntax

show global

install

Installs the DHCPv6 Relay Agent under IPv6.

Syntax

install

uninstall

Removes the DHCPv6 Relay Agent component from under IPv6.

Syntax

uninstall