Skip to content

ePBR

Enhanced Policy-Based Redirect (ePBR) steers traffic through service appliances such as firewalls, load balancers and IPS devices without changing the routing table. Services group one or more service end-points with health probes, service chains link services in order, and ePBR policies match traffic with access lists and redirect it to services. Policies are applied to Layer-3 interfaces (SVIs, Ethernet and port-channel interfaces and subinterfaces) in forward and reverse direction, or to Layer-2 interfaces with an egress interface, using the epbr sub-section of each interface.

Diagram
NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo
interface_groupsListinterface_groupsNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
interfacesClassinterfacesNo
epbrClassepbrNo

NameTypeConstraintMandatoryDefault Value
subinterfacesListsubinterfacesNo
epbrClassepbrNo

NameTypeConstraintMandatoryDefault Value
ethernetsListethernetsNo
port_channelsListport_channelsNo
vlansListvlansNo

ethernets (nxos.devices.configuration.interfaces)

Section titled “ethernets (nxos.devices.configuration.interfaces)”
NameTypeConstraintMandatoryDefault Value
subinterfacesListsubinterfacesNo
epbrClassepbrNo

port_channels (nxos.devices.configuration.interfaces)

Section titled “port_channels (nxos.devices.configuration.interfaces)”
NameTypeConstraintMandatoryDefault Value
subinterfacesListsubinterfacesNo
epbrClassepbrNo

vlans (nxos.devices.configuration.interfaces)

Section titled “vlans (nxos.devices.configuration.interfaces)”
NameTypeConstraintMandatoryDefault Value
epbrClassepbrNo

subinterfaces (nxos.devices.configuration.interfaces.ethernets)

Section titled “subinterfaces (nxos.devices.configuration.interfaces.ethernets)”
NameTypeConstraintMandatoryDefault Value
epbrClassepbrNo

NameTypeConstraintMandatoryDefault Value
infra_vlansClassinfra_vlansNo
servicesListservicesNo
service_chainsListservice_chainsNo
failover_groupsListfailover_groupsNo
policiesListpoliciesNo

epbr (nxos.devices.configuration.interfaces.ethernets)

Section titled “epbr (nxos.devices.configuration.interfaces.ethernets)”
NameTypeConstraintMandatoryDefault Value
ip_policyStringNo
ip_policy_reverseStringNo
ipv6_policyStringNo
ipv6_policy_reverseStringNo
l2_policyStringNo
l2_policy_egress_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
l2_policy_egress_interface_idAnyString or Integer[min: 0]No
l2_policy_reverseStringNo
l2_policy_reverse_egress_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
l2_policy_reverse_egress_interface_idAnyString or Integer[min: 0]No

infra_vlans (nxos.devices.configuration.epbr)

Section titled “infra_vlans (nxos.devices.configuration.epbr)”
NameTypeConstraintMandatoryDefault Value
idsListInteger[min: 1, max: 4094]No
rangesListrangesNo

services (nxos.devices.configuration.epbr)

Section titled “services (nxos.devices.configuration.epbr)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
typeChoicel3, l2, l3-redirectNo
vrfStringNo
service_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
service_interface_idAnyString or Integer[min: 0]No
shutdownBooleantrue, falseNo
modeChoicefull-duplex, half-duplexNo
security_groupIntegermin: 0, max: 65535No
security_group_reverseIntegermin: 0, max: 65535No
hold_down_threshold_countIntegermin: 0, max: 10No
hold_down_threshold_timeIntegermin: 0, max: 86400No
thresholdIntegermin: 0, max: 100No
probeClassprobeNo
service_end_pointsListservice_end_pointsNo
service_end_point_interfacesListservice_end_point_interfacesNo

service_chains (nxos.devices.configuration.epbr)

Section titled “service_chains (nxos.devices.configuration.epbr)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
load_balance_methodChoicesrc-ip, dst-ip, src-dst-ipprotocolNo
mode_multisiteBooleantrue, falseNo
mode_multisite_failover_groupStringNo
sequencesListsequencesNo

failover_groups (nxos.devices.configuration.epbr)

Section titled “failover_groups (nxos.devices.configuration.epbr)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
service_chainsListservice_chainsNo

policies (nxos.devices.configuration.epbr)

Section titled “policies (nxos.devices.configuration.epbr)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
statisticsBooleantrue, falseNo
source_vrfStringNo
destination_vrfStringNo
default_traffic_actionChoiceredirect, redirect-allNo
matchesListmatchesNo

ranges (nxos.devices.configuration.epbr.infra_vlans)

Section titled “ranges (nxos.devices.configuration.epbr.infra_vlans)”
NameTypeConstraintMandatoryDefault Value
fromIntegermin: 1, max: 4094Yes
toIntegermin: 1, max: 4094Yes

probe (nxos.devices.configuration.epbr.services)

