Skip to content

Commit 46bbd6b

Browse files
rszareckirobshakirdplore
authored
Static route next network instance (#1274)
* Update release/models/local-routing/openconfig-local-routing.yang --------- Co-authored-by: Rob Shakir <[email protected]> Co-authored-by: Darren Loher <[email protected]>
1 parent 51bb311 commit 46bbd6b

File tree

1 file changed

+55
-6
lines changed

1 file changed

+55
-6
lines changed

release/models/local-routing/openconfig-local-routing.yang

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ module openconfig-local-routing {
4343
protocol-specific policy after importing the route into the
4444
protocol for distribution (again via routing policy).";
4545

46-
oc-ext:openconfig-version "2.1.0";
46+
oc-ext:openconfig-version "2.2.0";
47+
48+
revision "2025-03-31" {
49+
description
50+
"Add static routing to other network instance for destination
51+
lookup";
52+
reference "2.2.0";
53+
}
4754

4855
revision "2025-02-20" {
4956
description
@@ -225,19 +232,58 @@ module openconfig-local-routing {
225232
only support a numeric value for this string. ";
226233
}
227234

235+
leaf next-network-instance {
236+
description
237+
"Instead of finding the next-hop for a destination address in the current
238+
network-instance, look up the destination address in the routing table
239+
of the specified network-instance.
240+
For example, let 'next-network-instance' = 'DEFAULT'. If a packet arrives
241+
in the 'BLUE' network-instance and the destination address matches this
242+
route, the destination address will be looked up again in the 'DEFAULT'
243+
network-instance to find the next-hop.
244+
This leaf is mutually exclusive with 'next-hop', 'nh-network-instance'
245+
leaves";
246+
type leafref {
247+
path "/network-instances/network-instance/config/name";
248+
}
249+
}
250+
228251
leaf next-hop {
229252
type union {
230253
type inet:ip-address;
231254
type local-defined-next-hop;
232255
}
233256
description
234257
"The next-hop that is to be used for the static route
235-
- this may be specified as an IP address, an interface
236-
or a pre-defined next-hop type - for instance, DROP or
237-
LOCAL_LINK. When this leaf is not set, and the interface-ref
258+
- this may be specified as:
259+
- an IP address or
260+
- a pre-defined next-hop type - for instance, DROP or
261+
LOCAL_LINK or
262+
When this leaf is not set, and the interface-ref
238263
value is specified for the next-hop, then the system should
239264
treat the prefix as though it is directly connected to the
240-
interface.";
265+
interface.
266+
This leaf is mutualy exclusive with next-network-instance
267+
leaf";
268+
}
269+
270+
leaf nh-network-instance {
271+
description
272+
"Network-instance in which IP address of next-hop should
273+
be looked up, to find egress interface. This attribute
274+
is only valid if next-hop is given as IP address.
275+
This attribute may be combined with recurse attribute of any
276+
value, in which case recurse setting applies to
277+
nh-network-instance.
278+
For example, let 'nh-network-instance' = 'DEFAULT'. If a
279+
packet arrives on the 'BLUE' network-instance and the
280+
destination address matches this route, look up the IP
281+
configured as next-hop in the 'DEFAULT' network-instance.
282+
This leaf is mutually exclusive with next-network-instance
283+
leaf";
284+
type leafref {
285+
path "/network-instances/network-instance/config/name";
286+
}
241287
}
242288

243289
leaf recurse {
@@ -252,7 +298,9 @@ module openconfig-local-routing {
252298
instance. When the interface reference specified within the
253299
next-hop entry is set (i.e., is not null) then forwarding is
254300
restricted to being via the interface specified - and
255-
recursion is hence disabled.";
301+
recursion is hence disabled.
302+
This leaf is mutualy exclusive with next-network-instance
303+
leaf";
256304
}
257305

258306
uses local-common-route-attributes;
@@ -341,6 +389,7 @@ module openconfig-local-routing {
341389
container must not be used.";
342390

343391
list next-hop {
392+
344393
key "index";
345394

346395
description

0 commit comments

Comments
 (0)