Enabling IP Source Guard for a VLAN
You can enable IP Source Guard (IPSG) on
a switch or a router for a range of ports in a VLAN or on the entire VLAN.
- Enter global configuration mode.
- Configure the port-based VLAN.
- Add ports Ethernet 1/1/5 through 1/1/8 as untagged ports.
- Add ports Ethernet 1/1/23 through Ethernet 1/1/24 as tagged ports.
- Enable IPSG on the tagged ports.
The following example configures IPSG on a VLAN.
device# configure terminal device(config)# vlan 12 device(config-vlan-12)# untagged ethernet 1/1/5 to 1/1/8 device(config-vlan-12)# tagged ethernet 1/1/23 to 1/1/24 device(config-vlan-12)# source-guard enable ethernet 1/1/23 to 1/1/24
The following example configures IPSG on a single port on a VLAN.
device# configure terminal device(config)# vlan 12 device(config-vlan-12)# untagged ethernet 1/1/5 to 1/1/8 device(config-vlan-12)# tagged ethernet 1/1/23 to 1/1/24 device(config-vlan-12)# source-guard enable ethernet 1/1/23
The following example configures IPSG on all ports on a VLAN.
device# configure terminal device(config)# vlan 12 device(config-vlan-12)# untagged ethernet 1/1/5 to 1/1/8 device(config-vlan-12)# tagged ethernet 1/1/23 to 1/1/24 device(config-vlan-12)# source-guard enable