---
title: Policy Route Configuration
slug: enterprise-v6p1/cmGK-policy-route-configuration
createdAt: 2026-03-19T06:54:19.521Z
---

### <font color="#1d50a2">show pbr interface</font>

**\[Command]**
**show pbr interface** \[ *interface-name* ]

**\[Purpose]**
View the binding relationship between interfaces and policy routes

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show pbr interface Ethernet30
Ethernet30(38) with pbr-policy TEST
```

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

**\[Command]**
**show pbr map \[map-name]**

**\[Purpose]**
Display the configured policy routes

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show pbr map
pbr-map TEST valid: no
  Seq: 10 rule: 309
    Installed: no Reason: Invalid NH
    SRC Match: 10.255.255.0/30
    nexthop 10.254.254.1
     Installed: no Tableid: 10000
```

### <font color="#1d50a2">show pbr nexthop-groups</font>

**\[Command]**
**show pbr nexthop-groups**

**\[Purpose]**
Displays the next address group for the policy route

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show pbr nexthop-groups
Nexthop-Group: TEST Table: 10001 Valid: 1 Installed: 1
   Valid: 0 nexthop Ethernet32
   Valid: 1 nexthop Ethernet31
```

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

**\[Command]**
**pbr-map** *NAME*  **seq** *number*
**no pbr-map** *NAME*  **\[seq** *number* **]**

**\[Purpose]**
Create a policy route and enter the view

**\[Parameter]**

| **Parameter** | **Description**                                                              |
| ------------- | ---------------------------------------------------------------------------- |
| *name*        | Specify the policy name                                                      |
| *number*      | Policy ID, value range: 1-700, the lower the number, the higher the priority |

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic(config)# pbr-map TEST seq 10
sonic(config-pbr-map)#
```

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

**\[Command]**
**match \{dst-ip** *ip-address* **|dst-port** *port* **|ip-protocol** *protocol* **|src-ip** *ip-address* **|src-port** *port* **}**
**no match \{dst-ip** *ip-address* **|dst-port** *port* **|ip-protocol** *protocol* **|src-ip** *ip-address* **|src-port** *port* **}**

**\[Purpose]**
Create match conditions for policy routing

**\[Parameter]**

| **Parameter** | **Description**                                |
| ------------- | ---------------------------------------------- |
| *dst-ip*      | Match the destination IP address of the packet |
| *dst-port*    | Match the destination port of the packet       |
| *ip-protocol* | Match the protocol type of the packet          |
| *src-ip*      | Match the source IP address of the packet      |
| *src-port*    | Match the source port of the packet            |

**\[View]**
Policy route view

**\[Use Cases]**

```plaintext
sonic(config)# pbr-map TEST seq 10
sonic(config-pbr-map)# match src-ip 1.1.1.0/24
```

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

**\[Command]**
**set \{nexthop** *ip-address* **|nexthop-group** *NAME* **}**
**no set \{nexthop** *ip-address* **|nexthop-group** *NAME*  **}**

**\[Purpose]**
Configure an action of redirecting packets to a next-hop IP address

**\[Parameter]**

| **Parameter**        | **Description**    |
| -------------------- | ------------------ |
| *nexthop ip-address* | Nexthop ip address |
| *nexthop-group name* | Nexthop group name |

**\[View]**
Policy route view

**\[Notes]**
The redirect nexthop command allows user to specify a maximum of 4 next-hop IP addresses. If multiple next-hop IP addresses are configured, the device redirects packets in active/standby mode. The device determines the primary link and backup links according to the sequence in which next-hop IP addresses were configured. The next-hop IP address that was configured first has the highest priority and this next hop is used as the primary path. Other next hops are used as backup paths. When the primary link becomes Down, a next hop with higher priority is used as the primary path.

**\[Use Cases]**

```plaintext
sonic(config)# nexthop-group TEST
sonic(config-pbr-map)# set nexthop 1.1.1.0/24
```

### <font color="#1d50a2">nexthop-group</font>

**\[Command]**
**nexthop-group** *NAME*&#x20;
**no nexthop-group** *NAME*&#x20;

**\[Purpose]**
Create a next-hop address group and enter the view

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic(config)# nexthop-group TEST
sonic(config-nh-group)#
```

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

**\[Command]**
**nexthop** *ip\_address*
**no nexthop** *ip\_address*

**\[Purpose]**
Configure the member addresses in the next-hop address group

**\[View]**
Nexthop group view

**\[Notes]**
If multiple next-hop IP addresses are specified, the device redirects packets in ECMP load balancing mode

**\[Use Cases]**

```plaintext
sonic(config)# nexthop-group TEST
sonic(config-nh-group)# nexthop 1.1.1.0/24
sonic(config-nh-group)# nexthop 1.1.2.0/24
```

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

**\[Command]**
**pbr-policy** *NAME*&#x20;
**no pbr-policy** *NAME*&#x20;

**\[Purpose]**
Bind the policy route to the specified interface

**\[View]**
Interface view

**\[Use Cases]**

```plaintext
sonic(config)# interface ethernet 1
sonic(config-if-1)# pbr-policy TEST
```

