- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
09-20-2016 12:14 PM
Hello
I need to modify my config. Now its looks like:
I need to "move" ethernet 1/4.111 as a subinterface ethernet1/7, and all polices and other related objects.
SO I opened in editpad lite my config and I try to move part od config related to this subinterface:
</entry>
<entry name="ethernet1/4.111">
<ipv6>
<neighbor-discovery>
<router-advertisement>
<enable>no</enable>
</router-advertisement>
</neighbor-discovery>
</ipv6>
<tag>111</tag>
<ip>
<entry name="DMZ_1"/>
</ip>
<interface-management-profile>Ping_only</interface-management-profile>
</entry>
but when I try to load config I get error config malformed
How I should do this job? Is it possible to do with xml editor only?
Regards
Slawek
09-20-2016 12:22 PM
Most XML editors will make very slight changes to the formatting that they may or may not actually show inline with the document. I'm not sure why you would try and do this large of a change directly from XML to be honest with you. There will also be much more than just that thread to edit, as when you remove the subinterface from the interface configuration any reference to that interface would also need to be altered to reflect the new sub-interface before it ever accepted the configuration; and again you would need to make sure the formating is just right otherwise it will reject the file.
In this situation I would just do it through the GUI instead of taking so much time to edit the XML config directly.
1) Create the sub interface
2) Change the policies away from the exsisting sub-interface and move them to the new one. Attempt to delete the sub-interface and verify the config, it should list anything that hasn't been altered to reflect the new interface before it allows you to actually commit the changes.
09-22-2016 03:09 AM
There are two methods you can use for this type of operation, load partial from an xml file with the necessary settings and using command set format to add/remove the device settings.
I've only used load partial with configs in Panorama but I assume this is possible with the device direct as well. This method assumes you have an existing valid xml format and you suck those existing subinterface into the new interface hierarchy. So you don't have to manually write the xml us import the existing xml into the right spot.
The other option is to get the related sections of the config in the set format from the cli. These then are much easier to edit than the xml file to change values. Which you then run on the CLI to change or delete the required settings.
set cli config-output-format set
then simply show the right sections of the config or just dump the whole config down in set format as a reference
09-22-2016 12:52 PM
Hi Pulukas
Thx for Your tips - I will try it soon
Deleting interfaces and creating again isnt an option - there is a lot of setting related on them (dhcp, polices etc).
Regards
Slawek
09-29-2016 06:01 AM
Hi Steve
I thought that is a simpler ...
Could I ask You for one thing.
How to change subinterface from interface X to subintreface at Y - could You give some command example ?
With regards
Slawek
10-01-2016 11:41 AM
For example: The current configuration pulled from the showing in set format might have these commands for this sub interface:
set network interface ethernet ethernet1/4 layer3 units ethernet1/4.2 ipv6 neighbor-discovery router-advertisement enable no
set network interface ethernet ethernet1/4 layer3 units ethernet1/4.2 ip 10.2.0.1
set network interface ethernet ethernet1/4 layer3 units ethernet1/4.2 tag 10
Convert to delete commands (some adjustements needed for leaf objects removed at the end of the command:
delete network interface ethernet ethernet1/4 layer3 units ethernet1/4.2 ipv6 neighbor-discovery
delete network interface ethernet ethernet1/4 layer3 units ethernet1/4.2 ip 10.2.0.1
delete network interface ethernet ethernet1/4 layer3 units ethernet1/4.2 tag
remove from import interfaces:
delete import network interface ethernet1/4.2
Convert to interface 1/3:
set network interface ethernet ethernet1/3 layer3 units ethernet1/3.2 ipv6 neighbor-discovery router-advertisement enable no
set network interface ethernet ethernet1/3 layer3 units ethernet1/3.2 ip 10.2.0.1
set network interface ethernet ethernet1/3 layer3 units ethernet1/3.2 tag 10
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!