Anyway to export simple que's to an address list?

Anyone out there know of a way to export a group of simple ques to an address list? I have an old shaper with a bunch of simple ques running on that I am getting ready to retire and move to PCQ on another RB.

The current shaper has individual simple ques setup for each customer based off of IP address and package speeds. I have about 5 different packages and what I would like to do is be able to create address lists for each individual package. So for example I have 25 simple ques for package 1 and 50 for package 2.

I know this sounds confusing but does anyone know of anyway to do this?

Chadd

Sure, that’s pretty simple. Details, however, depend on what your simple queues actually look like. Any chance of posting an edited export (“/queue simple export”) that shows just 2 user entries for each package?

Here are a two different ones, I changed the name and target address but other than that this is what they look like


2 name=“customer 1” target-addresses=99.99.99.3/32
dst-address=0.0.0.0/0 interface=all parent=Top direction=both
priority=8 queue=default/default limit-at=0/0 max-limit=256000/256000
burst-limit=768000/1500000 burst-threshold=256000/256000
burst-time=15s/15s total-queue=default

3 name=“customer 2” target-addresses=99.99.99.2/32 dst-address=0.0.0.0/>
interface=all parent=Top direction=both priority=8
queue=default/default limit-at=0/0 max-limit=512000/512000
burst-limit=1500000/1500000 burst-threshold=512000/512000
burst-time=15s/15s total-queue=default

Thanks,
Chadd

I assume the distinguishing feature is the rate limit.

/queue simple {
:foreach ITEM in=[find] do={
  :local IP [get $ITEM target-address];
  :local name [get $ITEM name];
  :local limit [get $ITEM max-limit];
  /ip firewall adress-list add list="$limit" address="$IP" comment="$name";
}
}

That will create one address list per rate limit, named after the rate limit. Each one will contain all the target addresses of queues that had that max-limit, with a comment taken from the queue’s name.

Written free form and untested but it should work. You could also make another variable per iteration that is a word based on an if block that checks the max-limit and uses that word as the name of the address list but I figured I’d keep it simple for starters.

Fewi,

Thanks for the help.