04-01-2010 08:44 AM - edited 03-04-2019 08:00 AM
Hi
R1 takes backup link to reach R2 rather than MPLS route. On R1 there is mutual redistribution of OSPF with BGP.
Diagram on the setup is attached. Any clue
cheers
RR
Solved! Go to Solution.
04-02-2010 04:53 AM
Hello Ronald,
testing on a C6500:
red ospf 200 metric ?
<0-16777214> OSPF default metric
red ospf 200 metric 40000
% Only classful networks will be redistributed
so we need to use the subnets keyword
we set a metric in addition to using metric type O E2 (default) the idea is to make external routes coming from eBGP sessions preferred.
this is just an additional security measure if setting metric-type to 1 in redistributing BGP into main OSPF process you should be fine
red ospf 200 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF
vrf VPN Routing/Forwarding Instance
the exact syntax should be
red bgp ASN metric-type 1 subnets
into main OSPF process (OSPF PID 10)
Hope to help
Giuseppe
04-01-2010 08:46 AM
Ronald
Is there mutual distribution on R2 as well.
Can you pick a route on R1 that should be going via MPLS but is going via R2 and post"sh ip route
Jon
04-01-2010 09:09 AM
Jon,
There is mutual registribution on R2.
Backup Link is T1 point to point hence R1 is considering this link to reach R2. Result of traceroute shows all routes taking backup route.
I think something to do with InterArea and Intra Area
cheers
RR
04-01-2010 09:10 AM
Ronald
It's going to be difficult to help without seeing routes. As requested already can you post a route example.
Jon
04-01-2010 10:03 AM
Jon,
From R1 I need to reach 10.10.10.0/23 network on R2
R1#sh ip route 10.10.10.0
Routing entry for 10.10.10.0/23
Known via "ospf 10", distance 110, metric 2, type intra area
Redistributing via bgp 7190
Advertised by bgp 7190
Last update from 192.168.200.2 on GigabitEthernet0/1, 02:34:26 ago
Routing Descriptor Blocks:
* 192.168.200.2, from 192.168.200.1, 02:34:26 ago, via GigabitEthernet0/1
Route metric is 2, traffic share count is 1
Is this input you needed
cheers
RR
04-01-2010 10:09 AM
Ronald
Your original problem was that you wanted to go via MPLS but you were going via R2. So why have you sent me an example of a route you want to go via R2 for ?
Can you choose a destination subnet that is reachable across the MPLS network.
Then on R1 & R2 can you do "sh ip route
Can you also post the bgp/ospf configs from both PE routers indicating which one is connected to which R router.
Finally can you post the ospf config from both R routers.
Jon
04-01-2010 04:23 PM
04-01-2010 08:46 PM
Ronald:
Im sorry, but most of what you are saying is not making any sense.
First, your diagram shows OSPF between your CE and PE. But the configs suggest BGP as the peer routing protocol.
Second, the drawing should show that the PE is part of the MPLS cloud, not outside it.
Third, why would you want traffic that is destined for R2 to go from R1 and then through the MPLS cloud when it can take a direct route through the p2p link? It doesnt make sense.
Fourth, OSPF routes that are redistributed into BGP at R2 and then redistributed back into OSPF at R1 will be considered external routes. Whereas the OSPF subnets learned through the direct link will be internal. Internal routes are favored by OSPF regardless of the cost. The order is intra-area, inter-area, external type 1 then external type 2.
Fifth, if you are running mutual redistribution at both routers, you need to use some filtering to prevent routing loops.
HTH
Victor
04-01-2010 11:50 PM
Hello Ronald,
the R1 and R2 routers should be the routers that you have called PE in the network diagram.
I agree that something is not clear, but I think you see the trouble on other devices on the site that prefers the backup link over the MPLS link.
From the point of view of internal routers that you call CE nodes the direct link T1 is preferred path if it provides internal routes (intra-area or inter-area) for the OSPF hierarchy of route types.
The only way to make the external routes coming from R1,R2 preferred is to make the routes coming on the T1 link external routes too.
O E1 routes are preferred over O E2 regarless of metric value.
O E2 is the default type.
so you need a second OSPF process that will be running only on the T1 link and that will redistribute primary OSPF process
router ospf 10
log-adjacency-changes
redistribute bgp 7190 subnets metric-type 1
network 192.168.200.0 0.0.0.3 area 0
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
on CE nodes
router ospf 200
network 192.168.x.y 0.0.0.3 area 0
red ospf 10 metric 40000 subnets
!
where the network command is related to the T1 link
otherwise if R1 and CE are the same device the problem is the level of specific routes coming on the BGP session:
same prefix length eBGP route is preferred for its lower AD
on other devices the OSPF internal route is preferred for the reasons described above.
Hope to help
Giuseppe
Edit:
corrected syntax of ref bgp in main process
04-02-2010 03:55 AM
Thank you Giuseppe for the reply.
Yes you are correct the diagram labels were incorrect, sorry about this.
I modified the config to make it simple to be more focus on issue, but seems it become unclear
CE is the backbone router ( For us the backbone and distribution are the same )
PE is the service provider link termination router ( R1 and R2 are PE routers )
When users behind CE wants to reach a subnet behind R2 it preferrs the backup link rather than MPLS Cloud
Can you explain this line "metric 40000" How do you get this!!
red ospf 10 metric 40000 subnets
04-02-2010 04:53 AM
Hello Ronald,
testing on a C6500:
red ospf 200 metric ?
<0-16777214> OSPF default metric
red ospf 200 metric 40000
% Only classful networks will be redistributed
so we need to use the subnets keyword
we set a metric in addition to using metric type O E2 (default) the idea is to make external routes coming from eBGP sessions preferred.
this is just an additional security measure if setting metric-type to 1 in redistributing BGP into main OSPF process you should be fine
red ospf 200 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF
vrf VPN Routing/Forwarding Instance
the exact syntax should be
red bgp ASN metric-type 1 subnets
into main OSPF process (OSPF PID 10)
Hope to help
Giuseppe
04-02-2010 05:09 AM
Giuseppe thanks for the help, its clear now.
Thanks to Jon
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