100% found this document useful (1 vote)
354 views3 pages

BGP Commands-Cisco VS Mikrotik

The document compares common BGP commands in Cisco IOS and MikroTik RouterOS. Some key similarities and differences are: - Both platforms allow viewing peer and route information, refreshing peers, and forcing resends without tearing down peering sessions - MikroTik routers keep all routes in the routing table with a distinction for active/inactive, while Cisco separates active and inactive BGP routes - Basic BGP configuration in MikroTik involves setting the AS number, adding peers, and advertising networks

Uploaded by

accesstelnetwork
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
354 views3 pages

BGP Commands-Cisco VS Mikrotik

The document compares common BGP commands in Cisco IOS and MikroTik RouterOS. Some key similarities and differences are: - Both platforms allow viewing peer and route information, refreshing peers, and forcing resends without tearing down peering sessions - MikroTik routers keep all routes in the routing table with a distinction for active/inactive, while Cisco separates active and inactive BGP routes - Basic BGP configuration in MikroTik involves setting the AS number, adding peers, and advertising networks

Uploaded by

accesstelnetwork
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BGP Commands

Cisco Command MikroTik Command

show ip bgp summary routing bgp peer print brief

show ip bgp neighbor routing bgp peer print status

show ip bgp neighbor 1.1.1.1 advertised- routing bgp advertisements print peer=peer_name
routes

show ip bgp neighbor 1.1.1.1 received- ip route print where received-from=peer_name


routes

show ip route bgp ip route print where bgp=yes

clear ip bgp 172.31.254.2 soft in routing bgp peer refresh peer1

clear ip bgp 172.31.254.2 soft out routing bgp peer resend peer1

BGP-Cisco(config)#router bgp 1 /routing bgp instance


set default as=2

BGP-Cisco(config-router)#neighbor /routing bgp peer


172.31.254.2 remote-as 2 add name=peer1 remote-address=172.31.254.1
remote-as=1

BGP-Cisco(config-router)#network /routing bgp network


100.99.98.0 mask 255.255.255.0 add network=100.89.88.0/24
BGP-Cisco(config-router)#network add network=100.89.87.0/24
100.99.97.0 mask 255.255.255.0 add network=100.89.86.0/24
BGP-Cisco(config-router)#network
100.99.96.0 mask 255.255.255.0

BGP-Cisco(config)#router bgp 1 /routing bgp peer


BGP-Cisco(config-router)#neighbor add default-originate=always name=peer1 remote-
172.31.254.2 default-originate address=172.31.254.1 remote-as=1

Examples of the MikroTik RouterOS commands from the table above

[admin@BGP-MikroTik] > routing bgp peer print brief

This is a quick way to get a list of peers/AS and their status


[admin@BGP-MikroTik] > routing bgp peer print status

This is a command that will give you more detailed information about a BGP peer including MD5
auth, timers, prefixes received and the state of the peering as well as other info.

[admin@BGP-MikroTik] > routing bgp advertisements print peer=peer_name

This will allow you to see what BGP prefixes are actually being advertised to a peer and the
nexthop that will be advertised

[admin@BGP-MikroTik] > ip route print where received-from=peer_name

This will allow you to see what BGP prefixes are actually being received from a peer and the
nexthop that will be advertised

[admin@BGP-MikroTik] > ip route print where bgp=yes

This will allow you to see what all BGP prefixes that are in the routing table – both active and not.
This is a slight difference between Cisco and MikroTik since Cisco keeps BGP routes that aren’t in
the routing table in the bgp table, whereas MikroTik routers keep all routes in the routing table
with a distinction between active and not.

[admin@BGP-MikroTik] > routing bgp peer refresh peer_name

This will allow you to force the BGP peer to resend all prefixes without tearing down the peering
– similar to a soft clear in Cisco IOS.
[admin@BGP-MikroTik] > routing bgp peer resend peer_name

This will allow you to force RouterOS to resend all prefixes to the peer without tearing down the
peering – similar to a soft clear in Cisco IOS.

Configure BGP instance and peering

Here is a very basic BGP peering config with the minimum required to get BGP running for
RouterOS. It includes setting the BGP AS, a peering and several networks to advertise.

Originate a default route to a specific peer

This will configure the peering to originate or advertise a 0.0.0.0/0 route to the peer regardless of
whether or not a default route already exists in the routing table. You can use the
alternate default-originate=if-installed to only advertise a default route if one exists in the routing
table.

You might also like