RouterOS handleiding

Template



routing/bgp/template

Conditions: !smips Type: Directory

<ArgTableRow arg="*" typ="default">default</ArgTableRow> <ArgTableRow arg="X" typ="disabled">disabled</ArgTableRow> <ArgTableRow arg="I" typ="inactive">inactive</ArgTableRow>

<ArgTableRow arg="name" typ="string" mandatory="1"></ArgTableRow> <ArgTableRow arg="routing-table" typ="enum" unset="1">Name of the routing table, to install routes in. Overrides the instance parameter.</ArgTableRow> <ArgTableRow arg="vrf" typ="enum" unset="1">Name of the VRF BGP connections operate on. By default uses the "main" routing table.</ArgTableRow> <ArgTableRow arg="templates" typ="multi { template: enum }" unset="1">List of template names that will be used to inherit parameter values from. Useful feature, to easily configure groups with overlapping configuration options.</ArgTableRow> <ArgTableRow arg="as" typ="as" unset="1">A 32-bit BGP autonomous system number. The value accepts AS-Plain or AS-Dot formats. Override the instance ASN and configure BGP confederation using the following format: confederation_as/as. For example, if your AS is 34 and your confederation AS is 43, set as=43/34.</ArgTableRow> <ArgTableRow arg="nexthop-choice" typ="enum (default | force-self | propagate)" unset="1">Affect outgoing NEXT_HOP attribute selection. Next-hops set in filters always take precedence and are not changed on route reflection except when set in a filter. default - select the next-hop as described in RFC 4271 force-self - use the local address of the interface that connects to the peer as the next-hop propagate - propagate received next-hop; if the route has a BGP NEXT_HOP attribute, use it as the next-hop; otherwise, fall back to the default case</ArgTableRow> <ArgTableRow arg="multihop" typ="bool" unset="1">Enable when the remote peer is more than one hop away.This option affects outgoing next-hop selection as described in RFC 4271 (for eBGP only, excluding iBGP peers local to the confederation). It also affects:Whether to accept connections from peers not in the same network (the remote address of the connection is used for this check)Whether to accept incoming routes with a NEXT_HOP attribute not in the same network as the address used to establish the connectionThe target scope of routes installed from this peer; routes from multi-hop or iBGP peers resolve their next-hops through IGP routes by default</ArgTableRow> <ArgTableRow arg="hold-time" typ="alt { special: enum (infinity) { infinity:0 } , number: time [3 .. 65535] }" unset="1">Specifies the BGP Hold Time value to be used when negotiating with peers.According to the BGP specification, if the router does not receive successive KEEPALIVE and/or UPDATE and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the BGP connection to the peer will be closed.The minimal hold-time value of both peers will be used (note that the special value 0 or 'infinity' is lower than any other value)* infinity - never expire the connection and never send keepalive messages.</ArgTableRow> <ArgTableRow arg="keepalive-time" typ="time" unset="1">The interval between keepalive messages, if not set then by default keepalive is 1/3 of the hold-time.</ArgTableRow> <ArgTableRow arg="afi" typ="ubit (ip, ipv6, l2vpn, l2vpn-cisco, vpnv4, vpnv6, evpn)" unset="1">List of address families this peer can exchange routing information. The remote peer must support BGP capabilities optional parameter (they usually do) to negotiate any other address families than IP.</ArgTableRow> <ArgTableRow arg="cisco-vpls-nlri-len-fmt" typ="enum (auto-bits | auto-bytes | bits | bytes)" unset="1">VPLS NLRI length format type. Used for compatibility with Cisco VPLS. [[Read more>>]].</ArgTableRow> <ArgTableRow arg="output.remove-private-as" typ="bool" unset="1">If set, then the BGP AS-PATH attribute is removed before sending out route updates if the attribute contains only private AS numbers.The removal process happens before routing filters are applied and before the local, AS number is prepended to the AS path.</ArgTableRow> <ArgTableRow arg="output.as-override" typ="bool" unset="1">If set, then all instances of the remote peer's AS number in the BGP AS-PATH attribute are replaced with the local AS number before sending a route update to that peer. Happens before routing filters and prepend.</ArgTableRow> <ArgTableRow arg="use-bfd" typ="bool" unset="1">Whether to use the BFD protocol for faster connection state detection.</ArgTableRow> <ArgTableRow arg="save-to" typ="string" unset="1">Filename to save BGP protocol-specific packet content (Exported PDU) into pcap format. This method allows much simpler peer-specific packet capturing for debugging purposes.</ArgTableRow> <ArgTableRow arg="output.add-path" typ="ubit (ip, ipv6)" unset="1">Enable sending of additional paths for specified address families (BGP Addpath).</ArgTableRow> <ArgTableRow arg="output.affinity" typ="enum (main | alone | remote-as | instance | afi | vrf | input)" unset="1">Configure output multicore processing. Read more in Routing Protocol Multi-core Support article. alone - input and output of each session is processed in its own process, the most likely best option when there are a lot of cores and a lot of peers afi, instance, vrf, remote-as - try to run input/output of new session in process with similar parameters main - run input/output in the main process (could potentially increase performance on single-core even possibly on multicore devices with small amount of cores) input - run output in the same process as input (can be set only for output affinity)</ArgTableRow> <ArgTableRow arg="output.redistribute" typ="ubit (connected, static, rip, ospf, isis, bgp, vpn, dhcp, fantasy, modem, bgp-mpls-vpn, slaac)" unset="1">Enable redistribution of specified route types.</ArgTableRow> <ArgTableRow arg="output.filter-select" typ="enum" unset="1">Name of the routing select chain to be used for prefix selection. If not specified, then default selection is used.</ArgTableRow> <ArgTableRow arg="output.filter-chain" typ="enum" unset="1">Name of the routing filter chain to be used on the output prefixes. If the chain is not specified, then BGP by default accepts everything.</ArgTableRow> <ArgTableRow arg="output.network" typ="enum" unset="1">Name of the address list used to send local networks. The network is sent only if a matching IGP route exists in the routing table and its ORIGIN attribute is set to IGP, other distribution methods have ORIGIN attribute set to INCOMPLETE.</ArgTableRow> <ArgTableRow arg="output.network-blackhole" typ="bool" unset="1"></ArgTableRow> <ArgTableRow arg="output.default-originate" typ="enum (never | if-installed | always)" unset="1">Specifies default route (0.0.0.0/0) distribution method. 'if-installed' option can be used to distribute default route only if corresponding IGP route present in the routing table.</ArgTableRow> <ArgTableRow arg="output.default-prepend" typ="num" unset="1">How many times to prepend local ASN.</ArgTableRow> <ArgTableRow arg="output.no-client-to-client-reflection" typ="bool" unset="1">Disable client-to-client route reflection in Route Reflector setups.</ArgTableRow> <ArgTableRow arg="output.no-early-cut" typ="bool" unset="1">The early cut is the mechanism, to guess (based on default RFC behavior) what would happen with the sent NLRI when received by the remote peer. If the algorithm determines that the NLRI is going to be dropped, a peer will not even try to send it. However such behavior may not be desired in specific scenarios, then this option should be used to disable the early cut feature. Early cut works with eBGP sessions.</ArgTableRow> <ArgTableRow arg="output.keep-sent-attributes" typ="bool" unset="1">Store in memory sent prefix attributes, required for dump-saved-advertisements command to work. By default, sent-out prefixes are not stored to preserve the router's memory. An option should be enabled only for debugging purposes when necessary to see currently advertised prefixes.</ArgTableRow> <ArgTableRow arg="input.add-path" typ="ubit (ip, ipv6)" unset="1">Accept received additional paths (BGP Addpath) for specified address families.</ArgTableRow> <ArgTableRow arg="input.attr-error-handling" typ="enum (default | revised)"></ArgTableRow>

