Skip to content

Commit ceadf00

Browse files
authored
JunOS: GRE tunnel on vSRX and vJunos-router (#3573)
1 parent 5b3ef20 commit ceadf00

4 files changed

Lines changed: 33 additions & 0 deletions

File tree

docs/plugins/tunnel.gre.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ The plugin includes Jinja2 templates for the following platforms:
1111
|--------------|:-:|:-:|:-:|
1212
| Cisco IOS/XE[^18v] ||||
1313
| FRR ||||
14+
| Juniper vJunos-switch ||||
15+
| Juniper vSRX ||||
1416
| VyOS ||||
1517

1618
[^18v]: Includes Cisco IOSv, Cisco IOSvL2, Cisco CSR 1000v, Cisco Catalyst 8000v, Cisco IOS-on-Linux (IOL), and IOL Layer-2 image.

netsim/devices/vjunos-router.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: vJunos Router (similar to vMX)
33
support:
44
parent: vmx
55
interface_name: ge-0/0/{ifindex}
6+
tunnel_interface_name: "gr-0/0/10.{ifindex}"
67
group_vars:
78
netlab_device_type: vjunos-router
89

@@ -13,6 +14,8 @@ features:
1314
multi_rt: true
1415
bundle: [ vlan_aware ]
1516
transport: [ vxlan ]
17+
tunnel:
18+
gre: [ vrf ]
1619
vlan:
1720
model: router
1821
svi_interface_name: irb.{vlan}

netsim/devices/vsrx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ support:
55
caveats:
66
- vSRX gets all new Junos features, but we don't test them on vSRX
77
parent: junos
8+
tunnel_interface_name: "gr-0/0/0.{ifindex}"
89
group_vars:
910
netlab_device_type: vsrx
1011

@@ -13,6 +14,8 @@ features:
1314
protocol: [ vrrp ]
1415
lag:
1516
passive: True
17+
tunnel:
18+
gre: [ vrf ]
1619
vlan:
1720
model: router
1821
subif_name: "{ifname}.{vlan.access_id}"

netsim/extra/tunnel.gre/junos.j2

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{% if netlab_device_type in [ 'vjunos-router' ] %}
2+
chassis {
3+
fpc 0 {
4+
pic 0 {
5+
tunnel-services bandwidth 1g;
6+
}
7+
}
8+
}
9+
{% endif %}
10+
11+
interfaces {
12+
13+
{% for intf in netlab_interfaces if intf.tunnel.mode|default('') in ['gre'] %}
14+
{{intf.ifname}} {
15+
tunnel {
16+
source {{ intf.tunnel._source[intf.tunnel.af] }};
17+
destination {{ intf.tunnel._destination[intf.tunnel.af] }};
18+
{% if intf.tunnel.vrf is defined %}
19+
routing-instance destination {{ intf.tunnel.vrf }}
20+
{% endif %}
21+
}
22+
}
23+
{% endfor %}
24+
25+
}

0 commit comments

Comments
 (0)