Header Only - DO NOT REMOVE - Extreme Networks

DHCP Snooping auto configuration


Hi Experts,

I have a quick question about DHCP Snooping.
When I move a port from a VLAN to another, I need to change the dhcp snooping configuration too.

Is there a way to automate this action???

Thansk for your help,

4 replies

Userlevel 4
Does this refer to when you manually move a port from one VLAN to another, or is there some automated process involved (e.g. policy, or 802.1x)?

If the former, then you should be able to write an .xsf file to automate the process. It would not necessarily be very elaborate. Please confirm and I could write an example for you.
Thanks for your answer, yes it's when I move a port manually from one VLAN to another.
It would be great to have an example of .xsf, thank you!
Userlevel 4
# usage load/run script vpdhcps {target_vlan_name} {port_number}
#
# This script assumes 15.7.2.9 or higher EXOS version
#
# This strips off all VLANs currently on the port given in arguments
# and then assigns that port to the target VLAN untagged and enables
# DHCP-snooping on that VLAN and port.
#
set var v $(CLI.ARGV1)
set var p $(CLI.ARGV2)
disable clip
set var cli.out 0
show vlan port $p
set var s $TCL(split ${cli.out} "\n")
set var i $TCL(lsearch $s *\/Total*)
if ($i > -1) then
set var i ($i + 2)
set var e $TCL(lsearch $s *Flags\ \:*)
set var e ($e - 1)
while ($i < $e) do
set var l $TCL(lindex $s $i)
set var ov $TCL(lindex $l 0)
config vlan $ov delete port $p
set var i ($i + 1)
endwhile
endif
config vlan $v add port $p
enable ip-security dhcp-snooping vlan $v port $p violation-action none
enable clip
Thank you for you answer and sorry for the delay I didn't see your answer.
I will test this script.

Have a good day.

Reply