To configure a BGP peer to inherit peer configuration parameters from a peer template, use the neighbor inherit peer command. Neighbor session and policy parameters can be configured once in a peer template and inherited by multiple neighbors, eliminating the need to configure the same parameters for each neighbor. Parameters are inherited from the peer template specified and from any templates it inherits from. A neighbor can inherit directly from only one peer template.
| Default | No peer configuration parameters are inherited by default. |
| Format | neighbor {ip-address | ipv6-address [interface interface-name] autodetect interface interface-name} inherit peer template-name |
| Mode | BGP Router Config |
| Parameter | Description |
|---|---|
| ip-address | The IP address of a neighbor whose configuration parameters are inherited from the peer template. |
| ipv6-address [interface interface-name] | The neighbor's IPv6 address. if the neighbor's IPv6 address is a link local address, the local interface must be specified. |
| autodetect interface interface-name | The routing interface on which the neighbor's link local IPv6 address is auto-detected. |
| template-name | The name of the peer template whose peer configuration parameters are to be inherited by this neighbor. |
Example: The following shows an example of the command.
(R1) (Config)# router bgp 65000 (R1) (Config-router)# neighbor 172.20.1.2 remote-as 65001 (R1) (Config-router)# neighbor 172.20.2.2 remote-as 65001 (R1) (Config-router)# template peer AGGR (R1) (Config-rtr-tmp)# timers 3 9 (R1) (Config-rtr-tmp)# address-family ipv4 (R1) (Config-rtr-tmp-af)# send-community (R1) (Config-rtr-tmp-af)# route-map RM4-IN in (R1) (Config-rtr-tmp-af)# route-map RM4-OUT out (R1) (Config-rtr-tmp-af)# exit (R1) (Config-rtr-tmp)# exit (R1) (Config-router)# neighbor 172.20.1.2 inherit peer AGGR (R1) (Config-router)# neighbor 172.20.2.2 inherit peer AGGR