Configuring VLAN ID for iSCSI using the CLI

You can use the command-line interface (CLI) to configure a virtual local area network (VLAN) ID for a node port IP address in multiple ways.

Remember:

If cfgportip is used to modify the IP address that is associated with a specific Ethernet port without specifying a new VLAN ID, the new (modified) IP address inherits the existing VLAN ID setting of the earlier IP address (IPv4 or IPv6).

  1. To configure a VLAN ID along with a port IPv4 address to a specified Ethernet port, use the -vlan parameter in the cfgportip command, as in the following command-line interface (CLI) command:
    cfgportip -node node_name | node_id -ip ipv4addr
    -gw ipv4gw -mask subnet_mask -vlan vlan_idport_id

    Where node_name | node_id specifies the name or ID of the node that is being configured, ipv4addr is the IPv4 address for the Ethernet port, ipv4gw is the IPv4 gateway IP address, subnet_mask is the IPv4 subnet mask, and port_id specifies the Ethernet port ID. The -vlan parameter sets the virtual local area network (VLAN) ID to the value specified by vlan_id variable. It can be a number 0 - 4095. To view this configuration, use the lsportip command.

  2. To configure a VLAN ID along with a port IPv6 address, enter the following command:
    cfgportip -node node_name | node_id -ip_6 ipv6addr
    -gw_6 ipv6gw -prefix_6 prefix -vlan_6 vlan_id |-novaln_6 port_id

    Where node_name | node_id specifies the name or ID of the node that is being configured, ipv6addr is the IPv6 address for the Ethernet port, ipv6gw is the IPv6 gateway IP address, subnet_mask is the IPv6 subnet mask, and port_id specifies the Ethernet port ID. The -vlan_6 parameter sets the VLAN ID to the value specified by vlan_id. To view this configuration, use the lsportip command.

  3. To configure a VLAN ID for an already configured port with an IPv4 address, or to change the VLAN ID to a new value, enter the following command:
    cfgportip -node node_name | node_id -vlan vlan_id port_id

    Where node_name | node_id specifies the name or ID of the node on which these changes are being made, port_id specifies the already configured Ethernet port ID. The -vlan parameter sets or changes the VLAN ID for an IPv4 address on the port.

  4. To configure a VLAN ID for an already configured port with an IPv6 address, enter the following command:
    cfgportip -node node_name | node_id -vlan_6 vlan_id port_id

    Where node_name | node_id specifies the name or ID of the node on which these changes are being made, port_id specifies the already configured Ethernet port ID. The -vlan_6 parameter sets or changes the VLAN ID for an IPv6 address on the port.

  5. To configure a VLAN ID for a failover port with an IPv4 address, enter the following command:
    cfgportip -node node_name | node_id -ip ipv4addr
    -gw ipv4gw -mask subnet_mask -failover -vlan vlan_id | -novlanport_id

    When the -vlan parameter is included with the -failover parameter, the -vlan parameter is associated with the IPv4 address of the partner node. If the node that is specified is the only online node in the I/O group, the IP address and VLAN ID are configured and presented by this node. When another node in the I/O group comes online, the failover IP address and VLAN ID are presented by that node.

  6. To configure a VLAN ID for a failover port with an IPv6 address, enter the following command:
    cfgportip -node node_name | node_id -ip_6 ipv6addr
    -gw_6 ipv6gw -prefix_6 prefix -failover -vlan_6 vlan_id | -novlan_6port_id

    When the -vlan parameter is included with the -failover parameter, the -vlan parameter is associated with the IPv6 address of the partner node. If the node that is specified is the only online node in the I/O group, the IP address and VLAN ID are configured and presented by this node. When another node in the I/O group comes online, the failover IP address and VLAN ID are presented by that node.

  7. To remove only the VLAN ID on a configured port of an existing IPv4 address, enter the following command:
    cfgportip -node node_name | node_id -novlan  port_id

    Where node_name | node_id specifies the name or ID of the node on which these changes are made and port_id specifies the Ethernet port ID on which this change is made.

    The -novlan parameter disables VLAN tagging for an IPv4 address for an Ethernet port, which means the VLAN tag is not associated with that port.

  8. To remove only the VLAN ID on a configured port of an existing IPv6 address, enter the following command:
    cfgportip -node node_name | node_id -novlan_6 port_id

    Where node_name | node_id specifies the name or ID of the node on which these changes are made and port_id specifies the Ethernet port ID on which this change is made.

    The -novlan_6 parameter disables VLAN tagging for an IPv6 address for an Ethernet port, which means the VLAN tag is not associated with that port.

    Note: No two parameters (-vlan-vlan_6-novlan, or -novlan_6) can be used together.
  9. To remove the VLAN ID and the IPv4 address from a node Ethernet port, enter the following command:
    rmportip -node node_name | node_idport_id

    Where node_name | node_id specifies the name or ID of the node with the Ethernet port that the IP address is being removed from and port_id specifies the Ethernet port ID.

  10. To remove the VLAN ID and the IPv6 address from a node Ethernet port, enter the following command:
    rmportip -ip_6 -node node_name | node_idport_id

    Where node_name | node_id specifies the name or ID of the node with the Ethernet port that the IP address is being removed from and port_id specifies the Ethernet port ID.