@@ -42,7 +42,7 @@ interface {{ interface.name }}
4242! OSPF Configuration
4343{% - for ospf_config in ospf_configs %}
4444router ospf {{ ospf_config.process_id }}
45- router-id {{ ospf_config.router_id.split('/')[ 0] }}
45+ router-id {{ ospf_config.router_id | ipaddress_interface(attr='ip') }}
4646 area {{ ospf_config.area }} authentication message-digest
4747 auto-cost reference-bandwidth {{ ospf_config.reference_bandwidth }}
4848 passive-interface default
@@ -57,7 +57,7 @@ router ospf {{ ospf_config.process_id }}
5757! BGP Configuration
5858{% - for bgp_config in bgp_profiles %}
5959router bgp {{ bgp_config.local_as.asn }}
60- router-id {{ bgp_config.router_id.address.split('/')[ 0] }}
60+ router-id {{ bgp_config.router_id.address | ipaddress_interface(attr='ip') }}
6161{% - if bgp_config .graceful_restart %}
6262 graceful-restart
6363{% - endif %}
@@ -70,7 +70,7 @@ router bgp {{ bgp_config.local_as.asn }}
7070{% - endif %}
7171 !
7272 template peer-session {{ bgp_config.profile }}-SESSION
73- update-source {{ bgp_config.local_ip.address.split('/')[ 0] }}
73+ update-source {{ bgp_config.local_ip.address | ipaddress_interface(attr='ip') }}
7474 !
7575 address-family ipv4 unicast
7676{% - if bgp_config .multipath %}
@@ -79,7 +79,7 @@ router bgp {{ bgp_config.local_as.asn }}
7979 !
8080 address-family l2vpn evpn
8181{% - for session in bgp_config .sessions %}
82- neighbor {{ session.remote_ip.address.split('/')[ 0] }}
82+ neighbor {{ session.remote_ip.address | ipaddress_interface(attr='ip') }}
8383 remote-as {{ session.remote_as.asn }}
8484 inherit peer-session {{ bgp_config.profile }}-SESSION
8585 address-family l2vpn evpn
0 commit comments