Section titled “probe (nxos.devices.configuration.epbr.services)”
NameTypeConstraintMandatoryDefault Value
protocolChoiceicmp, tcp, udp, http, dns, ctpNo
portIntegermin: 0, max: 65535No
http_getStringNo
http_versionChoice1.0, 1.1No
dns_hostStringNo
controlBooleantrue, falseNo
frequencyIntegermin: 0, max: 604800No
retry_down_countIntegermin: 0, max: 5No
retry_up_countIntegermin: 0, max: 5No
timeoutIntegermin: 0, max: 604800No
source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
source_interface_idAnyString or Integer[min: 0]No
reverse_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
reverse_interface_idAnyString or Integer[min: 0]No

service_end_points (nxos.devices.configuration.epbr.services)

Section titled “service_end_points (nxos.devices.configuration.epbr.services)”
NameTypeConstraintMandatoryDefault Value
ipIPYes
interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
interface_idAnyString or Integer[min: 0]No
shutdownBooleantrue, falseNo
hold_down_threshold_countIntegermin: 0, max: 10No
hold_down_threshold_timeIntegermin: 0, max: 86400No
modeChoiceprimary, hot-standbyNo
weightIntegermin: 1, max: 10No
probeClassprobeNo
reverseClassreverseNo

service_end_point_interfaces (nxos.devices.configuration.epbr.services)

Section titled “service_end_point_interfaces (nxos.devices.configuration.epbr.services)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniYes
interface_idAnyString or Integer[min: 0]Yes
probeClassprobeNo
reverseClassreverseNo

sequences (nxos.devices.configuration.epbr.service_chains)

Section titled “sequences (nxos.devices.configuration.epbr.service_chains)”
NameTypeConstraintMandatoryDefault Value
sequence_numberIntegermin: 1, max: 65535Yes
set_serviceStringYes
fail_actionChoicebypass, forward, dropNo
load_balance_methodChoicesrc-ip, dst-ip, src-dst-ipprotocolNo
actionChoiceredirect, routeNo
reverse_actionChoiceredirect, routeNo

service_chains (nxos.devices.configuration.epbr.failover_groups)

Section titled “service_chains (nxos.devices.configuration.epbr.failover_groups)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
preferenceIntegermin: 0, max: 255No

matches (nxos.devices.configuration.epbr.policies)

Section titled “matches (nxos.devices.configuration.epbr.policies)”
NameTypeConstraintMandatoryDefault Value
typeChoiceip, ipv6, l2Yes
addressStringYes
source_vrfStringNo
destination_vrfStringNo
dropBooleantrue, falseNo
excludeBooleantrue, falseNo
vlansClassvlansNo
load_balance_bucketsIntegermin: 0, max: 256No
load_balance_methodChoicesrc-ip, dst-ip, src-dst-ipprotocolNo
load_balance_mask_positionIntegermin: 0, max: 127No
sequencesListsequencesNo

probe (nxos.devices.configuration.epbr.services.service_end_points)

Section titled “probe (nxos.devices.configuration.epbr.services.service_end_points)”
NameTypeConstraintMandatoryDefault Value
protocolChoiceicmp, tcp, udp, http, dns, ctpNo
portIntegermin: 0, max: 65535No
http_getStringNo
http_versionChoice1.0, 1.1No
dns_hostStringNo
controlBooleantrue, falseNo
frequencyIntegermin: 0, max: 604800No
retry_down_countIntegermin: 0, max: 5No
retry_up_countIntegermin: 0, max: 5No
timeoutIntegermin: 0, max: 604800No
source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
source_interface_idAnyString or Integer[min: 0]No
reverse_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
reverse_interface_idAnyString or Integer[min: 0]No
trackIntegermin: 1, max: 512No

reverse (nxos.devices.configuration.epbr.services.service_end_points)

Section titled “reverse (nxos.devices.configuration.epbr.services.service_end_points)”
NameTypeConstraintMandatoryDefault Value
ipIPNo
interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
interface_idAnyString or Integer[min: 0]No
probeClassprobeNo

reverse (nxos.devices.configuration.epbr.services.service_end_point_interfaces)

Section titled “reverse (nxos.devices.configuration.epbr.services.service_end_point_interfaces)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
interface_idAnyString or Integer[min: 0]No
probeClassprobeNo

vlans (nxos.devices.configuration.epbr.policies.matches)

Section titled “vlans (nxos.devices.configuration.epbr.policies.matches)”
NameTypeConstraintMandatoryDefault Value
idsListInteger[min: 1, max: 4094]No
rangesListrangesNo

sequences (nxos.devices.configuration.epbr.policies.matches)

Section titled “sequences (nxos.devices.configuration.epbr.policies.matches)”
NameTypeConstraintMandatoryDefault Value
sequence_numberIntegermin: 1, max: 65535Yes
set_serviceStringYes
fail_actionChoicebypass, forward, dropNo

Example 1: Firewall service with two end-points, ICMP probing and a policy applied to an SVI

