You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Summary

The Border Gateway Protocol (BGP) allows setting up an interdomain dynamic routing system that automatically updates routing tables of devices running BGP in case of network topology changes.

MikroTik RouterOS supports BGP Version 4, as defined in RFC 4271

Standards and Technologies:

  • RFC 4271 Border Gateway Protocol 4
  • RFC 4456 BGP Route Reflection
  • RFC 5065 Autonomous System Confederations for BGP
  • RFC 1997 BGP Communities Attribute
  • RFC 8092 BGP Large Communities
  • RFC 4360, 5668 BGP Extended Communities
  • RFC 2385 TCP MD5 Authentication for BGPv4
  • RFC 5492 Capabilities Advertisement with BGP-4
  • RFC 2918 Route Refresh Capability
  • RFC 4760 Multiprotocol Extensions for BGP-4
  • RFC 2545 Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing
  • RFC 4893 BGP Support for Four-octet AS Number Space


Property Reference

/routing/bgp/template

The template contains all BGP protocol related configuration options. It can be used as a template for dynamic peers and to apply similar configuration to a group of peers. Note that this is not the same as peer groups on Cisco devices, where the group is more than just a common configuration.

PropertyDescription
add-path-out (all
|none
; Default: )

address-families (ip | ipv6 | l2vpn | l2vpn-cisco | vpnv4; Default: ip)List of address families about which this peer will exchange routing information. The remote peer must support (they usually do) BGP capabilities optional parameter to negotiate any other families than IP.
allow-as-in (integer [0..10]; Default: )How many times to allow own AS number in AS-PATH, before discarding a prefix.
as (integer [0..4294967295]; Default: )32-bit BGP autonomous system number. Value can be entered in AS-Plain and AS-Dot formats.
as-override (yes | no; Default: no)If set, then all instances of remote peer's AS number in BGP AS PATH attribute are replaced with local AS number before sending route update to that peer. Happens before routing filters and prepending.
cisco-vpls-nlri-len-fmt (auto-bits | auto-bytes | bits | bytes; Default: )VPLS NLRI length format type. Used for compatibility with Cisco VPLS. [[Read more>>]].
cluster-id (IP address; Default: )In case this instance is a route reflector: cluster ID of the router reflector cluster this instance belongs to. This attribute helps to recognize routing updates that comes from another route reflector in this cluster and avoid routing information looping. Note that normally there is only one route reflector in a cluster; this case 'cluster-id' does not need to be configured and BGP router ID is used instead
default-originate (always | if-installed | never; Default: never)Specifies how to distribute default route
default-prepend (integer [0..255]; Default: )
disabled (yes | no; Default: no)Whether template is disabled.
hold-time (time[3s..1h] | infinity; Default: 3m)Specifies the BGP Hold Time value to use when negotiating with peers.

According to the BGP specification, if 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 actually used (note that the special value 0 or 'infinity' is lower than any other values)

  • infinity - never expire the connection and never send keepalive messages.
ignore-as-path-len (yes | no; Default: no)Whether to ignore AS_PATH attribute in BGP route selection algorithm
input - group of parameters associate with BGP input







.accept-comunities (string; Default: )Quick way to filter incoming updates with specific communities. If it is known that the update should be dropped before decoding it and sending to the routing filters, then this update can be dropped here. Main benefit is reduction of the memory usage, information form the update message will not be decoded and stored anywhere.
.accept-ext-communities(string; Default: )Quick way to filter incoming updates with specific extended communities. If it is known that the update should be dropped before decoding it and sending to the routing filters, then this update can be dropped here. Main benefit is reduction of the memory usage, information form the update message will not be decoded and stored anywhere.
.accept-large-comunities (string; Default: )Quick way to filter incoming updates with specific large communities. If it is known that the update should be dropped before decoding it and sending to the routing filters, then this update can be dropped here. Main benefit is reduction of the memory usage, information form the update message will not be decoded and stored anywhere.
.accept-nlri(string; Default: )Quick way to filter incoming updates with specific NLRIs. If it is known that the update should be dropped before decoding it and sending to the routing filters, then this update can be dropped here. Main benefit is reduction of the memory usage, information form the update message will not be decoded and stored anywhere.
.accept-unknown(string; Default: )Quick way to filter incoming updates with specific "unknown" attributes. If it is known that the update should be dropped before decoding it and sending to the routing filters, then this update can be dropped here. Main benefit is reduction of the memory usage, information form the update message will not be decoded and stored anywhere.
.affinity(afi  | alone | instance | main | remote-as | vrf; Default: )Configure input multicore processing. Read more in Routing Protocol Multi-core Support article.
.filter(name; Default: )Name of the routing filter chain to be used on input prefixes. Happens after NLRIs are processed. If the chain is not specified, then BGP by defaults accepts everything.
keepalive-time (time [1s..30m]; Default:3m )How long to keep BGP session open after the last received "keepalive" message.
multihop (yes | no; Default: no)Specifies whether the remote peer is more than one hop away.

This option affects outgoing nexthop selection as described in RFC 4271 (for EBGP only, excluding EBGP peers local to the confederation).

It also affects:

  • whether to accept connections from peers that are not in the same network (the remote address of the connection is used for this check);
  • whether to accept incoming routes with NEXT_HOP attribute that is not in the same network as the address used to establish the connection;
  • the target-scope of the routes installed from this peer; routes from multi-hop or IBGP peers resolve their nexthops through IGP routes by default.
name (string; Default: )Name of the BGP template
nexthop-choice (default | force-self | propagate; Default: default)Affects the outgoing NEXT_HOP attribute selection. Note that nexthops set in filters always takes precedence. Also note that nexthop is not changed on route reflection, expect when it's set in filter.
  • default - select the nexthop as described in RFC 4271
  • force-self - always use a local address of the interface that used to connect to the peer as the nexthop;
  • propagate - try to propagate further the nexthop received; i.e. if the route has BGP NEXT_HOP attribute, then use it as the nexthop, otherwise fall back to the default case
no-client-to-client-reflection (yes | no; Default: )Disable client to client route reflection in Route Reflector setups.
no-early-cut (yes | no; Default: )Early cut is the mechanism, to guess (based on default RFC behaviour) what would happen with the sent NPLRI when received by the remote peer. If the algorithm determines that the NLRI is going to be dropped, peer will not even try to send it. However such a behaviour may not be desired in specific scenarios, then then this option should be used to disable early cut feature.
output - group of parameters associate with BGP output

.affinity(afi  | alone | instance | main | remote-as | vrf; Default: )Configure output multicore processing. Read more in Routing Protocol Multi-core Support article.
.filter(name; Default: )Name of the routing filter chain to be used on output prefixes. If the chain is not specified, then BGP by defaults accepts everything.
.network(name; Default: )Name of the address list, used to send local networks. The network is sent only if matching IGP route exists in the routing table.
remove-private-as (yes | no; Default: no)If set, then BGP AS-PATH attribute is removed before sending out route update if attribute contains only private AS numbers.

removal process happens before routing filters are applied and before local AS number is prepended to the AS path.

router-id (IP | name; Default: main )

BGP Router ID to be used. Use the ID from the /routing/router-id configuration by specifying reference name, or set ID directly by specifying IP.

Equal router-ids are also used to group peers into one instance.

routing-table (string; Default: )Name of the routing table BGP connections operates on. By default always use the "main" routing table.
templates (name[,name]; Default: )List of template names from which to inherit parameters. Useful feature, to easily configure groups with overlapping configuration options.
use-bfd (yes | no; Default: no)Whether to use the BFD protocol for faster connection state detection.
vrf (name; Default: main )Name of the VRF, to install routes in.


/routing/bgp/connection

