pbr
This module describes a YANG model for Policy Based Routing configuration
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>Resources
Section titled “Resources”Resource List
Section titled “Resource List”| 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 |
Detailed Nodes
Section titled “Detailed Nodes”/pbr-maps
Section titled “/pbr-maps”Path
/pbr-maps
Node Type
container
Access
Read-Write
/pbr-maps/pbr-map
Section titled “/pbr-maps/pbr-map”Path
/pbr-maps/pbr-map
Node Type
list
Access
Read-Write
/pbr-maps/pbr-map/name
Section titled “/pbr-maps/pbr-map/name”Path
/pbr-maps/pbr-map/name
Node Type
leaf
Description
Name of pbr map.
Access
Read-Write
Data Type
/pbr-maps/pbr-map/seq
Section titled “/pbr-maps/pbr-map/seq”Path
/pbr-maps/pbr-map/seq
Node Type
leaf
Description
Sequence of pbr map entry.
Access
Read-Write
Data Type
Constraints
Valid range: 1 to 700
/pbr-maps/pbr-map/match-condition
Section titled “/pbr-maps/pbr-map/match-condition”Path
/pbr-maps/pbr-map/match-condition
Node Type
container
Description
pbr map match conditions.
Access
Read-Write
/pbr-maps/pbr-map/match-condition/src-port
Section titled “/pbr-maps/pbr-map/match-condition/src-port”Path
/pbr-maps/pbr-map/match-condition/src-port
Node Type
leaf
Description
Choose the source port to use.
Access
Read-Write
Data Type
Constraints
Valid range: 1 to 65535
/pbr-maps/pbr-map/match-condition/src-ip
Section titled “/pbr-maps/pbr-map/match-condition/src-ip”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
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.
/pbr-maps/pbr-map/match-condition/dst-port
Section titled “/pbr-maps/pbr-map/match-condition/dst-port”Path
/pbr-maps/pbr-map/match-condition/dst-port
Node Type
leaf
Description
Choose the destination port to use.
Access
Read-Write
Data Type
Constraints
Valid range: 1 to 65535
/pbr-maps/pbr-map/match-condition/dst-ip
Section titled “/pbr-maps/pbr-map/match-condition/dst-ip”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
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.
/pbr-maps/pbr-map/match-condition/ip-protocol
Section titled “/pbr-maps/pbr-map/match-condition/ip-protocol”Path
/pbr-maps/pbr-map/match-condition/ip-protocol
Node Type
leaf
Description
Choose an ip-protocol.
Access
Read-Write
Data Type
Constraints
Enumeration with options:
- udp
- tcp
/pbr-maps/pbr-map/set-action
Section titled “/pbr-maps/pbr-map/set-action”Path
/pbr-maps/pbr-map/set-action
Node Type
container
Access
Read-Write
/pbr-maps/pbr-map/set-action/set-action
Section titled “/pbr-maps/pbr-map/set-action/set-action”Path
/pbr-maps/pbr-map/set-action/set-action
Node Type
choice
Description
pbr map set actions.
Access
Read-Write
/pbr-maps/pbr-map/set-action/set-action/nexthop-group
Section titled “/pbr-maps/pbr-map/set-action/set-action/nexthop-group”Path
/pbr-maps/pbr-map/set-action/set-action/nexthop-group
Node Type
choice-case
Access
Read-Write
/pbr-maps/pbr-map/set-action/set-action/nexthop-group/nexthop-group
Section titled “/pbr-maps/pbr-map/set-action/set-action/nexthop-group/nexthop-group”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
/pbr-maps/pbr-map/set-action/set-action/nexthop
Section titled “/pbr-maps/pbr-map/set-action/set-action/nexthop”Path
/pbr-maps/pbr-map/set-action/set-action/nexthop
Node Type
choice-case
Access
Read-Write
/pbr-maps/pbr-map/set-action/set-action/nexthop/nexthop
Section titled “/pbr-maps/pbr-map/set-action/set-action/nexthop/nexthop”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
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.