RouterOS Troubleshooting

Aus DRC Wiki

Version vom 22. August 2025, 18:47 Uhr von IN3FQQ (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

RouterOS 7 BGP Troubleshooting

Ausgehende Advertisements

Mit dem folgenden Kommando können alle ausgehenden BGP Advertisements gefunden werden, die eine bestimmte IP enthalten:

> routing/bgp/advertisements/ print where 44.143.160.3 in dst

 0 peer=ir3ugm-1 dst=44.143.160.0/27 nexthop=44.169.12.54 origin=0 
   as-path=sequence 4222260003 4222260005 4223271001 4223271004 atomic-aggregate=yes 

 0 peer=ir3bc-1 dst=44.143.160.0/27 nexthop=44.169.12.62 origin=0 
   as-path=sequence 4222260003 4222260005 4223271001 4223271004 atomic-aggregate=yes 

 0 peer=ir3ugm-1 dst=44.143.160.0/19 nexthop=44.169.12.54 origin=0 
   as-path=sequence 4222260003 4222260005 4223271001 4223271003 atomic-aggregate=yes 

 0 peer=ir3bc-1 dst=44.143.160.0/19 nexthop=44.169.12.62 origin=0 
   as-path=sequence 4222260003 4222260005 4223271001 4223271003 atomic-aggregate=yes 

Alternativ funktioniert die Abfrage auch mit Angabe des expliziten Netzes (es muss exakt dieses Netz sein, kein Subnet oder Supernet):

> routing/bgp/advertisements/ print where dst=44.143.160.0/27

 0 peer=ir3bc-1 dst=44.143.160.0/27 nexthop=44.169.12.62 origin=0 
   as-path=sequence 4222260003 4222260005 4223271001 4223271004 atomic-aggregate=yes 

 0 peer=ir3ugm-1 dst=44.143.160.0/27 nexthop=44.169.12.54 origin=0 
   as-path=sequence 4222260003 4222260005 4223271001 4223271004 atomic-aggregate=yes 

Eingehende (gelernte) BGP Routen

Unter RouterOS 7 zeigt ip/route/print detail keine BGP Metriken (AS-Pfade!) mehr an.

> ip route/print detail where 44.143.160.3 in dst-address 
Flags: D - dynamic; X - disabled, I - inactive, A - active; 
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, y - copy; 
H - hw-offloaded; + - ecmp 
 0  As   dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=44.169.12.57 
         immediate-gw=44.169.12.57%ether3-ir3bc check-gateway=ping distance=1 scope=30 
         target-scope=10 suppress-hw-offload=no 

   DAb   dst-address=44.143.160.0/19 routing-table=main gateway=44.169.12.65 
         immediate-gw=44.169.12.65%ether5-ir3uap distance=20 scope=40 target-scope=10 
         suppress-hw-offload=no 

   DAb   dst-address=44.143.160.0/27 routing-table=main gateway=44.169.12.65 
         immediate-gw=44.169.12.65%ether5-ir3uap distance=20 scope=40 target-scope=10 
         suppress-hw-offload=no 

Die kompletten BGP-Infos findet man über das Kommando routing/route/print detail:

> routing/route/print detail where 44.143.160.3 in dst-address 

Flags: X - disabled, F - filtered, U - unreachable, A - active; 
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, a - ldp-address, l - ldp-mapping, y - copy, a - slaac; 
H - hw-offloaded; + - ecmp, B - blackhole 
 As   afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=44.169.12.57 
       immediate-gw=44.169.12.57%ether3-ir3bc check-gateway=ping distance=1 scope=30 target-scope=10 belongs-to="static" 
       debug.fwp-ptr=0x20282000 

 Ab   afi=ip4 contribution=active dst-address=44.143.160.0/19 routing-table=main gateway=44.169.12.65 
       immediate-gw=44.169.12.65%ether5-ir3uap distance=20 scope=40 target-scope=10 belongs-to="bgp-IP-44.169.12.65" 
       bgp.peer-cache-id=*B000002 .as-path="4222260005,4223271001,4223271003" .atomic-aggregate=yes .origin=igp 
       debug.fwp-ptr=0x20282360 

 Ab   afi=ip4 contribution=active dst-address=44.143.160.0/27 routing-table=main gateway=44.169.12.65 
       immediate-gw=44.169.12.65%ether5-ir3uap distance=20 scope=40 target-scope=10 belongs-to="bgp-IP-44.169.12.65" 
       bgp.peer-cache-id=*B000002 .as-path="4222260005,4223271001,4223271004" .atomic-aggregate=yes .origin=igp 
       debug.fwp-ptr=0x20282360