cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1326
Views
5
Helpful
3
Replies

Static routing with OSPF

punasup
Level 1
Level 1

Hello,

 

I have this network. The routers are c7200:

router.png

 

As you can see, I configured the 4 routers with OSPF. Everything works fine. Now I want to configure my router 1 only with static routing and the goal is to ping the router 6. Can you confirm that I should add all the networks (192.168.2-3-4-5-6-7.0) in my route (GW is router 2 of course)?

 

Thanks.

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @punasup ,

as already noted by @marioiram   you don't need static routes that describe all the subnets in your OSPF domain.

 

as suggested you can use  a static default route pointing to RE2's IP address in subnet 192.168.1.0.

on RE1:

ip route 0.0.0.0 0.0.0.0 192.168.1.2

 

On RE2 in order to make possible return packets from RE6 to RE1 you need to advertise the subnet between RE1, RE2  you can  for example assuming RE1 is not configured for OSPF

 

router ospf 10

network 192.168.1.0 0.0.0.255 area 0

passive-interface <interface-name-to-RE1>

 

To be noted OSPF is not very good in handling external routes ( we have limited control over their scope not granular )

So in real networks instead of using redistributed connected the combo

network     ...               area .....

+

passive-interface

is to be preferred as it creates an internal route instead of an external one.

 

Hope to help

Giuseppe

 

 

View solution in original post

3 Replies 3

marioiram
Level 1
Level 1

Try a default route on RE1 to send all traffic to RE2, something like "0.0.0.0 0.0.0.0 192.168.1.x" (insert RE2 IP address instead of 192.168.1.x) and under the OSPF config redistribute the connected routes.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @punasup ,

as already noted by @marioiram   you don't need static routes that describe all the subnets in your OSPF domain.

 

as suggested you can use  a static default route pointing to RE2's IP address in subnet 192.168.1.0.

on RE1:

ip route 0.0.0.0 0.0.0.0 192.168.1.2

 

On RE2 in order to make possible return packets from RE6 to RE1 you need to advertise the subnet between RE1, RE2  you can  for example assuming RE1 is not configured for OSPF

 

router ospf 10

network 192.168.1.0 0.0.0.255 area 0

passive-interface <interface-name-to-RE1>

 

To be noted OSPF is not very good in handling external routes ( we have limited control over their scope not granular )

So in real networks instead of using redistributed connected the combo

network     ...               area .....

+

passive-interface

is to be preferred as it creates an internal route instead of an external one.

 

Hope to help

Giuseppe

 

 

punasup
Level 1
Level 1

Thank you very much to both of you!