Difference between revisions of "Cisco: BGP Redistribute OSPF"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with "sumber: https://community.cisco.com/t5/routing/ospf-to-bgp-redistribution/td-p/1165332 router ospf 6 router-id x.x.x.x auto-cost reference-bandwidth 10000 area 38 stub n...") |
Onnowpurbo (talk | contribs) |
||
Line 17: | Line 17: | ||
neighbor x.x.x.x remote-as xxxx | neighbor x.x.x.x remote-as xxxx | ||
no auto-summary | no auto-summary | ||
+ | |||
+ | ==Distribute external type-1 type2== | ||
+ | |||
+ | Use the external keyword along with the redistribute command under router bgp to redistribute OSPF external routes into BGP. With the external keyword, you have three choices: | ||
+ | |||
+ | * redistribute both external type-1 and type-2 (Default) | ||
+ | * redistribute type-1 | ||
+ | * redistribute type-2 | ||
+ | |||
+ | |||
+ | interface Ethernet0/0 | ||
+ | ip address 2.2.2.1 255.0.0.0 | ||
+ | ! | ||
+ | interface Serial1/0 | ||
+ | ip address 3.3.3.1 255.0.0.0 | ||
+ | ! | ||
+ | router ospf 1 | ||
+ | network 2.0.0.0 0.255.255.255 area 1 | ||
+ | ! | ||
+ | router bgp 100 | ||
+ | redistribute ospf 1 match external 1 external 2 | ||
+ | !--- This redistributes ONLY OSPF External routes, !--- but both type-1 and type-2. | ||
+ | neighbor 3.3.3.3 remote-as 200 | ||
+ | ! | ||
+ | end | ||
Revision as of 15:45, 27 December 2018
sumber: https://community.cisco.com/t5/routing/ospf-to-bgp-redistribution/td-p/1165332
router ospf 6 router-id x.x.x.x auto-cost reference-bandwidth 10000 area 38 stub no-summary timers throttle spf 10 100 5000 timers throttle lsa all 10 100 5000 redistribute bgp 65500 metric 500 subnets network x.x.x.x 0.0.0.255 area 38
router bgp 65500 no synchronization bgp log-neighbor-changes redistribute ospf 6 metric 100 route-map ospf2bgp neighbor x.x.x.x remote-as xxxx no auto-summary
Distribute external type-1 type2
Use the external keyword along with the redistribute command under router bgp to redistribute OSPF external routes into BGP. With the external keyword, you have three choices:
- redistribute both external type-1 and type-2 (Default)
- redistribute type-1
- redistribute type-2
interface Ethernet0/0 ip address 2.2.2.1 255.0.0.0 ! interface Serial1/0 ip address 3.3.3.1 255.0.0.0 ! router ospf 1 network 2.0.0.0 0.255.255.255 area 1 ! router bgp 100 redistribute ospf 1 match external 1 external 2 !--- This redistributes ONLY OSPF External routes, !--- but both type-1 and type-2. neighbor 3.3.3.3 remote-as 200 ! end