---
title: Route Map
slug: enterprise-v5p2/route-map
description: ip unicast routing
createdAt: 2025-11-14T03:58:43.498Z
---

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

**\[Command]**
**show route-map** *WORD*

**\[Purpose]**
Display data about each daemons knowledge of individual route-maps

**\[Parameter]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *WORD*        | route-map name  |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show route-map
```

### <font color="#1d50a2">clear route-map counters</font>

**\[Command]**
**clear route-map counters** *WORD*

**\[Purpose]**
Clear counters that are being stored about the route-map utilization so that subsuquent show commands will indicate since the last clear

**\[Parameter]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *WORD*        | route-map name  |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
```

### <font color="#1d50a2">show ip prefix-list</font>

**\[Command]**
**show ip prefix-list \{detail|summary|** *NAME* **}**

**\[Purpose]**
Display the IP prefix list

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show ip prefix-list summary
Prefix-list with the last deletion/insertion: test
ZEBRA: ip prefix-list test:
  count: 1, range entries: 0, sequences: 1 - 1
Prefix-list with the last deletion/insertion: test
OSPF: ip prefix-list test:
  count: 1, range entries: 0, sequences: 1 - 1
Prefix-list with the last deletion/insertion: test
BGP: ip prefix-list test:
  count: 1, range entries: 0, sequences: 1 - 1
Prefix-list with the last deletion/insertion: test
ISIS: ip prefix-list test:
  count: 1, range entries: 0, sequences: 1 - 1
```

### <font color="#1d50a2">bgp as-path access-list</font>

**\[Command]**
**bgp as-path access-list** *WORD* **\{permit|deny}** *LINE*
**no bgp as-path access-list** *WORD* **\{permit|deny}** *LINE*

**\[Purpose]**
Configure route filtering policies based on AS path lists

**\[Parameter]**

| **Parameter** | **Description**                                                                    |
| ------------- | ---------------------------------------------------------------------------------- |
| *WORD*        | Access-list name                                                                   |
| *LINE*        | Regular-expression (1234567890\_^\|\[, \{}() ]$\*+.?-\\) to match the BGP AS paths |

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bgp as-path access-list s permit 66
```

### <font color="#1d50a2">bgp large-community-list</font>

**\[Command]**
**bgp large-community-list \{standard|expanded}** *NAME* **\{permit|deny}** *LARGE-COMMUNITY*
**no bgp large-community-list \{standard|expanded}** *NAME*  **\{permit|deny}** *LARGE-COMMUNITY*

**\[Purpose]**
This command defines a new standard large-community-list

**\[Parameter]**

| **Parameter**     | **Description**                        |
| ----------------- | -------------------------------------- |
| *Standard*        | Standard community list                |
| *Expanded*        | Expanded community list                |
| *NAME*            | Community list name                    |
| *LARGE-COMMUNITY* | large community in 'aa\:bb\:cc' format |

**\[View]**
System configuration view

**\[Notes]**
When filtering BGP large community attributes, you can configure multiple filter criteria within the same entry. The relationship between filter criteria is "AND," which means all filter criteria must be matched for the rule to be considered a match. For example, with the command "**bgp large-community-list standard test 10 permit 100:1**:&#x31;**&#x20;200:1**:&#x31;**&#x20;300:1**:1," the rule will be considered a match only when all three large community values (100:1:1, 200:1:1, and 300:1:1) are simultaneously present.
Within a single list, multiple rules have an "OR" relationship. For example, with the commands "**bgp large-community-list standard test 10 permit 100:1**:1" and "bgp large-community-list standard test 20 permit 200:1:1," when searching for rules within the "test" group, matching either 100:1:1 or 200:1:1 will be considered a match.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bgp large-community-list standard as permit aa:bb:cc
```

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

**\[Command]**
**route-map** *WORD* **\{permit|deny}** *ORDER*
**no route-map** *WORD* **\{permit|deny}** *ORDER*

**\[Purpose]**
Configure the order’th entry in route-map-name with Match Policy of either permit or deny

**\[Parameter]**

| **Parameter** | **Description**                                                       |
| ------------- | --------------------------------------------------------------------- |
| *WORD*        | route-map name                                                        |
| *ORDER*       | Sequence to insert to/delete from existing route-map entry (1..65535) |

**\[Notes]**
This command unconfigures the order entry in the routing table name.

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
```

