oparser.sh is a bash script made to support the extraction of the L3VPN Overlay configuration from MPLS PE routers
-
the first main assumption is that the input configuration is conform with the 'CISCO Formal' format
-
the second main assumption is that the input configuration is including L3VPN configuration sesctions
-
the script is tested against CISCO-XR v6.2.3 (it should work on newer versions)
-
the Bundle-if format is matched by the following rgx '^Bundle-Ether[0-9]{1,5}.[0-9]{1,5}|^Bundle-Ether[0-9]{1,5}'
-
for what concerning the script input: both PE's configuration file & Bundle-if are mandatory
-
the Script final output is the PE's overlay configuration divided into multiple files:
- ./cfgs/level1_vrf.cf
- ./cfgs/level2_pm.cf
- ./cfgs/level1_if.cf
- ./cfgs/level2_rpl.cf
- ./cfgs/level1_rbgp.cf
- ./cfgs/level1_rstatic.cf
- ./cfgs/level2_hsrp.cf
-
Configuration order (reverse for config removal):
- pm
- rpl
- vrf
- if
- hsrp
- rstatic
- rbgp
- Please, report bugs directly to [email protected]