Skip to content

Commit ceef999

Browse files
Merge remote-tracking branch 'upstream/master' into modular-chassis
2 parents fa4a6d7 + 9527cbe commit ceef999

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3501
-56
lines changed

dockers/docker-dhcp-relay/cli/clear/plugins/clear_dhcp6relay_counter.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
22
import click
3-
sys.path.insert(0, '../../show/plugins/')
4-
from show_dhcp6relay_counters import DHCPv6_Counter
3+
from show.plugins.dhcprelay import DHCPv6_Counter
54

65
import utilities_common.cli as clicommon
76

@@ -15,7 +14,7 @@ def dhcp6relay_clear():
1514
@click.option('-i', '--interface', required=False)
1615
def dhcp6relay_clear_counters(interface):
1716
""" Clear dhcp6relay message counts """
18-
17+
1918
counter = DHCPv6_Counter()
2019
counter_intf = counter.get_interface()
2120

dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq {{ loop.index * 5 }} permit {{ prefi
3333
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
3434
{% set multi_asic = True %}
3535
{% endif %}
36-
{% if multi_asic is defined or DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
36+
{% if multi_asic is defined or DEVICE_METADATA['localhost']['switch_type'] == 'voq' or DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
3737
route-map HIDE_INTERNAL permit 10
3838
set community no-export
3939
{% if constants.bgp.peers is defined and constants.bgp.peers.internal is defined and constants.bgp.peers.internal.community is defined %}
@@ -63,15 +63,15 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
6363
{% endif %}
6464
!
6565
{# set router-id #}
66-
{% if DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' or DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
66+
{% if DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' or DEVICE_METADATA['localhost']['switch_type'] == 'voq' or DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
6767
bgp router-id {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip }}
6868
{% else %}
6969
bgp router-id {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}
7070
{% endif %}
7171
!
7272
{# advertise loopback #}
7373
network {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/32
74-
{% if multi_asic is defined or DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
74+
{% if multi_asic is defined or DEVICE_METADATA['localhost']['switch_type'] == 'voq' or DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
7575
network {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip }}/32 route-map HIDE_INTERNAL
7676
{% endif %}
7777
!
@@ -80,7 +80,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
8080
network {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/64
8181
exit-address-family
8282
{% endif %}
83-
{% if multi_asic is defined or DEVICE_METADATA['localhost']['switch_type'] == 'voq'%}
83+
{% if multi_asic is defined or DEVICE_METADATA['localhost']['switch_type'] == 'voq' or DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
8484
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") != 'None' %}
8585
address-family ipv6
8686
network {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip }}/128 route-map HIDE_INTERNAL
@@ -102,7 +102,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
102102
{% endblock vlan_advertisement %}
103103
!
104104
!
105-
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['switch_type'] == 'voq' %}
105+
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['switch_type'] == 'voq' or DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
106106
address-family ipv4
107107
redistribute connected route-map HIDE_INTERNAL
108108
exit-address-family

dockers/docker-fpm-frr/frr/bgpd/templates/internal/peer-group.conf.j2

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
!
22
! template: bgpd/templates/internal/peer-group.conf.j2
3+
{% from "common/functions.conf.j2" import get_ipv4_loopback_address %}
4+
{% from "common/functions.conf.j2" import get_ipv6_loopback_address %}
35
!
46
neighbor INTERNAL_PEER_V4 peer-group
57
neighbor INTERNAL_PEER_V6 peer-group
68
address-family ipv4
7-
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
9+
10+
{% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
11+
neighbor INTERNAL_PEER_V4 update-source {{ get_ipv4_loopback_address(CONFIG_DB__LOOPBACK_INTERFACE, "Loopback4096") | ip }}
12+
{% elif CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
813
neighbor INTERNAL_PEER_V4 route-reflector-client
914
{% endif %}
1015
neighbor INTERNAL_PEER_V4 soft-reconfiguration inbound
@@ -13,7 +18,9 @@
1318
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out
1419
exit-address-family
1520
address-family ipv6
16-
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
21+
{% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
22+
neighbor INTERNAL_PEER_V4 update-source {{ get_ipv6_loopback_address(CONFIG_DB__LOOPBACK_INTERFACE, "Loopback4096") | ip }}
23+
{% elif CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
1724
neighbor INTERNAL_PEER_V6 route-reflector-client
1825
{% endif %}
1926
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound

platform/mellanox/mft.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#
1717
# Mellanox SAI
1818

19-
MFT_VERSION = 4.17.0
20-
MFT_REVISION = 106
19+
MFT_VERSION = 4.17.2
20+
MFT_REVISION = 12
2121

2222
export MFT_VERSION MFT_REVISION
2323

sonic-slave-bullseye/Dockerfile.j2

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ RUN echo "deb [arch=armhf] http://deb.debian.org/debian bullseye main contrib no
2222
echo "deb-src [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free" >> /etc/apt/sources.list && \
2323
echo "deb [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
2424
echo "deb-src [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
25-
echo "deb [arch=armhf] http://security.debian.org bullseye/updates main contrib non-free" >> /etc/apt/sources.list && \
26-
echo "deb-src [arch=armhf] http://security.debian.org bullseye/updates main contrib non-free" >> /etc/apt/sources.list && \
25+
echo "deb [arch=armhf] http://security.debian.org/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
26+
echo "deb-src [arch=armhf] http://security.debian.org/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
2727
echo 'deb [arch=armhf] http://ftp.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list && \
2828
echo "deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free" >> /etc/apt/sources.list && \
2929
echo "deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list
@@ -32,8 +32,8 @@ RUN echo "deb [arch=arm64] http://deb.debian.org/debian bullseye main contrib no
3232
echo "deb-src [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free" >> /etc/apt/sources.list && \
3333
echo "deb [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
3434
echo "deb-src [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
35-
echo "deb [arch=arm64] http://security.debian.org bullseye/updates main contrib non-free" >> /etc/apt/sources.list && \
36-
echo "deb-src [arch=arm64] http://security.debian.org bullseye/updates main contrib non-free" >> /etc/apt/sources.list && \
35+
echo "deb [arch=arm64] http://security.debian.org/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
36+
echo "deb-src [arch=arm64] http://security.debian.org/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
3737
echo 'deb [arch=arm64] http://ftp.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list && \
3838
echo "deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free" >> /etc/apt/sources.list && \
3939
echo "deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list

src/dhcpmon/src/dhcp_device.c

+37-8
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ static struct sock_fprog dhcp_sock_bfp = {
121121
*/
122122
static dhcp_device_context_t aggregate_dev = {0};
123123

124+
static dhcp_device_context_t *mgmt_intf = NULL;
125+
124126
/** Monitored DHCPv4 message type */
125127
static dhcpv4_message_type_t v4_monitored_msgs[] = {
126128
DHCPv4_MESSAGE_TYPE_DISCOVER,
@@ -176,6 +178,11 @@ static void handle_dhcp_option_53(dhcp_device_context_t *context,
176178
if ((context->giaddr_ip == giaddr && context->is_uplink && dir == DHCP_TX) ||
177179
(!context->is_uplink && dir == DHCP_RX && iphdr->ip_dst.s_addr == INADDR_BROADCAST)) {
178180
context->counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++;
181+
// If the packet recieved on the mgmt interface, we don't want to increment the aggregate device
182+
if (context == mgmt_intf)
183+
{
184+
break;
185+
}
179186
aggregate_dev.counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++;
180187
}
181188
break;
@@ -186,6 +193,11 @@ static void handle_dhcp_option_53(dhcp_device_context_t *context,
186193
if ((context->giaddr_ip == iphdr->ip_dst.s_addr && context->is_uplink && dir == DHCP_RX) ||
187194
(!context->is_uplink && dir == DHCP_TX)) {
188195
context->counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++;
196+
// If the packet recieved on the mgmt interface, we don't want to increment the aggregate device
197+
if (context == mgmt_intf)
198+
{
199+
break;
200+
}
189201
aggregate_dev.counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++;
190202
}
191203
break;
@@ -224,6 +236,11 @@ static void handle_dhcpv6_option(dhcp_device_context_t *context,
224236
case DHCPv6_MESSAGE_TYPE_RECONFIGURE:
225237
case DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST:
226238
context->counters.v6counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option]++;
239+
// If the packet recieved on the mgmt interface, we don't want to increment the aggregate device
240+
if (context == mgmt_intf)
241+
{
242+
break;
243+
}
227244
aggregate_dev.counters.v6counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option]++;
228245
break;
229246
default:
@@ -309,7 +326,7 @@ static void read_callback(int fd, short event, void *arg)
309326
}
310327
}
311328
else if (!is_ipv4 && dhcpv6_enabled && (buffer_sz > UDPv6_START_OFFSET + sizeof(struct udphdr) + DHCPv6_TYPE_LENGTH)) {
312-
const u_char* dhcp_option = context->buffer + dhcp_option_offset;
329+
const u_char* dhcp_header = context->buffer + dhcp_option_offset;
313330
dhcp_packet_direction_t dir = (ethhdr->ether_shost[0] == context->mac[0] &&
314331
ethhdr->ether_shost[1] == context->mac[1] &&
315332
ethhdr->ether_shost[2] == context->mac[2] &&
@@ -319,23 +336,25 @@ static void read_callback(int fd, short event, void *arg)
319336
DHCP_TX : DHCP_RX;
320337
int offset = 0;
321338
uint16_t option = 0;
339+
uint16_t current_option_len = 0;
322340
// Get to inner DHCP header from encapsulated RELAY_FORWARD or RELAY_REPLY header
323-
while (dhcp_option[offset] == DHCPv6_MESSAGE_TYPE_RELAY_FORWARD || dhcp_option[offset] == DHCPv6_MESSAGE_TYPE_RELAY_REPLY)
341+
while (dhcp_header[offset] == DHCPv6_MESSAGE_TYPE_RELAY_FORWARD || dhcp_header[offset] == DHCPv6_MESSAGE_TYPE_RELAY_REPLY)
324342
{
325343
// Get to DHCPv6_OPTION_RELAY_MSG from all options
326344
offset += DHCPv6_RELAY_MSG_OPTIONS_OFFSET;
327-
option = htons(*((uint16_t*)(&(dhcp_option[offset]))));
345+
option = htons(*((uint16_t*)(&(dhcp_header[offset]))));
328346

329347
while (option != DHCPv6_OPTION_RELAY_MSG)
330348
{
331-
offset += DHCPv6_OPTION_LENGTH;
332349
// Add to offset the option length and get the next option ID
333-
offset += htons(*((uint16_t*)(&(dhcp_option[offset]))));
334-
option = htons(*((uint16_t*)(&(dhcp_option[offset]))));
350+
current_option_len = htons(*((uint16_t*)(&(dhcp_header[offset + DHCPv6_OPTION_LENGTH]))));
351+
offset += DHCPv6_OPTION_LENGTH + DHCPv6_OPTION_LEN_LENGTH + current_option_len;
352+
option = htons(*((uint16_t*)(&(dhcp_header[offset]))));
335353
}
354+
// Set the offset to DHCP-relay-message data
336355
offset += DHCPv6_OPTION_LENGTH + DHCPv6_OPTION_LEN_LENGTH;
337356
}
338-
handle_dhcpv6_option(context, dhcp_option[offset], dir);
357+
handle_dhcpv6_option(context, dhcp_header[offset], dir);
339358
} else {
340359
syslog(LOG_WARNING, "read_callback(%s): read length (%ld) is too small to capture DHCP options",
341360
context->intf, buffer_sz);
@@ -554,7 +573,7 @@ static dhcp_mon_status_t dhcp_device_check_health(dhcp_mon_check_t check_type,
554573
{
555574
dhcp_mon_status_t rv = DHCP_MON_STATUS_HEALTHY;
556575

557-
if (dhcp_device_is_dhcp_inactive(aggregate_dev.counters.v4counters, aggregate_dev.counters.v6counters, type)) {
576+
if (dhcp_device_is_dhcp_inactive(v4counters, v6counters, type)) {
558577
rv = DHCP_MON_STATUS_INDETERMINATE;
559578
} else if (check_type == DHCP_MON_CHECK_POSITIVE) {
560579
rv = dhcp_device_check_positive_health(v4counters, v6counters, type);
@@ -948,3 +967,13 @@ void dhcp_device_active_types(bool dhcpv4, bool dhcpv6)
948967
dhcpv4_enabled = dhcpv4;
949968
dhcpv6_enabled = dhcpv6;
950969
}
970+
971+
/**
972+
* @code dhcp_device_init_mgmt_intf(mgmt_intf_context);
973+
*
974+
* @brief assign context address of mgmt interface
975+
*/
976+
void dhcp_device_init_mgmt_intf(dhcp_device_context_t *mgmt_intf_context)
977+
{
978+
mgmt_intf = mgmt_intf_context;
979+
}

src/dhcpmon/src/dhcp_device.h

+11
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,15 @@ void dhcp_device_print_status(dhcp_device_context_t *context, dhcp_counters_type
255255
* @return none
256256
*/
257257
void dhcp_device_active_types(bool dhcpv4, bool dhcpv6);
258+
259+
/**
260+
* @code dhcp_device_init_mgmt_intf(mgmt_intf_context);
261+
*
262+
* @brief assign context address of mgmt interface
263+
*
264+
* @param mgmt_intf_context MGMT interface context struct address
265+
*
266+
* @return none
267+
*/
268+
void dhcp_device_init_mgmt_intf(dhcp_device_context_t *mgmt_intf_context);
258269
#endif /* DHCP_DEVICE_H_ */

src/dhcpmon/src/dhcp_devman.c

+3
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ int dhcp_devman_add_intf(const char *name, char intf_type)
148148
strncpy(agg_dev->intf + sizeof(AGG_DEV_PREFIX) - 1, name, sizeof(agg_dev->intf) - sizeof(AGG_DEV_PREFIX));
149149
agg_dev->intf[sizeof(agg_dev->intf) - 1] = '\0';
150150
}
151+
else if (rv == 0 && intf_type == 'm') {
152+
dhcp_device_init_mgmt_intf(dev->dev_context);
153+
}
151154

152155
LIST_INSERT_HEAD(&intfs, dev, entry);
153156
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Pin the redis package to version 3.5.3 (the last version that supports both
2+
Python 2 and 3).
3+
4+
Signed-off-by: Saikrishna Arcot <[email protected]>
5+
6+
diff --git a/requirements.txt b/requirements.txt
7+
index 7800f0f..3fc0632 100644
8+
--- a/requirements.txt
9+
+++ b/requirements.txt
10+
@@ -1 +1 @@
11+
-redis
12+
+redis==3.5.3
13+
diff --git a/setup.py b/setup.py
14+
index 8ccf31f..6db9ec4 100644
15+
--- a/setup.py
16+
+++ b/setup.py
17+
@@ -17,7 +17,7 @@ setup(name=package_name,
18+
author_email='[email protected]',
19+
url='http://github.com/p/redis-dump-load',
20+
py_modules=['redisdl'],
21+
- install_requires=['redis'],
22+
+ install_requires=['redis==3.5.3'],
23+
data_files=[
24+
(doc_dir, data_files),
25+
],

src/redis-dump-load.patch/series

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
0001-Use-pipelines-when-dumping-52.patch
22
0002-Fix-setup.py-for-test-and-bdist_wheel.patch
3+
0003-use-redis-3.5.3.patch

src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ def __init__(self, common_objs, db_name, table_name, peer_type, check_neig_meta)
125125
if self.check_deployment_id:
126126
deps.append(("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME, "localhost/deployment_id"))
127127

128+
if self.peer_type == 'internal':
129+
deps.append(("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback4096"))
130+
128131
super(BGPPeerMgrBase, self).__init__(
129132
common_objs,
130133
deps,
@@ -160,11 +163,17 @@ def add_peer(self, vrf, nbr, data):
160163
print_data = vrf, nbr, data
161164
bgp_asn = self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME)["localhost"]["bgp_asn"]
162165
#
163-
lo0_ipv4 = self.get_lo0_ipv4()
166+
lo0_ipv4 = self.get_lo_ipv4("Loopback0|")
164167
if lo0_ipv4 is None:
165168
log_warn("Loopback0 ipv4 address is not presented yet")
166169
return False
167170
#
171+
if self.peer_type == 'internal':
172+
lo4096_ipv4 = self.get_lo_ipv4("Loopback4096|")
173+
if lo4096_ipv4 is None:
174+
log_warn("Loopback4096 ipv4 address is not presented yet")
175+
return False
176+
168177
if "local_addr" not in data:
169178
log_warn("Peer %s. Missing attribute 'local_addr'" % nbr)
170179
else:
@@ -299,15 +308,15 @@ def apply_op(self, cmd, vrf):
299308
self.cfg_mgr.push(cmd)
300309
return True
301310

302-
def get_lo0_ipv4(self):
311+
def get_lo_ipv4(self, loopback_str):
303312
"""
304313
Extract Loopback0 ipv4 address from the Directory
305314
:return: ipv4 address for Loopback0, None if nothing found
306315
"""
307316
loopback0_ipv4 = None
308317
for loopback in self.directory.get_slot("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME).keys():
309-
if loopback.startswith("Loopback0|"):
310-
loopback0_prefix_str = loopback.replace("Loopback0|", "")
318+
if loopback.startswith(loopback_str):
319+
loopback0_prefix_str = loopback.replace(loopback_str, "")
311320
loopback0_ip_str = loopback0_prefix_str[:loopback0_prefix_str.find('/')]
312321
if TemplateFabric.is_ipv4(loopback0_ip_str):
313322
loopback0_ipv4 = loopback0_ip_str

src/sonic-bgpcfgd/bgpcfgd/template.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def prefix_attr(attr, value):
7575
return None
7676
else:
7777
try:
78-
prefix = netaddr.IPNetwork(str(value))
78+
prefix = netaddr.IPNetwork(str(value).strip())
7979
except (netaddr.NotRegisteredError, netaddr.AddrFormatError, netaddr.AddrConversionError):
8080
return None
8181
return str(getattr(prefix, attr))
@@ -105,4 +105,4 @@ def pfx_filter(value):
105105
log_err("'%s' is invalid ip address" % ip_address)
106106
else:
107107
table[key] = val
108-
return table
108+
return table
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"CONFIG_DB__DEVICE_METADATA": {
3+
"localhost": {
4+
"type": "SpineRouter",
5+
"sub_role": "BackEnd",
6+
"switch_type": "chassis-packet"
7+
}
8+
},
9+
"CONFIG_DB__LOOPBACK_INTERFACE": {
10+
"Loopback4096|10.10.10.10/32": {},
11+
"Loopback4096|2603:10e2:400::3/128": {}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
!
2+
! template: bgpd/templates/internal/peer-group.conf.j2
3+
!
4+
neighbor INTERNAL_PEER_V4 peer-group
5+
neighbor INTERNAL_PEER_V6 peer-group
6+
address-family ipv4
7+
neighbor INTERNAL_PEER_V4 update-source 10.10.10.10
8+
neighbor INTERNAL_PEER_V4 soft-reconfiguration inbound
9+
neighbor INTERNAL_PEER_V4 allowas-in 1
10+
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in
11+
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out
12+
exit-address-family
13+
address-family ipv6
14+
neighbor INTERNAL_PEER_V4 update-source 2603:10e2:400::3
15+
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound
16+
neighbor INTERNAL_PEER_V6 allowas-in 1
17+
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in
18+
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out
19+
exit-address-family
20+
!
21+
! end of template: bgpd/templates/internal/peer-group.conf.j2
22+
!

0 commit comments

Comments
 (0)