set origin

To set the Border Gateway Protocol (BGP) origin code, use the set origin command. To delete the entry, use the no form of this command.

set origin { egp as-num [: as-num ] | igp | incomplete }

no set origin

Syntax Description

egp as-num
Specifies the autonomous system (AS) number for a remote exterior gateway protocol (EGP) system. You can specify the AS number as a 2-byte integer or a 4-byte integer in aa:nn format. Range is from 1 to 65535.
Specifies a local interior gateway protocol (IGP) system.
Specifies an unknown heritage.

Command Default

Default origin, based on route in main IP routing table.

Command Modes

Route-map configuration mode

Command History

This command was introduced.

Usage Guidelines

You must have a match clause (even if it points to a “permit everything” list) if you want to set tags.

Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The set route-map configuration commands specify the redistribution set actions to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.


This example shows how to set the origin of routes that pass the route map to IGP:

switch# configure terminal
switch(config)# route-map set_origin
switch(config-route-map)# match as-path 10
switch(config-route-map)# set origin igp

Related Commands

match as-path
Matches a BGP autonomous system path access list.
Defines the conditions for redistributing routes from one routing protocol into another.
show ip community-list
Displays information about a community list.
show ip extcommunity-list
Displays information about an extended community list.
show ip prefix-list
Displays information about IPv4 prefix lists.
show route-map
Displays information about a route map.