This menu is used to define BGP outgoing connections as well as listen on single or group of remote BGP peer connections.  In addition to connection specific parameters, template specific parameters are also directly exposed in this menu, for easier configuration in simple scenarios (when templates are not necessary).

PropertyDescription
name (string; Default: )Name of the BGP connection
connect (yes | no; Default: yes)Whether to allow router to initiate connection.
listen (yes | no; Default: yes)Whether to listen for incoming connections.
local - group of parameters associated with local side of the connection

.address (IPv4/6; Default: ::)Local connection address.

.port(integer [0..65535]; Default:179 )Local connection port.

.role(ebgp | ebgp-customer | ebgp-peer | ebgp-provider | ebgp-rs | ebgp-rs-client | ibgp | ibgp-rr | ibgp-rr-client; Default: )BGP role, defined by RFC.
remote - group of parameters associated with remote side of the connection



.address (IPv4/6; Default: ::)Remote address used to connect and/or listen to.
.port(integer [0..65535]; Default:179 )Local connection port.
.as(integer []; Default: )Remote AS number. If not specified BGP will determine remote AS automatically from the OPEN message.
.allow-as()List of remote AS number that are allowed to connect. Useful for dynamic peer configuration.
rx-min-ttl (integer [1..255]; Default:)Time To Live, the hop limit for TCP connection. For example, if 'ttl=1' then only single hop neighbours will be able to establish the connection. This property only affects EBGP peers.
tcp-md5-key (string; Default: )Key used to authenticate the connection with TCP MD5 signature as described in RFC 2385. If not specified, authentication is not used.
templates (name[,name]; Default: default)List of the template names, to inherit parameters from. Useful for dynamic BGP peers.
tx-ttl (integer [1..255]; Default:)Time To Live, the hop limit for TCP connection. For example, if 'ttl=1' then only single hop neighbours will be able to establish the connection. This property only affects EBGP peers.

/routing/bgp/session

This menu shows read-only cached BGP session information.

Even if BGP session is not active anymore, the cache can still be stored for some time. Routes received from particular session are removed only if cache expires, this allows to mitigate extensive routing table recalculations if BGP session is flapping.


/routing/bgp/vpn

PropertyDescription
disabled (yes | no; Default: )
export-filter (name; Default: )The name of the routing filter chain used to filter prefixes before exporting.
export-route-targets (rt[,rt]; Default: )Route targets to be added when exporting VPNv4 routes.
import-filter (integer [0..4294967295]; Default: )The name of the routing filter chain used to filter prefixes before importing.
import-route-targets (rt[,rt]; Default: )Import VPNv4 routes with matching route targets.
label-allocation-policy (per-prefix | per-vrf; Default: )
route-distinguisher (string; Default: )
vrf (name; Default: )Name of the VRF table to install routes to.

/routing/bgp/advertisements



Read only information about outgoing routing information currently advertised.

This information is calculated dynamically after 'print' command is issued. As a result, it may not correspond to the information that at the exact moment has been sent out. Especially if in case of slow connection, routing information prepared for output will spend long time in buffers. 'advertisements print' will show as things should be, not as they are!

Note: At the moment AS-PATH attribute for advertised routes is shown without prepends.



PropertyDescription
aggregator (IP)Advertised AGGREGATOR attribute value
as-path (string)Advertised AS_PATH attribute value
atomic-aggregate (yes | no)Advertised ATOMIC_AGGREGATE attribute value
bgp-ext-communities ()
cluster-list (string)Advertised CLUSTER_LIST attribute value
communities ()
local-pref (integer)Advertised LOCAL_PREF attribute value
med (integer)Advertised MULTI_EXIT_DISC attribute value
nexthop (IP | IPv6)Advertised NEXT_HOP attribute value
origin (igp | egp | incomplete)Advertised ORIGIN attribute value
originator-id (IP)Advertised ORIGINATOR_ID attribute value
peer (string)Name of the peer this information is advertised to
prefix (IPv4 | IPv6 prefix)Advertised NLRI prefix


  • No labels