srvctl modify network

Modifies the subnet, network type, or IP address type for a network.

Note:

This command is only available with Oracle Clusterware.

Syntax and Parameters

Use the srvctl modify network command with one of the following syntax models:

srvctl modify network [-netnum network_number] [-subnet subnet/netmask
     [/if1[|if2|...]]] [-nettype network_type | -iptype {ipv4 | ipv6 | both]}
     [-pingtarget "ping_target_list"] [-verbose]

Table A-85 srvctl modify network Parameters

Parameter Description
-netnum network_number

Specify a network number. The default is 1.

-subnet subnet/netmask
[/if1[|if2|...]]

Specifies a subnet number for the public network. The netmask and interfaces specified, if any, change those of the network you are modifying. If you specify an IPv6 subnet, then enter a prefix length, such as 64, in place of netmask. If you do not specify any interface names, then the VIPs use any interface on the given subnet.

If you are changing the network type using the -nettype parameter, then you must specify either an existing IPv4 or IPv6 network using the -subnet parameter. Additionally, the subnet and netmask you specify in the -subnet parameter do not change those of the network you are modifying.

-nettype network_type

Specify the network type: static, dhcp, autoconfig, or mixed.

-iptype ip_type

The type of IP address: ipv4, ipv6, or both.

-pingtarget "ping_target_list"

Specify a comma-delimited list of IP addresses or host names to ping.

-verbose

Verbose output.

Usage Notes

  • On Linux and UNIX systems, you must be logged in as root and on Windows, you must be logged in as a user with Administrator privileges to run this command.

  • You can modify the IP address type for a network from IPv4 to IPv6, or from IPv6 to IPv4.

  • If you specify static for the network type, then you must provide the virtual IP address using the srvctl add vip command.

  • If you specify dhcp for the network type, then the VIP agent obtains the IP address from a DHCP server.

  • If you specify autoconfig for the network type, then the VIP agent generates a stateless IPv6 address for the network. You can only use this parameter for IPv6 networks. If the subnet/netmask specification is not for an IPv6 address, then SRVCTL returns an error.

  • If you change a network from static to mixed, then you must first configure GNS, so that the dynamic addresses obtained can have names registered for them.

  • If you specify mixed for the network type, then the VIP resource uses both a static IP address and an IP address obtained dynamically, either DHCP or autoconfig.

  • If you specify mixed_autoconfig for the network type, then the VIP resource retains the static IP configuration and either obtains an IP address from a DHCP server for an IPv4 network specification or generates a stateless auto-configured IP address for an IPv6 network specification.

Examples

The following example changes the subnet number, netmask, and interface list:

# srvctl modify network -subnet 192.168.2.0/255.255.255.0/eth0

The following example changes the second network to DHCP:

# srvctl modify network -netnum 2 -nettype dhcp

The following example adds an IPv6 subnet and netmask to the default network:

# srvctl modify network -subnet 2606:b400:400:18c0::/64

The following example removes the IPv4 configuration from a network:

# srvctl modify network -iptype ipv6