### <font color="#1d50a2">ip prefix</font>

**\[Command]**
**ip prefix** *NAME*&#x20;
**no ip prefix** *NAME*  \[**seq** *number* **] \{permit|deny} \{any|** *A.B.C.D/M* **\{ge|le}** *length* **}**

**\[Purpose]**
Configures an IP prefix list or one entry in the IP prefix list

**\[Parameter]**

| **Parameter** | **Description**                                                                                                                                                                                                                                                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *NAME*        | Specifies the name of an IP prefix list                                                                                                                                                                                                                                                                 |
| *number*      | Specifies the sequence number of the entry in the IP prefix list. The value is an integer ranging from 1 to 4294967295, By default, the sequence number increases with a step of 5 according to the configuration order, and the first number is 1                                                      |
| permit        | Specifies the matching mode of the IP prefix list as permit. In permit mode, if the IP address to be filtered is in the defined prefix range, the IP address matches the route-policy and no longer matches against the next entry. Otherwise, the IP address continues to match against the next entry |
| deny          | Specifies the matching mode of the IP prefix list as deny. In deny mode, if the IP address to be filtered is in the defined prefix range, the IP address fails to match the route-policy and cannot match against the next entry. Otherwise, the IP address continues to match against the next entry   |
| any           | All IP address                                                                                                                                                                                                                                                                                          |
| *A.B.C.D/*    | Specifies the IP address                                                                                                                                                                                                                                                                                |
| ge length     | Specifies the minimum value of the mask length range                                                                                                                                                                                                                                                    |
| le length     | Specifies the maximum value of the mask length range                                                                                                                                                                                                                                                    |

**\[Notes]**
An IP prefix list can be used as a filter or as filtering conditions of a route-map
The matching principle of table entries in the address prefix list is: match according to the ordinal ID from smallest to largest, and no other table entries will be matched after the filtered route hits a certain table entry, and the route that cannot match any table entry is deemed to have failed the filter and will not enter any subsequent processing

**\[View]**
System config view

**\[Use Cases]**

```plaintext
sonic(config)# ip prefix-list test permit 1.1.1.0/24 ge 32
```

### <font color="#1d50a2">match \{ip|ipv6\} address</font>

**\[Command]**
**match \{ip|ipv6} address \{prefix-len** *LENGTH* **|prefix-list** *PREFIX-LIST-NAME* **}**
**no match \{ip|ipv6} address \{prefix-len** *LENGTH* **|prefix-list** *PREFIX-LIST-NAME* **}**

**\[Purpose]**
Matches the specified prefix-list

**\[Parameter]**

| **Parameter**      | **Description**                   |
| ------------------ | --------------------------------- |
| *LENGTH*           | Match prefix length of IP address |
| *PREFIX-LIST-NAME* | Match entries of prefix-lists     |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match ip address prefix-list test
```

### <font color="#1d50a2">match \{ip|ipv6\} next-hop</font>

**\[Command]**
**match \{ip|ipv6} next-hop \{prefix-len** *LENGTH* **|prefix-list** *PREFIX-LIST-NAME* **|address\{** *A.B.C.D* **|** *X\:X\::X*:X **}|type blackhole}no match \{ip|ipv6} next-hop \{prefix-len** *LENGTH* **|prefix-list** *PREFIX-LISTNAME* **|address\{** *A.B.C.D* **|** *X\:X\::X*:X **}|type blackhole}**

**\[Purpose]**
Match the next-hop

**\[Parameter]**

| **Parameter**      | **Description**                   |
| ------------------ | --------------------------------- |
| *LENGTH*           | Match prefix length of IP address |
| *PREFIX-LIST-NAME* | Match entries of prefix-lists     |
| *A.B.C.D*          | IP address of next-hop            |
| *X\:X\::X*:X       | IPv6 address of next-hop          |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match ip next-hop type blackhole
```

### <font color="#1d50a2">match as-path</font>

**\[Command]**
**match as-path** *String*
**no match as-path** *String*

**\[Purpose]**
Matches the specified as\_path.

**\[Parameter]**

| **Parameter** | **Description**          |
| ------------- | ------------------------ |
| *String*      | AS path access-list name |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match as-path test
```

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

**\[Command]**
**match metric** *metric*
**no match metric** *metric*

**\[Purpose]**
Matches the specified metric.

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *METRIC*      | value (0..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match metric 12
```

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

**\[Command]**
**match tag** *TAG*
**no match tag** *TAG*

**\[Purpose]**
Matches the specified tag value associated with the route.

**\[Parameter]**

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| *TAG*         | Tag value (1..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match tag 12
```

### <font color="#1d50a2">match local-preference</font>

**\[Command]**
**match local-preference** *metric*
**no match local-preference** *metric*

**\[Purpose]**
Matches the specified local-preference.

**\[Parameter]**

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| *METRIC*      | Metric value (0..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match local-preference 12
```

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

**\[Command]**
**match community** *COMMUNITY-LIST*
**no math community** *COMMUNITY-LIST*

**\[Purpose]**
Matches the specified community\_list.

**\[Parameter]**

| **Parameter**    | **Description**     |
| ---------------- | ------------------- |
| *COMMUNITY-LIST* | Community-list name |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match community test
```

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

**\[Command]**
**match peer \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *INTERACE\_NAME* **}**
**no match peer \{** *A.B.C.D* **|** *X\:X\::X*:X **|** *INTERACE\_NAME* **}**

**\[Purpose]**
This is a BGP specific match command. Matches the peer ipv6 address if the neighbor was specified in this manner.

**\[Parameter]**

| **Parameter**    | **Description**        |
| ---------------- | ---------------------- |
| *A.B.C.D*        | IP address of peer     |
| *X\:X\::X*:X     | IPv6 address of peer   |
| *INTERACE\_NAME* | Interface name of peer |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match peer 1.1.1.1
```

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

**\[Command]**
**match peer local**
**no match peer local**

**\[Purpose]**
Matches the peer static or redistributed routes.

**\[Notes]**
This command unmatches peer-to-peer static or redistributed routes.

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match peer local
```

### <font color="#1d50a2">match source-protocol</font>

**\[Command]**
**match source-protocol \{kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|sharp|openfabric}**
**no match source-protocol \{kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|eigrp|nhrp|table|vnc|babel|sharp|openfabric}**

**\[Purpose]**
This is a ZEBRA specific match command. Matches the originating protocol specified.

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match source-protocol static l
```

### <font color="#1d50a2">match source-instance</font>

**\[Command]**
**match source-instance** *INSTANCE*
**no match source-instance** *INSTANCE*

**\[Purpose]**
This is a ZEBRA specific match command.

**\[Parameter]**

| **Parameter** | **Description**              |
| ------------- | ---------------------------- |
| *INSTANCE*    | The instance number (0..255) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# match source-instance 2
```

### <font color="#1d50a2">match evpn route-type </font>

**\[Command]**
**match evpn route-type \{macip|multicast|prefix}**
**no match evpn route-type \{macip|multicast|prefix}**

**\[Purpose]**
Match the specified EVPN route type.

**\[Parameter]**

| **Parameter**  | **Description**       |
| -------------- | --------------------- |
| macip					     | EVPN Type2 route					 |
| multicast					 | EVPN Type3 route					 |
| prefix         | EVPN Type5 route					 |

**\[View]&#x20;**&#xA;Route-map View

**\[Use Cases]**

```none
sonic(config)# route-map a permit 10
sonic(config-route-map)# match evpn route-type macip
```







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

**\[Command]**
**set tag** *TAG*
**no set tag** *TAG*

**\[Purpose]**
Set a tag on the matched route.

**\[Parameter]**

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| *TAG*         | Tag value (1..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set tag 12
```

### <font color="#1d50a2">set ip next-hop</font>

**\[Command]**
**set ip next-hop** *A.B.C.D*
**no set ip next-hop** *A.B.C.D*

**\[Purpose]**
Set the BGP nexthop address

**\[Parameter]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| *A.B.C.D*     | IP address      |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ip next-hop 1.1.1.1
```

### <font color="#1d50a2">set ip next-hop peer-address</font>

**\[Command]**
**set ip next-hop peer-address**
**no set ip next-hop peer-address**

**\[Purpose]**
Set the BGP nexthop address to the address of the peer

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ip next-hop peer-address
```

### <font color="#1d50a2">set ip next-hop unchanged</font>

**\[Command]**
**set ip next-hop unchanged**
**no set ip next-hop unchanged**

**\[Purpose]**
Set the route-map as unchanged

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ip next-hop unchanged
```

### <font color="#1d50a2">set ipv6 next-hop peer-address</font>

**\[Command]**
**set ipv6 next-hop peer-address**
**no set ipv6 next-hop peer-address**

**\[Purpose]**
Set the BGP nexthop address to the address of the peer.

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ipv6 next-hop peer-address
```

### <font color="#1d50a2">set ipv6 next-hop prefer-global</font>

**\[Command]**
**set ipv6 next-hop prefer-global**
**no set ipv6 next-hop prefer-global**

**\[Purpose]**
For Incoming and Import Route-maps if we receive a v6 global and v6 LL address for the route, then prefer to use the global address as the nexthop.

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ipv6 next-hop prefer-global
```

### <font color="#1d50a2">set ipv6 next-hop global</font>

**\[Command]**
**set ipv6 next-hop global** *X\:X\::X*:X
**no set ipv6 next-hop global** *X\:X\::X*:X

**\[Purpose]**
Set the next-hop to the specified IPV6\_ADDRESS for both incoming and outgoing route-maps.

**\[Parameter]**

| **Parameter** | **Description**          |
| ------------- | ------------------------ |
| *X\:X\::X*:X  | IPv6 address of next hop |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ipv6 next-hop global 100::1
```

### <font color="#1d50a2">set ipv6 next-hop local</font>

**\[Command]**
**set ipv6 next-hop local** *X\:X\::X*:X
**no set ipv6 next-hop local** *X\:X\::X*:X

**\[Purpose]**
Set the BGP-4+ link local IPv6 nexthop address.

**\[Parameter]**

| **Parameter** | **Description**          |
| ------------- | ------------------------ |
| *X\:X\::X*:X  | IPv6 address of next hop |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set ipv6 next-hop local 100::1
```

### <font color="#1d50a2">set local-preference</font>

**\[Command]**
**set local-preference** *PREFERENCE*
**no set local-preference** *PREFERENCE*

**\[Purpose]**
Subtract the BGP local preference.

**\[Parameter]**

| **Parameter** | **Description**                 |
| ------------- | ------------------------------- |
| *PREFERENCE*  | Preference value (0-4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set local-preference 12
```

###

**\[Command]**
**set distance** *DISTANCE*
**no set distance** *DISTANCE*

**\[Purpose]**
Set the administrative distance

**\[Parameter]**

| **Parameter** | **Description**         |
| ------------- | ----------------------- |
| *DISTANCE*    | Distance value (0..255) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set distance 12
```

###

**\[Command]**
**set weight** *WEIGHT*
**no set weight** *WEIGHT*

**\[Purpose]**
Set the route’s weight.

**\[Parameter]**

| **Parameter** | **Description**       |
| ------------- | --------------------- |
| *WEIGHT*      | value (0..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set weight 12
```

###

**\[Command]**
**set metric \{** *metric* **|rtt|+rtt|-rtt>}**
**no set metric \{** *metric* **|rtt|+rtt|-rtt>}**

**\[Purpose]**
Set the BGP attribute MED to a specific value.

**\[Parameter]**

| **Parameter** | **Description**        |
| ------------- | ---------------------- |
| *METRIC*      | 2147483647..2147483647 |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set metric 12
```

### <font color="#1d50a2">set as-path prepend</font>

**\[Command]**
**set as-path prepend** \[ AS\_PATH\* ] \[**last-as** *NUMBER* **]**
**no set as-path prepend** \[ *AS\_PATH* ] \[**last-as** *NUMBER* **]**

**\[Purpose]**
Set the BGP AS path to prepend.

**\[Parameter]**

| **Parameter** | **Description**                   |
| ------------- | --------------------------------- |
| *AS\_PATH*    | AS number (1..4294967295)         |
| *NUMBER*      | Number of times to insert (1..10) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set as-path prepend 12
```

### <font color="#1d50a2">set as-path exclude</font>

**\[Command]**
**set as-path exclude** \[ *AS\_NUMBER* ]
**no set as-path exclude** \[ *AS\_NUMBER* ]

**\[Purpose]**
Drop AS-NUMBER from the BGP AS path.

**\[Parameter]**

| **Parameter** | **Description**           |
| ------------- | ------------------------- |
| *AS\_NUMBER*  | AS number (1..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set as-path exclude 12
```

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

**\[Command]**
**set community** \[ *COMMUNITY* ]
**no set community** \[ *COMMUNITY* ]

**\[Purpose]**
Set the BGP community attribute.

**\[Parameter]**

| **Parameter** | **Description**                                                               |
| ------------- | ----------------------------------------------------------------------------- |
| *COMMUNITY*   | Community number in AA\:NN format (where AA and NN are (0-65535)) or local-AS |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set community 12
```

### <font color="#1d50a2">set origin \{egp|igp|incomplete\}</font>

**\[Command]**
**set origin \{egp|igp|incomplete}**
**no set origin \{egp|igp|incomplete}**

**\[Purpose]**
Set BGP route origin.

**\[Notes]**
This command cancels the BGP route origin setting.

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set origin igp
```

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

**\[Command]**
**set table** *TABLEID*
**no set table** *TABLEID*

**\[Purpose]**
Set the BGP table to a given table identifier.

**\[Parameter]**

| **Parameter** | **Description**                         |
| ------------- | --------------------------------------- |
| *TABLEID*     | Kernel routing table id (1..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set table 12
```

### <font color="#1d50a2">set sr-te color</font>

**\[Command]**
**set sr-te color** *COLOR*
**no set sr-te color** *COLOR*

**\[Purpose]**
Set the color of a SR-TE Policy to be applied to a learned route.

**\[Parameter]**

| **Parameter** | **Description**                                           |
| ------------- | --------------------------------------------------------- |
| *COLOR*       | Color of the SR-TE Policies to match with (1..4294967295) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# set sr-te color 12
```

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

**\[Command]**
**on-match \{goto** *NUMBER* **|next}**
**no on-match \{goto** *NUMBER* **|next}**

**\[Purpose]**
Proceed on to the next entry in the route-map

**\[Parameter]**

| **Parameter** | **Description**   |
| ------------- | ----------------- |
| *NUMBER*      | Number (1..65535) |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic# clear route-map counters
sonic(config)# route-map test permit 233
sonic(config-route-map)# on-match next
```

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

**\[Command]**
**set src** *ip\_address*

**\[Purpose]**
Set the preferred source address for matching routes when installing in the kernel

**\[Parameter]**

| **Parameter** | **Description**   |
| ------------- | ----------------- |
| *ip\_address* | IPv4/IPv6 address |

**\[View]**
Route-map view

**\[Use Cases]**

```plaintext
sonic(config)# route-map RM_SET_SRC permit 10
sonic(config-route-map)# set src 30.11.0.48
```

### <font color="#1d50a2">ip protocol</font>

**\[Command]**
**ip protocol** *protocol* **route-map** *routemap*

**\[Purpose]**
Filter which routes will install in the kernel

**\[Parameter]**

| **Parameter** | **Description**                               |
| ------------- | --------------------------------------------- |
| *protocol*    | kernel/connected/static/rip/ospf/isis/bgp/any |
| *routemap*    | router map name                               |

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic(config)# ip protocol bgp route-map RM_SET_SRC
```

