3.25.3 IP Subnet based VLAN Membership Configuration

Use this command to add, update, and delete IP subnet to VLAN ID mapping entries and assign them to different ports.

Command Syntax:

switchport vlan ip-subnet <ipv4> vlan <vid>
Table 3-105. Command Description

Argument

Description

Parameter

<ipv4>

Source IP address and mask (Format: xx.xx.xx.xx/mm.mm.mm.mm).

<vid>

VLAN ID required for the group to VLAN mapping. The range is from 1–4095.

Default

N.A

Mode

Port List Interface mode

Usage

Configure IP subnet to VLAN ID association. To remove the IP subnet to VLAN ID association, use the ‘no’ version of the command.

Example

Example:

(config)# interface GigabitEthernet1/4
(config-if)# switchport vlan ip-subnet 192.168.0.40/255.255.255.0 vlan 3