---
title: pbr
slug: enterprise-v6p1/4L9f-pbr
createdAt: 2025-12-17T08:18:05.185Z
---

This module describes a YANG model for Policy Based Routing configuration

# <font color="#1d50a2">YANG Tree Diagram</font>

```none
module: asternos-pbr
  +--rw pbr-maps
     +--rw pbr-map* [name seq]
        +--rw name               string
        +--rw seq                uint16
        +--rw match-condition
        |  +--rw src-port?      uint16
        |  +--rw src-ip?        inet:ip-prefix
        |  +--rw dst-port?      uint16
        |  +--rw dst-ip?        inet:ip-prefix
        |  +--rw ip-protocol?   enumeration
        +--rw set-action
           +--rw (set-action)?
              +--:(nexthop-group)
              |  +--rw nexthop-group?   string
              +--:(nexthop)
                 +--rw nexthop*         inet:ip-address-no-zone

  rpcs:
    +---x show-pbr-map
    |  +---w input
    |  |  +---w name?   string
    |  |  +---w type?   enumeration
    |  +--ro output
    |     +--ro data?   <anydata>
    +---x show-pbr-interface
    |  +---w input
    |  |  +---w interface-name?   string
    |  |  +---w type?             enumeration
    |  +--ro output
    |     +--ro data?   <anydata>
    +---x show-pbr-nexthop-groups
       +---w input
       |  +---w name?   string
       |  +---w type?   enumeration
       +--ro output
          +--ro data?   <anydata>
```

# <font color="#1d50a2">Resources</font>

## <font color="#1d50a2">Resource List</font>

| **Path**                                                            | **Access** |
| ------------------------------------------------------------------- | ---------- |
| /pbr-maps                                                           | Read-Write |
| /pbr-maps/pbr-map                                                   | Read-Write |
| /pbr-maps/pbr-map/name                                              | Read-Write |
| /pbr-maps/pbr-map/seq                                               | Read-Write |
| /pbr-maps/pbr-map/match-condition                                   | Read-Write |
| /pbr-maps/pbr-map/match-condition/src-port                          | Read-Write |
| /pbr-maps/pbr-map/match-condition/src-ip                            | Read-Write |
| /pbr-maps/pbr-map/match-condition/dst-port                          | Read-Write |
| /pbr-maps/pbr-map/match-condition/dst-ip                            | Read-Write |
| /pbr-maps/pbr-map/match-condition/ip-protocol                       | Read-Write |
| /pbr-maps/pbr-map/set-action                                        | Read-Write |
| /pbr-maps/pbr-map/set-action/set-action                             | Read-Write |
| /pbr-maps/pbr-map/set-action/set-action/nexthop-group               | Read-Write |
| /pbr-maps/pbr-map/set-action/set-action/nexthop-group/nexthop-group | Read-Write |
| /pbr-maps/pbr-map/set-action/set-action/nexthop                     | Read-Write |
| /pbr-maps/pbr-map/set-action/set-action/nexthop/nexthop             | Read-Write |

## <font color="#1d50a2">Detailed Nodes</font>

### <font color="#1d50a2">/pbr-maps</font>

**Path**

/pbr-maps

**Node Type**

container

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map</font>

**Path**

/pbr-maps/pbr-map

**Node Type**

list

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map/name</font>

**Path**

/pbr-maps/pbr-map/name

**Node Type**

leaf

**Description**

Name of pbr map.

**Access**

Read-Write

**Data Type**

\<YANG type string>

### <font color="#1d50a2">/pbr-maps/pbr-map/seq</font>

**Path**

/pbr-maps/pbr-map/seq

**Node Type**

leaf

**Description**

Sequence of pbr map entry.

**Access**

Read-Write

**Data Type**

\<YANG type uint16>

**Constraints**

Valid range: 1 to 700

### <font color="#1d50a2">/pbr-maps/pbr-map/match-condition</font>

**Path**

/pbr-maps/pbr-map/match-condition

**Node Type**

container

**Description**

pbr map match conditions.

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map/match-condition/src-port</font>

**Path**

/pbr-maps/pbr-map/match-condition/src-port

**Node Type**

leaf

**Description**

Choose the source port to use.

**Access**

Read-Write

**Data Type**

\<YANG type uint16>

**Constraints**

Valid range: 1 to 65535

### <font color="#1d50a2">/pbr-maps/pbr-map/match-condition/src-ip</font>

**Path**

/pbr-maps/pbr-map/match-condition/src-ip

**Node Type**

leaf

**Description**

Choose the src ip or ipv6 prefix to use.

**Access**

Read-Write

**Data Type**

\<YANG type ip-prefix>

**Constraints**

Multiple constraints:

- The ipv6-prefix type represents an IPv6 prefix.

The prefix length is given by the number following the slash character and must be less than or equal to 128.

A prefix length value of n corresponds to an IP address mask that has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0.

The canonical format of an IPv6 prefix has all bits of the IPv6 address set to zero that are not part of the IPv6 prefix. Furthermore, the IPv6 address is represented as defined in Section 4 of RFC 5952.

