Change OPT order for VLANs
-
As time goes on, I'm adding various VLANs to pfSense. The order that the VLANs display in is ordered by the OPT number (ie, OPT1, OPT2, OPT3). But my VLANs are labelled such that they are no longer alphabetical. That is:
OPT1 = VLAN4
OPT2 = VLAN2
OPT3 = VLAN9How can I make it so:
OPT1 = VLAN2
OPT2 = VLAN4
OPT3 = VLAN9so that they're sorted "nicely" in the GUI? I see that I can change the dropdown in Interfaces > Assignments, but will that move the Firewall rules as well, or are rules tied to the OPT number?
A follow up request could be that I want a pretty flower on the dashboard. But I'll settle for sorting alphabetically for now. :P
-
You don't. You do it right the first time or you move everything to the correct interface manually, like firewall rules.
When you reassign OPT2 to VLAN 4 all of OPT2's rules, etc will now be tagged on VLAN4 instead. Probably not what you want.
Sometime it is beneficial to create a throwaway vlan or two to have an interface to assign and move things to so you don't have to completely rebuild an interface.
You could then just edit every rule and change the interface to the BS interface clearing the rules from, say, OPT1, then move all of OPT2's rules to OPT1, then move all of the BS interfaces rules to OPT1, then switch the VLAN tags. Don't forget your DHCP servers, etc too.
It is probably easier just to let it be.
Then you can spend time looking at the pretty flower on your dashboard instead.
![Screen Shot 2018-02-02 at 7.06.20 PM.png](/public/imported_attachments/1/Screen Shot 2018-02-02 at 7.06.20 PM.png)
![Screen Shot 2018-02-02 at 7.06.20 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2018-02-02 at 7.06.20 PM.png_thumb) -
Always good to get a sense of humour going - thanks Derelict; nice flower ;D
I'm not overly fussed about the misaligned VLAN numbering. I was half-anticipating that you give a solution as you have stated, by juggling the firewall rules after reassigning the OPTs. But no biggie. Perhaps it could be listed as a low-priority UX feature/option to list OPTs by name instead of number on the dashboard/dropdowns/etc.
-
@Derelict said in Change OPT order for VLANs:
You don't. You do it right the first time
Sometimes needs change so the original order is no longer optimal.
I would like to add a new interface mid way up my list of interfaces.
Is the current way of doing that
- Create a new interface at the next highest opt number
- Copy the rules from the interface above
- Delete the rules form the interface moved down
- Repeat steps 2-3 till the blank opt is in the desired location
Or is there a better way of doing this now?
-
@Patch said in Change OPT order for VLANs:
@Derelict said in Change OPT order for VLANs:
You don't. You do it right the first time
Sometimes needs change so the original order is no longer optimal.
I would like to add a new interface mid way up my list of interfaces.
Is the current way of doing that
- Create a new interface at the next highest opt number
- Copy the rules from the interface above
- Delete the rules form the interface moved down
- Repeat steps 2-3 till the blank opt is in the desired location
Or is there a better way of doing this now?
Very simple way, but you have to make sure you get all the instances.
Do a backup, then create a copy of the backup in case you mess up.
Change all the interfaces as you want them in the backup file.
Restore the backup. All interfaces will be the way you want them. -
It's a high risk strategy for something that's really only a cosmetic issue. It doesn't really matter what order the interfaces are in.
Where exactly are you seeing the order displayed that's a problem?
-
@stephenw10 said in Change OPT order for VLANs:
Where exactly are you seeing the order displayed that's a problem
The login landing page shows traffic for all interfaces. Grouping them in a functional rather than historical creation order is useful.
Similarly in the interface pages but not as critical there as those pages are less used.
-
So the traffic graphs widget on the dashboard?
That shows the interfaces in the order they are defined in the config. Those can be reordered, the xml is still logically the same.
Grouping them could be a feature request.
-
@stephenw10 said in Change OPT order for VLANs:
the traffic graphs widget on the dashboard? ... That shows the interfaces in the order they are defined in the config. Those can be reordered, the xml is still logically the same. ... could be a feature request.
Mmm, no thanks.
I group things together which logically belong together to keep the configuration simple & clean to enhance software maintenance. Having grouping different in different parts of the program would be as step backwards imo.I useful feature request imo would be adding interface reordering in a similar manner to rule reordering. Implementing it may involve the code doing more changes but would be more reliable than the user doing the same changes.
@Jarhead said in Change OPT order for VLANs:
Do a backup, then create a copy of the backup in case you mess up.
Change all the interfaces as you want them in the backup file.
Restore the backup. All interfaces will be the way you want them.That's a smart idea, will have to try it next time.
This time round I just did it manually in the GUI. The copy rules feature helped but editing the configuration directly maybe easier again.
-
Most places in the GUI simply display the interfaces in the order they are parsed in the config file. So changing them there would likely change it everywhere that counts.