cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
313
Views
5
Helpful
3
Replies
punasup
Beginner

Static routing with OSPF

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 Master

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
Beginner

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 Master

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

punasup
Beginner

Thank you very much to both of you!