forked from FRRouting/frr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrr-nexthop.yang
209 lines (184 loc) · 3.9 KB
/
frr-nexthop.yang
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
module frr-nexthop {
yang-version 1.1;
namespace "http://frrouting.org/yang/nexthop";
prefix frr-nexthop;
import ietf-inet-types {
prefix inet;
}
import ietf-routing-types {
prefix rt-types;
}
import frr-interface {
prefix frr-interface;
}
organization
"Free Range Routing";
contact
"FRR Users List: <mailto:frog@lists.frrouting.org>
FRR Development List: <mailto:dev@lists.frrouting.org>";
description
"This module defines a model for managing FRR nexthop information.";
revision 2019-08-15 {
description
"Initial revision.";
}
typedef gateway-address {
type inet:ip-address;
}
typedef nexthop-type {
type enumeration {
enum "ifindex" {
value 1;
description
"Specific interface.";
}
enum "ip4" {
value 2;
description
"IPv4 address.";
}
enum "ip4-ifindex" {
value 3;
description
"IPv4 address and interface.";
}
enum "ip6" {
value 4;
description
"IPv6 address.";
}
enum "ip6-ifindex" {
value 5;
description
"IPv6 address and interface.";
}
enum "blackhole" {
value 6;
description
"Unreachable or prohibited.";
}
}
description
"Nexthop types.";
}
typedef blackhole-type {
type enumeration {
enum "unspec" {
value 0;
description
"Generic unreachable.";
}
enum "null" {
value 1;
description
"Null type.";
}
enum "reject" {
value 2;
description
"ICMP unreachable.";
}
enum "prohibited" {
value 3;
description
"ICMP admin-prohibited.";
}
}
default "null";
description
"Nexthop blackhole types.";
}
/*
* Nexthop object
*/
grouping frr-nexthop {
leaf nh-type {
type nexthop-type;
mandatory true;
description
"The nexthop type.";
}
leaf gateway {
type gateway-address;
description
"The nexthop gateway address.";
}
leaf vrf {
type string {
length "1..36";
}
description
"The nexthop vrf name, if different from the route.";
}
leaf interface {
type frr-interface:interface-ref;
description
"The nexthop egress interface.";
}
leaf bh-type {
type blackhole-type;
description
"A blackhole sub-type, if the nexthop is a blackhole type.";
}
leaf flags {
type uint32;
description
"The nexthop's raw flags value.";
}
leaf is-duplicate {
type empty;
description
"Duplicate nexthop; will be ignored.";
}
leaf is-recursive {
type empty;
description
"Nexthop must be resolved through another gateway.";
}
leaf is-onlink {
type empty;
description
"Nexthop is directly connected.";
}
leaf is-active {
type empty;
description
"Nexthop is active.";
}
uses rt-types:mpls-label-stack {
description
"Nexthop's MPLS label stack.";
}
leaf mtu {
type uint32;
description
"The nexthop's specific MTU.";
}
}
// End of nexthop
/*
* Nexthop-group container
*/
grouping frr-nexthop-group {
description
"A nexthop-group, represented as a list of nexthop objects.";
leaf name {
type string;
description
"The nexthop-group name.";
}
list entry {
key "id";
description
"A list of nexthop objects.";
leaf id {
type uint32;
description
"Identifies a nexthop within a nexthop group; the entries
are ordered by id value, and the value has no other meaning.";
}
uses frr-nexthop;
}
}
// End of frr-nexthop-group
}