nxos:
devices:
- name: BORDER-LEAF1
configuration:
feature:
epbr: true
interface_vlan: true
vrfs:
- name: TENANT1
vlan:
vlans:
- id: 100
ip_access_lists:
- name: ACL-WEB
entries:
- sequence_number: 10
action: permit
protocol: tcp
source:
prefix: 10.10.0.0
prefix_length: 16
destination:
prefix: any
port_operator: eq
port_1: 443
epbr:
services:
- name: FIREWALL
vrf: TENANT1
probe:
protocol: icmp
frequency: 5
retry_down_count: 2
retry_up_count: 2
timeout: 3
service_end_points:
- ip: 10.100.0.11
reverse:
ip: 10.200.0.11
- ip: 10.100.0.12
mode: hot-standby
reverse:
ip: 10.200.0.12
policies:
- name: POL-WEB
statistics: true
matches:
- type: ip
address: ACL-WEB
sequences:
- sequence_number: 10
set_service: FIREWALL
fail_action: bypass
interfaces:
vlans:
- id: 100
vrf: TENANT1
epbr:
ip_policy: POL-WEB
ip_policy_reverse: POL-WEB

Example 2: Service chain through a firewall and an IPS with per-end-point probes, load balancing and a multisite failover group

nxos:
devices:
- name: BORDER-LEAF1
configuration:
feature:
epbr: true
tracks:
- id: 10
interface_type: loopback
interface_id: 10
interface_line_protocol: true
epbr:
infra_vlans:
ids: [3900]
services:
- name: FIREWALL
service_interface_type: vlan
service_interface_id: 3901
security_group: 100
security_group_reverse: 200
probe:
protocol: tcp
port: 80
control: true
frequency: 5
source_interface_type: loopback
source_interface_id: 10
reverse_interface_type: loopback
reverse_interface_id: 10
service_end_points:
- ip: 10.100.0.11
weight: 3
probe:
protocol: http
http_get: index.html
http_version: "1.1"
frequency: 60
timeout: 30
reverse:
ip: 10.200.0.11
probe:
track: 10
- name: IPS
probe:
protocol: udp
port: 53
service_end_points:
- ip: 10.110.0.11
interface_type: ethernet
interface_id: 1/10
probe:
protocol: dns
dns_host: www.example.com
service_chains:
- name: CHAIN-FW-IPS
load_balance_method: src-ip
mode_multisite: true
mode_multisite_failover_group: FG-DC2
sequences:
- sequence_number: 10
set_service: FIREWALL
load_balance_method: dst-ip
- sequence_number: 20
set_service: IPS
action: route
reverse_action: route
- name: CHAIN-DC2
mode_multisite: true
sequences:
- sequence_number: 10
set_service: FIREWALL
failover_groups:
- name: FG-DC2
service_chains:
- name: CHAIN-DC2
preference: 10

Example 3: IPv4 and IPv6 policies with VRF redirection, load-balance buckets, drop and exclude matches on a routed port

nxos:
devices:
- name: BORDER-LEAF1
configuration:
feature:
epbr: true
epbr:
services:
- name: LB
probe:
protocol: icmp
service_end_points:
- ip: 10.120.0.11
- name: LB-V6
probe:
protocol: icmp
service_end_points:
- ip: 2001:db8:120::11
policies:
- name: POL-APP
source_vrf: default
destination_vrf: default
matches:
- type: ip
address: ACL-APP
source_vrf: default
destination_vrf: default
load_balance_buckets: 8
load_balance_method: src-ip
load_balance_mask_position: 2
sequences:
- sequence_number: 10
set_service: LB
fail_action: drop
- type: ip
address: ACL-BLOCKED
drop: true
- type: ip
address: ACL-MGMT
exclude: true
- name: POL-APP-V6
matches:
- type: ipv6
address: ACL6-APP
sequences:
- sequence_number: 10
set_service: LB-V6
fail_action: bypass
interfaces:
ethernets:
- id: 1/11
switchport:
enabled: false
epbr:
ip_policy: POL-APP
ipv6_policy: POL-APP-V6

Example 4: Layer-2 service with interface end-points and a Layer-2 policy applied to a trunk with an egress interface

nxos:
devices:
- name: LEAF1
configuration:
feature:
epbr: true
epbr:
services:
- name: L2-FIREWALL
type: l2
mode: half-duplex
service_end_point_interfaces:
- interface_type: ethernet
interface_id: 1/12
probe:
protocol: ctp
frequency: 10
reverse:
interface_type: ethernet
interface_id: 1/13
probe:
protocol: ctp
policies:
- name: POL-L2
default_traffic_action: redirect-all
matches:
- type: l2
address: MAC-ACL-ALL
vlans:
ids: [200]
sequences:
- sequence_number: 10
set_service: L2-FIREWALL
interfaces:
ethernets:
- id: 1/20
switchport:
mode: trunk
epbr:
l2_policy: POL-L2
l2_policy_egress_interface_type: ethernet
l2_policy_egress_interface_id: 1/21