forked from vincentbernat/network-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjunos-R3.conf
92 lines (89 loc) · 2.04 KB
/
junos-R3.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# -*- junos -*-
interfaces {
em1 {
unit 0 {
family inet6 {
address 2001:db8:aaaa::2/124;
}
}
}
em2 {
unit 0 {
family inet6 {
address 2001:db8:bbbb::2/124;
}
}
}
}
protocols {
bgp {
group peers {
type external;
import [ only-directly-connected accept-valid reject-all ];
export reject-all;
enforce-first-as;
multipath;
family inet6 {
unicast {
no-install;
}
}
neighbor 2001:db8:aaaa::f {
peer-as 65000;
}
}
}
}
routing-options {
autonomous-system 65002;
router-id 3.3.3.3;
validation {
group RPKI {
# No support for SSH on JunOS
session 2001:db8:bbbb::f {
hold-time 60; # session is considered down after 1 minute
record-lifetime 3600; # cache is kept for 1 hour
refresh-time 30; # cache is refreshed every 30 seconds
port 8282;
}
}
}
}
policy-options {
as-path exactly-one-asn "^.$";
policy-statement only-directly-connected {
term exactly-one-asn {
from {
protocol bgp;
as-path exactly-one-asn;
}
then next policy;
}
then reject;
}
policy-statement accept-valid {
term valid {
from {
protocol bgp;
validation-database valid;
}
then {
validation-state valid;
accept;
}
}
term invalid {
from {
protocol bgp;
validation-database invalid;
}
then {
validation-state invalid;
reject;
}
}
}
policy-statement reject-all {
then reject;
}
}