cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
711
Views
0
Helpful
2
Replies

OSPF path manipulation

Haris P
Level 4
Level 4

Dear Experts ,

Im in need to create a scnerio as given below ...I have network X and Y redistributed to OSPF from static ...

I want network X traffic from R5 to go through R5-R1-R3

and network Y traffic from R5 to go through R5-R2-R3

Is this possible with ospf

Untitled.jpgs

Regards

Haris P

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Haris,

you need policy based routing configured on the router where tha paths differ (the branch point) to achieve what you want, it is not possible in OSPF.

Hope to help

Giuseppe

Bilal Nawaz
VIP Alumni
VIP Alumni

Hi Haris,

You can do this if you have statics on R1 and redistribute into OSPF. Not too sure if the below is what you want to achieve since there are pro's and con's. I also don't have knowledge of if Network X or Y are attached somehow to R2 or R3 or if they're learnt from elsewhere.


On R2 i have created a loopback with an IP in Network X which in my case is the 10.0.0.0 network.
On R3 I have created a loopback with an IP in Network Y which is in 100.0.0.0 network
(Assuming they are local to the routers)

On R1 I have created static routes as below:

ip route 10.0.0.0 255.255.255.0 12.0.0.2
ip route 100.0.0.0 255.255.255.0 13.0.0.3

And the routing table looks like this:

51.0.0.0/24 is subnetted, 1 subnets
C 51.0.0.0 is directly connected, FastEthernet1/0
100.0.0.0/24 is subnetted, 1 subnets
S 100.0.0.0 [1/0] via 13.0.0.3
54.0.0.0/24 is subnetted, 1 subnets
O 54.0.0.0 [110/11] via 51.0.0.5, 00:07:07, FastEthernet1/0
23.0.0.0/24 is subnetted, 1 subnets
O 23.0.0.0 [110/20] via 13.0.0.3, 00:07:07, FastEthernet0/1
[110/20] via 12.0.0.2, 00:07:07, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
S 10.0.0.0 [1/0] via 12.0.0.2
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.0.0.0 is directly connected, FastEthernet0/1

On R1 I have redistributed:

router ospf 1
log-adjacency-changes
redistribute static metric 1 subnets
network 12.0.0.1 0.0.0.0 area 1
network 13.0.0.1 0.0.0.0 area 1
network 51.0.0.1 0.0.0.0 area 0

From R4 these are traceroute results:

R4#traceroute 100.0.0.3
Type escape sequence to abort.
Tracing the route to 100.0.0.3

1 54.0.0.5 24 msec 28 msec 24 msec
2 51.0.0.1 32 msec 32 msec 40 msec
3 13.0.0.3 80 msec 76 msec *

R4#
R4#traceroute 10.0.0.2
Type escape sequence to abort.

Tracing the route to 10.0.0.2
1 54.0.0.5 36 msec 20 msec 16 msec
2 51.0.0.1 24 msec 20 msec 44 msec
3 12.0.0.2 76 msec 72 msec *
R4#

The con is that if you wanted to get to network X or Y from R2 and R3 respectively you will have to traverse R1.
All depends on where you have your statics pointing towards and where you are redistributing I guess.

Otherwise as Giuseppe mentioned, PBR will work too.
Hth
Bilal

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Review Cisco Networking products for a $25 gift card