Configuring static VLAN per-port settings

Syntax:

[no] vlan vid

This command, used with the options listed below, changes the name of an existing static VLAN and the per-port VLAN membership settings.


[NOTE: ]

NOTE: You can use these options from the configuration level by beginning the command with vlanvid, or from the context level of the specific VLAN by just entering the command option.


tagged port-list

Configures the indicated port as Tagged for the specified VLAN. The no version sets the port to either No or (if GVRP is enabled) to Auto.

untagged port-list

Configures the indicated port as Untagged for the specified VLAN. The no version sets the port to either No or (if GVRP is enabled) to Auto.

forbid port-list

Used in port-based VLANs configures port-list as forbidden, to become a member of the specified VLAN, and other actions. Does not operate with option not allowed protocol VLANs. The no version sets the port to either No or (if GVRP is enabled) to Auto.

auto port-list

Available if GVRP is enabled on the switch. Returns the per-port settings for the specified VLAN to Auto operation. Auto is the default per-port setting for a static VLAN if GVRP is running on the switch.

Changing the VLAN name and set ports to tagged

Suppose there is a VLAN named VLAN100 with a VID of 100, and all ports are set to No for this VLAN. To change the VLAN name to Blue_Team and set ports A1 - A5 to Tagged, use the following commands:

HP Switch(config)#: vlan 100 name Blue_Team 
HP Switch(config)#: vlan 100 tagged a1-a5

Moving the context level

To move to the vlan 100 context level and execute the same commands:

HP Switch(config)#: vlan 100 
HP Switch(vlan-100)#: name Blue_Team 
HP Switch(vlan-100)#: tagged a1-a5

Changing tagged ports

To change the tagged ports in the above examples to No (or Auto, if GVRP is enabled), use either of the following commands.

At the global configuration level, use:

HP Switch(config)#: no vlan 100 tagged a1-a5

- or -

At the VLAN 100 context level, use:

HP Switch(vlan-100)#: no tagged a1-a5

[NOTE: ]

NOTE: You cannot use these commands with dynamic VLANs. Attempting to do so results in the message VLAN already exists and no change occurs.


Using IP enable/disable for all VLANs

You can administratively disable the IP address on specified VLANs with static IP addresses without removing the Layer 3 configuration. The switch can be pre-configured as a backup router, then quickly transition from backup to active by re-enabling Layer 3 routing on one or more VLANs. While the switch is in “backup” mode, it will still performing Layer 2 switching.

A MIB object will be toggled to make Layer 3 routing active or inactive on a VLAN.

Interaction with other features

This feature affects management access to the switch as follows:

  • IP—SNMP, Telnet, SSH, HTTP, TFTP, SCP, SFTP

  • Routing—RIP, OSPF, PIM, VRRP

When the disable layer3 command is configured on a VLAN, the behavior is as if no IP address were configured for that VLAN. There is no other change in behavior.

Syntax:

[no] disable layer3 vlan [vid vid range]

In the configuration context, turns off Layer 3 routing for the specified VLAN or VLANs. When executed in vlan context, turns off Layer 3 routing for that VLAN.

The no form turns on Layer 3 routing for the specified VLAN or VLANs.

If QinQ is enabled, svlan can be configured as well.

The show ip command displays disabled in the display column if Layer 3 has been disabled, or if the VLAN has no IP configuration. You can tell which is the case by viewing the remaining columns; if there is no IP configuration, the remaining columns are blank.

Viewing a VLAN disabled for Layer 3

HP Switch(config)#: show ip

 Internet (IP) Service

  IP Routing : Disabled

  Default Gateway : 172.22.16.1
  Default TTL     : 64   
  Arp Age         : 20  
  Domain Suffix   :                               
  DNS server      :                                         

  VLAN                 | IP Config  IP Address      Subnet Mask     Proxy ARP
  -------------------- + ---------- --------------- --------------- ---------
  DEFAULT_VLAN         | DHCP/Bootp 172.22.18.100   255.255.248.0   No No
  VLAN3                | Disabled   172.17.17.17    255.255.255.0   No No
  VLAN6                | Disabled
  VLAN7                | Manual     10.7.7.1        255.255.255.0   No No

For IPv6, the Layer 3 Status field displays the status of Layer 3 on that VLAN.

Viewing IPv6 Layer 3 status for a VLAN

HP Switch(config)#: show ipv6

 Internet (IPv6) Service

  IPv6 Routing    : Disabled
  Default Gateway :
  ND DAD          : Enabled
  DAD Attempts    : 3

  Vlan Name       : DEFAULT_VLAN
  IPv6 Status     : Disabled
  Layer 3 Status  : Enabled

  Vlan Name       : layer3_off_vlan
  IPv6 Status     : Disabled
  Layer 3 Status  : Disabled

  Address    |                                             Address
  Origin     | IPv6 Address/Prefix Length                  Status
---------- + ------------------------------------------- -----------
  manual     | abcd::1234/32                               tentative
  autoconfig | fe80::218:71ff:febd:ee00/64                 tentative

Interactions with DHCP

Disabling Layer 3 functionality and DHCP are mutually exclusive, with DHCP taking precedence over disable layer3 on a VLAN. The following interactions occur:

  • If the disable layer3 command is executed when DHCP is already configured, no disabling of the VLAN occurs. This error message displays: Layer 3 cannot be disabled on a VLAN that has DHCP enabled.

  • From the CLI: If disable layer3 is configured already, and an attempt is made to configure DHCP, DHCP takes precedence and will be set. The warning message displays: Layer 3 has also been enabled on this VLAN since it is required for DHCP.

  • From the CLI: When disabling a range of VLAN IDs, this warning message displays: Layer 3 will not be disabled for any LANs that have DHCP enabled.

  • From SNMP: If the disable layer3 command is executed when DHCP is already configured, no disabling of the VLAN occurs. An INCONSISTENT_VALUE error is returned.

  • From SNMP: If disable layer3 is configured already, and an attempt is made to configure DHCP, DHCP takes precedence and will be set.