EDIT: Edited my examples to reflect that I was indeed attempting this with the switch in "configure" mode. Still no joy.

EDIT: I've done some more searching on this issue. I just can't seem to see it clearly in the HP docs, and when I search ServerFault with "hp procurve remove port filter" the only results I see are this question and one other that seems unrelated.

Any Procurve experts out there? :-)

The Hewlett-Packard Procurve CLI isn't necessarily my strong suit, but this seems like it ought to be kind of obvious (and probably is).

I'm using the command line interface on a HP Procurve 2810-48G (J9022A) Gigabit Ethernet switch.

I have a couple of switch ports with named filters applied. I want to reclaim those ports (and get rid of the filters.) I'm trying to remove port from filter (or remove filter from port, as you prefer) using syntax like the following:

SWITCH0(config)# no filter source-port 1

But I get the message Invalid value. and no joy. Let's presume the following configuration:

SWITCH0(config)# sh filter source-port

 Filter Name          | Port List            | Action
 -------------------- + -------------------- + --------------------------
 filter1              | 1                    | drop 3-46,Trk1
 filter2              | 3                    | drop 1-2,5-46,Trk1

The command that I think should disassociate the ports from the filters is giving me grief, and I obviously can't run no filter source-port named-filter filter1 to delete the named-filter itself while it is still applied to the port.


  • Where's the love, folks? No answers at all? One thing I could obviously do would be to edit the filters to just let everything through. But I don't want to do that, I want to get rid of the filters completely, zap 'em, annihilate 'em, totally eliminate them from the switch and from my life forever, etc. Help? – Craig Mar 21 '14 at 23:02
  • No help at all - but h30499.www3.hp.com/t5/ProCurve-ProVision-Based/… shows that you are not quite alone. – guntbert Mar 26 '14 at 19:24
  • @guntbert thanks for the moral support... There aren't exactly a plethora of answers to that question at the hp support site, huh? – Craig Mar 26 '14 at 21:35
  • I suppose another option might be to save the switch configuration to a file, edit the file and remove the filters I don't want, reset the switch to factory defaults, then upload the configuration. That seems a bit twitchy and extreme, though, doesn't it? – Craig Mar 26 '14 at 21:36
  • ...not to mention the fact that this switch is both a switch stack commander, with a bunch of VLAN segmentation (VoIP, guest net, WLAN, etc.) and also has a couple of 2-port aggregate links/trunks/Etherchannels in play; one to another switch and one to a VMware machine. All of that has been working splendidly since I set it up way back when, and I'd rather not poke at it too much (and take most of our network offline temporarily in the process). I really, really want to just quietly drop the filters, without a lot of fanfare, and move on. :-) – Craig Mar 26 '14 at 22:05

Old question, but looks like you never found the answer. I had an old filter config from before I created some trunks. The filter rules contained ports that were now in the trunk groups, and this was causing trouble for the switch.

Switch51(config)# show config

; J9773A Configuration Editor; Created on release #YA.15.12.0007
hostname "Switch51"
trunk 23-24 trk1 lacp
filter source-port "21" drop 1-23
filter source-port "22" drop 1-23
Switch51(config)# no filter source-port 21-22
Invalid value.
Switch51(config)# no trunk 23-24
Switch51(config)# no filter source-port 21-22
  • Thank you for posting this. I'll check this out as soon as I can. I definitely have trunks defined, and they were definitely defined after the filter rules were, as I recall. But the trunks are heavily used (between switches in the stack, between the switches and our VMware server), so this might be a little bit disruptive. I'll probably do it after hours. Wow, sort of an indirect issue, but it makes sense. It's too bad the silly switch can't give a better indication than "Invalid value," though, huh? – Craig Oct 22 '14 at 15:42

I'm an old ASE and haven't done anything Procurve or switch related since nearly 8 years and starting to forget everything, so bear with me if I'm talking nonsense.

That filter list tells me that you should remove the ports from the filters, not the other way.

  • That totally makes sense to me. I just don't know what that syntax would look like? That is actually what I was trying to accomplish--remove the ports from the filters, so that I can then drop the filters altogether. – Craig Apr 2 '14 at 17:11
  • @Craig could you solve your problem? If yes would you share it here for future reference? – Montag451 Apr 16 '14 at 8:49
  • I wish I had, and I will definitely post the solution here if I figure it out. I've been tied up with higher-priority things, but I'll get back to this. Honestly, the best I have at the moment is to export the switch configuration, edit that to just omit the port filters, then reset the switch and upload the "new" configuration to it. But that obviously means taking the network down for some period of time, which is less than ideal. Although I suppose maybe it isn't necessarily worse than doing something like a firmware upgrade? :) – Craig Apr 16 '14 at 18:23

"Invalid value" is one of the less unambiguous errors in HP Procurves. I think I got that when I tried a command that needed config.

According to the code snippets you were issuing those commands in enabled (#) mode.

The documentation I found

HP documentation

shows that they have to be issued in config mode.

ProCurve(config)# no filter source-port 8,12,13

So type config at the # prompt and try again.

  • thanks, but no joy. I actually had been trying this in configure mode. I'll edit the example in my post to reflect that. – Craig Mar 26 '14 at 21:29

So, I finally took a few minutes to edit the switch's configuration file to remove the unwanted filters, then re-upload it to the switch.

  • Installed tftpd on one of the Linux servers (the last machine I had a handy non-critical tftp server running on was decommissioned a while back)

  • Pushed the startup-config from the switch to a "switch0-config" file on the tftp server:

    • copy startup-config tftp 10.x.x.x switch0-config
  • Made a copy (kept a backup) of the config file, opened it in a text editor, then deleted the filters I didn't want to keep.

  • Pulled the edited config file back onto the switch, waited for it to reboot, and voila, the filters are gone.

    • copy tftp startup-config 10.x.x.x switch0-config

A bit of a pain in the neck and of course it took the whole network offline for 30 seconds or so while the switch rebooted. If my edits had produced a broken config file the whole network would have remained offline until I got it fixed, since the switch in question is a stack commander with aggregated links and VLAN trunks to other switches, to a VMware virtual switch, to aggregated ports on the big NAS, and so on.

So of course make a backup copy of your config file before hacking it.

But I checked twice, the config file was good, everything came right back up and I have my switch ports back free and clear.

  • Of course you might be able to use the web interface, too, depending on your network security settings. The more recent updates to Java aren't super happy with self-signed SSL/TLS certificates on the switches. Etc. – Craig Apr 30 '15 at 4:49

sh run

Observe the line in the config that you want to remove

conf t

#(config) undo "the line you want to remove"
#(config) end
# wr mem

You are done!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.