Browse Source

basic config elements copied across from testing

master
Marek Isalski 3 years ago
parent
commit
15c42d8ba3
1 changed files with 133 additions and 3 deletions
  1. +133
    -3
      junos-v21-core-router.j2

+ 133
- 3
junos-v21-core-router.j2

@ -74,11 +74,41 @@ system {
}
}
}
domain-name core.voneus.net;
domain-search [ core.voneus.net oob.core.voneus.net netops.voneus.net ];
time-zone Universal;
location country-code UK;
name-server {
9.9.9.9;
1.1.1.1;
8.8.8.8;
}
radius-server {
{% for radius_server, radius_data in device.config_context.get('radius-servers',{}).items() %}
{{ radius_server }} secret "{{ radius_data.get('secret') }}";{% endfor %}
}
accounting {
events login;
destination {
radius;
}
}
ntp {
server 185.134.196.169 prefer;
}
}
chassis {
maximum-ecmp 16;
redundancy {
routing-engine 0 master;
routing-engine 1 backup;
failover {
on-loss-of-keepalives;
on-re-to-fpc-stale;
on-disk-failure;
on-loss-of-vm-host-connection;
}
graceful-switchover;
}
aggregated-devices {
ethernet {
@ -90,9 +120,45 @@ chassis {
number-of-ports 0;
}
pic 1 {
pic-mode 100G;
port 0 {
speed 100g;
}
port 1 {
speed 100g;
}
port 2 {
speed 100g;
}
port 3 {
speed 100g;
}
port 4 {
speed 100g;
}
port 5 {
speed 100g;
}
port 6 {
speed 100g;
}
port 7 {
speed 100g;
}
port 8 {
speed 100g;
}
port 9 {
speed 100g;
}
port 10 {
speed 100g;
}
port 11 {
speed 40g; /* XXX temporary for testing lab */
}
}
}
network-services enhanced-ip;
}
interfaces {
@ -123,6 +189,19 @@ interfaces {
{%- elif interface.name.startswith( 'lo' ) %}
{{ interface.name }} {
{{ macros.interface_description(interface, interface_context) }}
{%- for unit, subinterface in subinterfaces %}
unit {{ unit }} {
{%- if subinterface.untagged_vlan %}
vlan-id {{ subinterface.untagged_vlan.vid }};
{%- elif unit|int %}
vlan-id {{ unit }};
{%- endif %}
{%- set subinterface_context = subinterface.tags|get_netbox_tags_contexts|contexts_merge_last %}
{# interface_vrf(subinterface, subinterface_context) #}
{# interface_common(subinterface, subinterface_context) #}
{{ macros.interface_addresses(subinterface, subinterface_context) }}
}
{%- endfor %}
{%- elif interface.type.value == 'lag' %}
{{ interface.name }} {
@ -138,7 +217,7 @@ interfaces {
{{ interface.name }} {
{{ macros.interface_description(interface) }}
{%- if interface.mode.value == 'access' %}
{%- if not interface.mode or ( interface.mode.value == 'access' ) %}
unit 0 {
{# interface_vrf(interface, interface_context) #}
{# interface_common(interface, interface_context) #}
@ -176,11 +255,62 @@ interfaces {
unit 0;
}
}
forwarding-options {
sampling {
input {
rate 10000;
run-length 0;
max-packets-per-second 50000;
}
}
load-balance {
per-flow {
hash-seed;
}
}
hash-key {
family inet {
layer-3;
layer-4;
symmetric-hash;
}
family inet6 {
layer-3;
layer-4;
}
family mpls {
label-1;
label-2;
label-3;
payload {
ether-pseudowire;
ip {
port-data;
}
}
}
family multiservice {
source-mac;
destination-mac;
payload {
ip {
layer-3;
layer-4;
}
}
}
}
enhanced-hash-key {
family mpls {
ether-pseudowire zero-control-word;
}
}
}
routing-options {
static {
{%- for (route, route_data) in device.config_context.get('routes',{}).items() %}
route {{ route }} next-hop {{ route_data.get('next-hop', None) }};
{%- endfor %}
}
nonstop-routing;
}

Loading…
Cancel
Save