The definition of ipv6-prefix does not require that bits, which are not part of the prefix, are set to zero. However, implementations have to return values in canonical format, which requires non-prefix bits to be set to zero. This means that 2001\:db8\::1/64 must be accepted as a valid value but it will be converted into the canonical format 2001\:db8\::/64.

- The ipv4-prefix type represents an IPv4 prefix.

The prefix length is given by the number following the slash character and must be less than or equal to 32.

A prefix length value of n corresponds to an IP address mask that has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0.

The canonical format of an IPv4 prefix has all bits of the IPv4 address set to zero that are not part of the

IPv4 prefix.

The definition of ipv4-prefix does not require that bits, which are not part of the prefix, are set to zero. However, implementations have to return values in canonical format, which requires non-prefix bits to be set to zero. This means that 192.0.2.1/24 must be accepted as a valid value but it will be converted into the canonical format 192.0.2.0/24.

### <font color="#1d50a2">/pbr-maps/pbr-map/match-condition/dst-port</font>

**Path**

/pbr-maps/pbr-map/match-condition/dst-port

**Node Type**

leaf

**Description**

Choose the destination port to use.

**Access**

Read-Write

**Data Type**

\<YANG type uint16>

**Constraints**

Valid range: 1 to 65535

### <font color="#1d50a2">/pbr-maps/pbr-map/match-condition/dst-ip</font>

**Path**

/pbr-maps/pbr-map/match-condition/dst-ip

**Node Type**

leaf

**Description**

Choose the destination ip or ipv6 prefix to use.

**Access**

Read-Write

**Data Type**

\<YANG type ip-prefix>

**Constraints**

Multiple constraints:

- The ipv6-prefix type represents an IPv6 prefix.

The prefix length is given by the number following the slash character and must be less than or equal to 128.

A prefix length value of n corresponds to an IP address mask that has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0.

The canonical format of an IPv6 prefix has all bits of the IPv6 address set to zero that are not part of the IPv6 prefix. Furthermore, the IPv6 address is represented as defined in Section 4 of RFC 5952.

The definition of ipv6-prefix does not require that bits, which are not part of the prefix, are set to zero. However, implementations have to return values in canonical format, which requires non-prefix bits to be set to zero. This means that 2001\:db8\::1/64 must be accepted as a valid value but it will be converted into the canonical format 2001\:db8\::/64.

- The ipv4-prefix type represents an IPv4 prefix.

The prefix length is given by the number following the slash character and must be less than or equal to 32.

A prefix length value of n corresponds to an IP address mask that has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0.

The canonical format of an IPv4 prefix has all bits of the IPv4 address set to zero that are not part of the

IPv4 prefix.

The definition of ipv4-prefix does not require that bits, which are not part of the prefix, are set to zero. However, implementations have to return values in canonical format, which requires non-prefix bits to be set to zero. This means that 192.0.2.1/24 must be accepted as a valid value but it will be converted into the canonical format 192.0.2.0/24.

### <font color="#1d50a2">/pbr-maps/pbr-map/match-condition/ip-protocol</font>

**Path**

/pbr-maps/pbr-map/match-condition/ip-protocol

**Node Type**

leaf

**Description**

Choose an ip-protocol.

**Access**

Read-Write

**Data Type**

\<YANG type enumeration>

**Constraints**

Enumeration with options:

- udp
- tcp

### <font color="#1d50a2">/pbr-maps/pbr-map/set-action</font>

**Path**

/pbr-maps/pbr-map/set-action

**Node Type**

container

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map/set-action/set-action</font>

**Path**

/pbr-maps/pbr-map/set-action/set-action

**Node Type**

choice

**Description**

pbr map set actions.

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map/set-action/set-action/nexthop-group</font>

**Path**

/pbr-maps/pbr-map/set-action/set-action/nexthop-group

**Node Type**

choice-case

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map/set-action/set-action/nexthop-group/nexthop-group</font>

**Path**

/pbr-maps/pbr-map/set-action/set-action/nexthop-group/nexthop-group

**Node Type**

leaf

**Description**

Set nexthop-group to use

**Access**

Read-Write

**Data Type**

\<YANG type string>

### <font color="#1d50a2">/pbr-maps/pbr-map/set-action/set-action/nexthop</font>

**Path**

/pbr-maps/pbr-map/set-action/set-action/nexthop

**Node Type**

choice-case

**Access**

Read-Write

### <font color="#1d50a2">/pbr-maps/pbr-map/set-action/set-action/nexthop/nexthop</font>

**Path**

/pbr-maps/pbr-map/set-action/set-action/nexthop/nexthop

**Node Type**

leaf-list

**Description**

Choose the nexthop ip or ipv6 without zone to use.

**Access**

Read-Write

**Data Type**

\<YANG type ip-address-no-zone>

**Constraints**

Multiple constraints:

- An IPv6 address without a zone index. This type, derived from the type ipv6-address, may be used in situations where the zone is known from the context and no zone index is needed.
- An IPv4 address without a zone index. This type, derived from the type ipv4-address, may be used in situations where the zone is known from the context and no zone index is needed.