Configure input multi-core processing. Read more in Routing Protocol Multi-core Support article.

  • alone - input and output of each session are processed in its own process, most likely the best option when there are a lot of cores and a lot of peers.
  • afi, instance, vrf, remote-as - try to run input/output of new session in process with similar parameters.
  • main - run input/output in the main process (could potentially increase performance on single-core even possibly on multi-core devices with a small amount of cores).

<ArgTableRow arg="input.filter" typ="enum" unset="1">Name of the routing filter chain to be used on input prefixes. This happens after NLRIs are processed. If the chain is not specified, then BGP by default accepts everything.</ArgTableRow> <ArgTableRow arg="input.filter-nlri" typ="enum" unset="1">Name of the filter chain that will filter incoming IPv4/IPv6 NLRIs directly before they are  stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session restart.</ArgTableRow> <ArgTableRow arg="input.allow-as" typ="num" unset="1">Indicates how many times to allow your own AS number in AS-PATH, before discarding a prefix.</ArgTableRow> <ArgTableRow arg="input.accept-nlri" typ="enum" unset="1">Name of the ipv4/6 address-list. A quick way to filter incoming updates with specific NLRIs. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session restart.</ArgTableRow> <ArgTableRow arg="input.filter-communities" typ="enum" unset="1">A quick way to filter incoming updates with specific communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.filter-ext-communities" typ="enum" unset="1">A quick way to filter incoming updates with specific extended communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.filter-large-communities" typ="enum" unset="1">A quick way to filter incoming updates with specific large communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.accept-communities" typ="enum" unset="1">A quick way to filter incoming updates with specific communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.accept-ext-communities" typ="enum" unset="1">A quick way to filter incoming updates with specific extended communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.accept-large-communities" typ="enum" unset="1">A quick way to filter incoming updates with specific large communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.filter-unknown" typ="enum" unset="1">A quick way to filter incoming updates with specific "unknown" attributes. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.</ArgTableRow> <ArgTableRow arg="input.limit-process-routes-ipv4" typ="enum (10 | 100 | 1000 | 10000 | 100000 | 1000000 | 10000000) { 10:10, 100:100, 1000:1000, 10000:10000, 100000:100000, 1000000:1000000, 10000000:10000000 }" unset="1">Try to limit the amount of received IPv4 routes to the specified number. This number does not represent the exact number of routes going to be installed in the routing table by the peer. BGP session "clear" command must be used to reset the flag if the limit is reached.</ArgTableRow> <ArgTableRow arg="input.limit-process-routes-ipv6" typ="enum (10 | 100 | 1000 | 10000 | 100000 | 1000000 | 10000000) { 10:10, 100:100, 1000:1000, 10000:10000, 100000:100000, 1000000:1000000, 10000000:10000000 }" unset="1">Try to limit the amount of received IPv6 routes to the specified number. This number does not represent the exact number of routes going to be installed in the routing table by the peer. BGP session "clear" command must be used to reset the flag if the limit is reached.</ArgTableRow>

Bron

Bijgewerkt op 2026-08-22.