Skip to content

Commit

Permalink
vJunos-switch: multihop EBGP EVPN (#2005)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Sasso <[email protected]>
  • Loading branch information
ssasso and Stefano Sasso authored Mar 5, 2025
1 parent e4cf96f commit 14e27b9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/module/evpn.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ With additional nerd knobs ([more details](evpn-weird-designs)), it's possible t
| FRR |||
| Nokia SR Linux |||
| Nokia SR OS |||
| vJunos-switch || |
| vJunos-switch || |
| VyOS |||

Most EVPN/VXLAN implementations support only IPv4 VXLAN transport; some can run VXLAN-over-IPv6:
Expand Down
4 changes: 2 additions & 2 deletions netsim/ansible/templates/bgp/junos.j2
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protocols {
{% for n in bgp.neighbors if n[af] is defined and n.type == 'ibgp' %}
neighbor {{ n[af] }} {
description {{ n.name }};
{% if n.activate[af]|default(true) %}
{% if n.activate[af]|default(false) %}
family {{ 'inet' if af == 'ipv4' else 'inet6' }} {
unicast;
}
Expand All @@ -100,7 +100,7 @@ protocols {
{% if n.local_as is defined %}
local-as {{ n.local_as }}{% if n.replace_global_as|default(True) %} no-prepend-global-as{% endif +%};
{% endif %}
{% if n.activate[af]|default(true) %}
{% if n.activate[af]|default(false) %}
family {{ 'inet' if af == 'ipv4' else 'inet6' }} {
unicast;
}
Expand Down
1 change: 1 addition & 0 deletions netsim/ansible/templates/evpn/vjunos-switch.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protocols {
{% for af in ['ipv4','ipv6'] if n[af] is defined %}
neighbor {{ n[af] }} {
accept-remote-nexthop;
multihop no-nexthop-change;
family evpn {
signaling;
}
Expand Down
14 changes: 8 additions & 6 deletions netsim/devices/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ def check_multiple_loopbacks(node: Box, topology: Box) -> None:
def check_evpn_ebgp(node: Box, topology: Box) -> None:
for ngb in node.get('bgp.neighbors',[]):
if ngb.type == 'ebgp' and ngb.get('evpn',False):
report_quirk(
f'EVPN is not supported on EBGP sessions (node {node.name} neighbor {ngb.name})',
node=node,
category=log.IncorrectType,
quirk='evpn_ebgp')
ngb_activate = ngb.get('activate', {})
if ngb_activate.get('ipv4', False) or ngb_activate.get('ipv6', False):
report_quirk(
f'EVPN is not supported on EBGP sessions together with other address families (node {node.name} neighbor {ngb.name})',
node=node,
category=log.IncorrectType,
quirk='evpn_ebgp')

class JUNOS(_Quirks):

Expand All @@ -115,4 +117,4 @@ def device_quirks(self, node: Box, topology: Box) -> None:
print("*** DEVICE QUIRKS FOR JUNOS {}".format(node.name))
fix_unit_0(node,topology)
check_multiple_loopbacks(node,topology)
check_evpn_ebgp(node,topology)
check_evpn_ebgp(node,topology)

0 comments on commit 14e27b9

Please sign in to comment.