02-16-2017 06:20 PM - edited 03-05-2019 08:03 AM
Hi All,
Is it possible to set a preferred path for a route on 2 neighbors connected on the same vlan using OSPF point to point? Since the outgoing interface is the same for both peers I am unable to manipulate the path selection via cost. I have tried modifying the bandwidth as well on both neighbors but still no luck. Any help would be much appreciated.
Solved! Go to Solution.
02-16-2017 07:51 PM
Hi
If you are advertising a default route you could modify the metric type. A route with E1 metric type will be preferred than an E2
R1
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
default-information originate always
R2
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
default-information originate always metric-type 1
R3
R3#SH IP ROUTE
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is 10.0.0.2 to network 0.0.0.0
O*E1 0.0.0.0/0 [110/11] via 10.0.0.2, 00:00:02, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, FastEthernet0/0
L 10.0.0.3/32 is directly connected, FastEthernet0/0
The failover will be automatic.
Shutting down R2
R3#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.0.0.1, 00:00:09, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, FastEthernet0/0
L 10.0.0.3/32 is directly connected, FastEthernet0/0
R3#
:-)
02-16-2017 06:46 PM
Hi
Do you have a diagram? As I understand you have a point to point between 2 layer 3 devices, please correct me if Im wrong.
02-16-2017 06:50 PM
The router called Orbit is learning the default route from QS and VC neighbors and is currently load balancing the path. My requirement is to select QS as the preferred path and VC as the secondary. I hope that makes sense.
02-16-2017 07:51 PM
Hi
If you are advertising a default route you could modify the metric type. A route with E1 metric type will be preferred than an E2
R1
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
default-information originate always
R2
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
default-information originate always metric-type 1
R3
R3#SH IP ROUTE
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is 10.0.0.2 to network 0.0.0.0
O*E1 0.0.0.0/0 [110/11] via 10.0.0.2, 00:00:02, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, FastEthernet0/0
L 10.0.0.3/32 is directly connected, FastEthernet0/0
The failover will be automatic.
Shutting down R2
R3#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.0.0.1, 00:00:09, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, FastEthernet0/0
L 10.0.0.3/32 is directly connected, FastEthernet0/0
R3#
:-)
02-16-2017 07:52 PM
Hi Julio,
Can you clarify where I should apply the routemap on the context of my diagram? Based on my screenshot the default gateway is being advertised FW which is the top most router that has an OSPF adjacency with QS and VC which in turn peers with Orbit.
02-16-2017 08:33 PM
Hi
If we are taking as reference the diagram, it should be configured on the Orbit router, so you should verify your next hops, in order to select the preferred next hop.
On my config I have selected the preferred next hop but you could be more specific with the routes to be manipulated adding other match ip address <ACL> o prefix command line under the route maps.
:-)
02-16-2017 08:42 PM
Hi,
I was analyzing a best solution, please let me correct the config above.
02-16-2017 09:00 PM
router ospf 1
router-id 100.64.13.25
log-adjacency-changes
area 0.0.0.10 authentication message-digest
network 100.64.13.24 0.0.0.7 area 0.0.0.10
neighbor 100.64.13.26
neighbor 100.64.13.27
default-information originate
distribute-list route-map PREFER in
access-list 1 permit 100.64.13.27 <===VC
access-list 2 permit 100.64.13.26 <===QS
no cdp log mismatch duplex
!
route-map PREFER permit 5
match ip next-hop 2
set metric-type type-1
!
route-map PREFER permit 10
match ip next-hop 1
set metric-type type-2
!
Gateway of last resort is 100.64.13.27 to network 0.0.0.0
100.0.0.0/29 is subnetted, 3 subnets
C 100.64.13.48 is directly connected, FastEthernet1/0
C 100.64.13.24 is directly connected, FastEthernet0/0
O 100.64.13.16 [110/11] via 100.64.13.27, 00:00:27, FastEthernet0/0
[110/11] via 100.64.13.26, 00:00:27, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/11] via 100.64.13.27, 00:00:27, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 100.64.13.27, 00:00:27, FastEthernet0/0
[110/1] via 100.64.13.26, 00:00:29, FastEthernet0/0
OD#
02-16-2017 09:11 PM
I got it to work by doing your suggestion thank you very much for you time Julio much appreciated :)
R1
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
default-information originate always
R2
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
default-information originate always metric-type 1
02-16-2017 08:52 PM
Hi Julio
I tried this but it appears that it is still load balancing. Is there anything I missed?
Here is my config of Orbit as per your suggestion
router ospf 1
router-id 100.64.13.25
log-adjacency-changes
area 0.0.0.10 authentication message-digest
network 100.64.13.24 0.0.0.7 area 0.0.0.10
neighbor 100.64.13.26
neighbor 100.64.13.27
default-information originate
distribute-list route-map PREFER in
access-list 1 permit 100.64.13.27 <===VC
access-list 2 permit 100.64.13.26 <===QS
no cdp log mismatch duplex
!
route-map PREFER permit 5
match ip next-hop 2
set metric-type type-1
!
route-map PREFER permit 10
match ip next-hop 1
set metric-type type-2
!
Gateway of last resort is 100.64.13.27 to network 0.0.0.0
100.0.0.0/29 is subnetted, 3 subnets
C 100.64.13.48 is directly connected, FastEthernet1/0
C 100.64.13.24 is directly connected, FastEthernet0/0
O 100.64.13.16 [110/11] via 100.64.13.27, 00:00:27, FastEthernet0/0
[110/11] via 100.64.13.26, 00:00:27, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/11] via 100.64.13.27, 00:00:27, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 100.64.13.27, 00:00:27, FastEthernet0/0
[110/1] via 100.64.13.26, 00:00:29, FastEthernet0/0
OD#
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