Skip to content

Commit 6d1530f

Browse files
[docker-fpm-quagga]: Enable sending ipv6 prefixes over ipv4 BGPMON session. (#3828)
* Enable ipv6 prefixes over ipv4 BGPMON session * Fix testcases * Update bgpd_quagga.conf
1 parent ddba4fe commit 6d1530f

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

dockers/docker-fpm-quagga/bgpd.conf.j2

+13-10
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ route-map FROM_BGP_SPEAKER_V4 permit 10
2424
route-map TO_BGP_SPEAKER_V4 deny 10
2525
!
2626
{% if BGP_MONITORS is defined and BGP_MONITORS|length > 0 %}
27-
route-map FROM_BGPMON_V4 deny 10
27+
route-map FROM_BGPMON deny 10
2828
!
29-
route-map TO_BGPMON_V4 permit 10
29+
route-map TO_BGPMON permit 10
3030
!
3131
{% endif %}
3232
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
@@ -102,22 +102,25 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
102102
{% endblock bgp_peers_with_range %}
103103
{% block bgp_monitors %}
104104
{% if BGP_MONITORS is defined and BGP_MONITORS|length > 0 %}
105-
neighbor BGPMON_V4 peer-group
106-
neighbor BGPMON_V4 activate
105+
neighbor BGPMON peer-group
106+
neighbor BGPMON activate
107107
{% for (name, prefix) in LOOPBACK_INTERFACE %}
108108
{% if prefix | ipv4 and name == 'Loopback0' %}
109-
neighbor BGPMON_V4 update-source {{ prefix | ip }}
109+
neighbor BGPMON update-source {{ prefix | ip }}
110110
{% endif %}
111111
{% endfor %}
112-
neighbor BGPMON_V4 route-map FROM_BGPMON_V4 in
113-
neighbor BGPMON_V4 route-map TO_BGPMON_V4 out
114-
neighbor BGPMON_V4 send-community
115-
neighbor BGPMON_V4 maximum-prefix 1
112+
neighbor BGPMON route-map FROM_BGPMON in
113+
neighbor BGPMON route-map TO_BGPMON out
114+
neighbor BGPMON send-community
115+
neighbor BGPMON maximum-prefix 1
116116
{% for neighbor_addr, bgp_session in BGP_MONITORS.items() %}
117117
neighbor {{ neighbor_addr }} remote-as {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
118-
neighbor {{ neighbor_addr }} peer-group BGPMON_V4
118+
neighbor {{ neighbor_addr }} peer-group BGPMON
119119
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }}
120120
neighbor {{ neighbor_addr }} activate
121+
address-family ipv6
122+
neighbor {{ neighbor_addr }} activate
123+
exit-address-family
121124
{% endfor %}
122125
{% endif %}
123126
{% endblock bgp_monitors %}

src/sonic-config-engine/tests/sample_output/bgpd_quagga.conf

+13-10
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ route-map FROM_BGP_SPEAKER_V4 permit 10
1616
!
1717
route-map TO_BGP_SPEAKER_V4 deny 10
1818
!
19-
route-map FROM_BGPMON_V4 deny 10
19+
route-map FROM_BGPMON deny 10
2020
!
21-
route-map TO_BGPMON_V4 permit 10
21+
route-map TO_BGPMON permit 10
2222
!
2323
router bgp 65100
2424
bgp log-neighbor-changes
@@ -32,17 +32,20 @@ router bgp 65100
3232
network fc00:1::32/64
3333
exit-address-family
3434
network 192.168.0.1/27
35-
neighbor BGPMON_V4 peer-group
36-
neighbor BGPMON_V4 activate
37-
neighbor BGPMON_V4 update-source 10.1.0.32
38-
neighbor BGPMON_V4 route-map FROM_BGPMON_V4 in
39-
neighbor BGPMON_V4 route-map TO_BGPMON_V4 out
40-
neighbor BGPMON_V4 send-community
41-
neighbor BGPMON_V4 maximum-prefix 1
35+
neighbor BGPMON peer-group
36+
neighbor BGPMON activate
37+
neighbor BGPMON update-source 10.1.0.32
38+
neighbor BGPMON route-map FROM_BGPMON in
39+
neighbor BGPMON route-map TO_BGPMON out
40+
neighbor BGPMON send-community
41+
neighbor BGPMON maximum-prefix 1
4242
neighbor 10.20.30.40 remote-as 65100
43-
neighbor 10.20.30.40 peer-group BGPMON_V4
43+
neighbor 10.20.30.40 peer-group BGPMON
4444
neighbor 10.20.30.40 description BGPMonitor
4545
neighbor 10.20.30.40 activate
46+
address-family ipv6
47+
neighbor 10.20.30.40 activate
48+
exit-address-family
4649
!
4750
maximum-paths 64
4851
!

0 commit comments

Comments
 (0)