Difference between revisions of "Dynamic routing commands"

From Tech-Wiki
Jump to: navigation, search
Line 54: Line 54:
 
  exec router clear bgp ip 200.0.0.1 soft out
 
  exec router clear bgp ip 200.0.0.1 soft out
 
  exec router clear ospf process
 
  exec router clear ospf process
 +
 +
Troubleshoot dynamic routing
 +
diag ip router ospf|bgp all enable
 +
diag ip router ospf|bgp level info
 +
diag debug enable

Revision as of 22:54, 24 August 2020


Get dynamic routing info:

# BGP
get router info bgp network
get router info bgp summary
get router info bgp neighbors
# OSPF
get router info ospf status
get router info ospf interface
get router info ospf neighbor
get router info ospf database brief
get router info ospf database summary lsa|self-originate|adv-router
get router info ospf database self-originate|adv-router
get router info ospf database router lsa

In order to advertise non-local routes to BGP peers, it's required to define them in the local routing table as blackhole

 config router bgp
  config network
   edit 0
    set prefix 10.0.0.0/8
  end
 end
 config router static
  edit 0
   set dst 10.0.0.0 255.0.0.0
   set blackhole enable
  next
 end

Redistribute default route (cisco default-information originate | neighbor xxx default-originate)

 config router ospf
  set default-information-originate enable
 config router bgp
   config neighbor
     set capability-default-originate enable

Influence outbound routing preference

 config router map
  edit ISP1-pref
  config rule
   edit 10
    set set-local-preference 50
   end
  end
 config router bgp
  config neighbor
   edit 200.0.0.1
    set route-map-out ISP1-pref
   end
 end

Once done doing your changes, restart the routing process

exec router clear bgp ip 200.0.0.1 soft out
exec router clear ospf process

Troubleshoot dynamic routing

diag ip router ospf|bgp all enable
diag ip router ospf|bgp level info
diag debug enable