[SOLVED] Mass LAN / VLAN update.



  • Hi,

    Is it possible to do a mass update of static addresses from a LAN to a VLAN to save re-keying all of the data?
    Also the Aliases etc?

    I assume I can do an export change the data and read it in again?

    Any advice gratefully received, thanks.



  • If you are happy editing XML manually and keeping all the start/end tags correct etc., then you can always

    1. backup your config
    2. keep the original so you can revert back if (when?) you stuff it up
    3. edit a copy, find the relevant entries and modify the data or move the entries… as needed
    4. restore the edited config
    5. let it reboot and test

    There is no official "pfSense config XML" spec or parser/checker other than what happens at boot. But the format of the XML data hierarchy is pretty obvious, specially if you do a few example changes on the webGUI then backup the config and have a look in it.



  • Thanks for the reply, this was the route I was looking at, but I had to ask in anyone had any other methods up their sleeves.
    Regards,  8)



  • Mass LAN 8) 8) 8)



  • @kenspo:

    Mass LAN 8) 8) 8)

    I think, (dangerous) that what I meant was that I have a lot of devices on a straightforward LAN interface that I would like to move to a VLAN, not that I had masses of LANS…



  • @phil.davis:

    If you are happy editing XML manually and keeping all the start/end tags correct etc., then you can always

    1. backup your config
    2. keep the original so you can revert back if (when?) you stuff it up
    3. edit a copy, find the relevant entries and modify the data or move the entries… as needed
    4. restore the edited config
    5. let it reboot and test

    There is no official "pfSense config XML" spec or parser/checker other than what happens at boot. But the format of the XML data hierarchy is pretty obvious, specially if you do a few example changes on the webGUI then backup the config and have a look in it.

    I did, done it and it worked.
    Must admit I held my breath, used Ultraedit to export the <staticmap>s that I wanted, then saved it as a new .xml file so I could use the colourization for xml, used find & replace, then inserted the file back into the predefined opt I had already setup.

    Very pleased with the result. So thanks phil.davis for the confirmation.</staticmap>


Log in to reply