Difference between revisions of "Dynamic routing commands"
From Tech-Wiki
Line 2: | Line 2: | ||
Get dynamic routing info: | Get dynamic routing info: | ||
+ | # BGP | ||
get router info bgp network | get router info bgp network | ||
get router info bgp summary | get router info bgp summary | ||
get router info bgp neighbors | get router info bgp neighbors | ||
+ | # OSPF | ||
get router info ospf status | get router info ospf status | ||
get router info ospf interface | get router info ospf interface |
Revision as of 22:06, 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 summary get router info ospf database brief
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 # exec router clear bgp ip 200.0.0.1 soft out