12-18-2016 02:55 PM - edited 03-08-2019 08:37 AM
Hi.
I have a problem I'm not able to solve:
I have some routes learned from BGP that I need to redistribute into OSPF.
But I just cant get the hang of it.
Here is output from Router 1:
C6509#sh ip route vrf VRF_Name bgp 65200
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
B* 0.0.0.0/0 [200/0] via 10.0.0.1, 00:09:28
10.0.0.0/8 is variably subnetted, 20 subnets, 4 masks
B 10.50.1.0/24 [200/0] via 10.0.0.1, 00:09:28
B 10.50.255.0/28 [200/0] via 10.0.0.1, 00:09:28
As you can see, the router has learned a few routes from BGP.
Here is the config:
router ospf 50 vrf VRF_Name
router-id 10.50.12.1
redistribute bgp 65200 subnets
router bgp 65200
bgp router-id 10.0.0.12
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 65200
neighbor 10.0.0.1 update-source Loopback0
!
address-family ipv4
redistribute connected
redistribute static
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 soft-reconfiguration inbound
exit-address-family
!
address-family vpnv4
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community extended
exit-address-family
!
address-family ipv4 vrf VRF_Name
no bgp redistribute-internal
redistribute connected
redistribute static
redistribute ospf 50 metric 2
exit-address-family
C6509#show ip protocols vrf VRF_Name
Routing Protocol is "bgp 65200"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Redistributing: connected, ospf 50 (internal)
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
Distance: external 20 internal 200 local 200
Routing Protocol is "ospf 50"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.50.12.1
It is an area border and autonomous system boundary router
Redistributing External Routes from,
bgp 65200, includes subnets in redistribution
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
Routing on Interfaces Configured Explicitly (Area 0):
Vlan328
Vlan964
Vlan967
Vlan968
Vlan969
Vlan312
Routing Information Sources:
Gateway Distance Last Update
10.50.11.1 110 00:38:53
10.50.13.1 110 00:38:48
10.50.15.1 110 00:38:48
10.50.14.1 110 00:38:48
10.50.1.1 110 2d09h
Distance: (default is 110)
As you can see, OSPF *should* redistribute routes from BPG
But the output from the next router shows no sign of the routes listed earlier in this post.
All other routes that comes from OSPF only shows in the routing table without problems.
Any ideas why not?
Thanks.
12-18-2016 03:08 PM
check this post:
https://supportforums.cisco.com/discussion/11178396/ospf-routing-bit-lsa
12-18-2016 03:17 PM
Hello,
The detail in your setup is that your BGP routes are internal.
C6509#sh ip route vrf VRF_Name bgp 65200
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
B* 0.0.0.0/0 [200/0] via 10.0.0.1, 00:09:28
10.0.0.0/8 is variably subnetted, 20 subnets, 4 masks
B 10.50.1.0/24 [200/0] via 10.0.0.1, 00:09:28
B 10.50.255.0/28 [200/0] via 10.0.0.1, 00:09:28
You can see that the AD is equal to 200, and BGP does not redistribute internal Routes as could be dangerous for loops.
To be able to redistribute internal BGP routes please enable the following command under the address family VRF on BGP process:
IOU2(config-router-af)#bgp redistribute-internal
After this command, you should be able to see it at the other end.
IOU1#sh ip route ospf | b of
Gateway of last resort is not set
10.0.0.0/32 is subnetted, 1 subnets
O E2 10.10.10.10 [110/1] via 12.12.12.2, 00:02:35, Ethernet0/0
Hope this help to solve your problem.
Regards!
12-19-2016 12:37 AM
Hi.
Thank you for your answers.
A combination of both your replies took me one step further.
When enabling bgp redistribute-internal together with the command capability vrf-lite, I am now seeing two more routes in the routing table:
O E2 10.50.1.0/24 [110/1] via 10.50.255.113, 01:27:54, Vlan966
O E2 10.50.255.0/28 [110/1] via 10.50.255.113, 01:27:54, Vlan966
But the default route is still a no show.
I wonder why?
Since those 2 commands are disabled by default, I guess there are some risks by enabling them?
And why does the default route turn up as
B* 0.0.0.0/0 [200/0] via 10.0.0.1 when it should be
Gateway of last resort is 10.50.255.10 to network 0.0.0.0
Thank you
12-19-2016 10:17 AM
Good day,
In order to have the default-route you need to include the default-information originate in OSPF. Otherwise the default route won't be included.
For the second second question, I know for sure that the idea to don't permit the internal routes to be added back in another IGP is to avoid any loop in the network.
12-20-2016 11:07 PM
Hello.
I works when I put the default-information originate in OSPF on both ends of the MPLS / BGP setup. That seems unnatural. default-information originate should be set only where the default route actually exists in my mind.
With EIGRP instead of OSPF I make this work by using these commands
router eigrp 1504
!
address-family ipv4 vrf VRF_NAME autonomous-system 50
redistribute static metric 1000 200 250 250 9000
redistribute connected
network 10.50.0.0 0.0.255.255
exit-address-family
ip route vrf VRF_NAME 0.0.0.0 0.0.0.0 10.50.255.10
This way I can see the default route on the other side and redistribute it further into the non MPLS enabled network without problems.
So if internal routes are not permitted into another IGP, how * SHOULD * I setup up my network?
I want to run MPLS across all my 15 L3-switches / routers.
Should each of the have their own AS number to make the network eBGP?
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide