cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2862
Views
0
Helpful
5
Replies

Redistribute static subnets in ospf

akshashikant
Level 1
Level 1

Hi, I have redistribute static subnets in ospf but it is not working. Please review the configuration and help me.

 .

Router A

router ospf 100
router-id 10.255.254.1
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
network 10.255.254.0 0.0.0.255 area 100
network 10.255.255.0 0.0.0.255 area 100
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 64.222.248.93

Router B

router ospf 100
router-id 10.255.254.4
redistribute connected subnets
redistribute static subnets route-map VPN
network 10.255.254.0 0.0.0.255 area 100
network 10.255.255.0 0.0.0.255 area 100
network 192.168.5.0 0.0.0.255 area 100
!
ip local pool VPNPool 192.168.5.0 192.168.5.255
ip nat inside source list 50 interface GigabitEthernet0/2 overload
ip nat inside source static 172.16.0.20 66.150.135.243
ip forward-protocol nd
!

5 Replies 5

Mark Malone
VIP Alumni
VIP Alumni

Hey I dont get that , your redistrubuting in the same LSDB same process ospf so everything already knows about each other , theres no need to redistribute?

redistribution is usually between different protocls eigrp-ospf etc

if you trying to get the ip route 0.0.0.0 0.0.0.0 route into the routing table use default information originate under the router process

We do not know about the environment and the topology of these routers. So we can not determine whether the redistribute connected will generate additional routes to advertise. But Mark is exactly right in observing that you only show a single static route and that one is a default route. If there were other static routes they would be redistributed. But if you want OSPF to advertise that default route then use default information originate and not redistribute static.

HTH

Rick

HTH

Rick

Hi, I am using both static routing and ospf. I have three sites all are in area 100 and each site is having own internet link and for internet I am using static routing. All the sites are connected using ospf. 

My requirement is, if my one of the location internet goes down, user should get internet access from other site and that should come via ospf. 

Please see the following config

interface Loopback0
ip address 10.255.254.4 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
load-interval 30
media-type rj45
speed auto
duplex auto
negotiation auto
!
interface GigabitEthernet0/1.1000
bandwidth 20000
encapsulation dot1Q 1000
ip address 10.255.255.2 255.255.255.252
!
interface GigabitEthernet0/1.2000
description -=Portsmouth=-
bandwidth 10000
encapsulation dot1Q 2000
ip address 10.255.255.6 255.255.255.252
!
interface GigabitEthernet0/1.3000
bandwidth 20000
encapsulation dot1Q 3000
ip address 10.255.255.10 255.255.255.252
!
interface FastEthernet0/2
no ip address
no ip route-cache
shutdown
speed auto
duplex auto
!
interface GigabitEthernet0/2
ip address 74.181.125.22 255.255.255.252
load-interval 30
media-type rj45
speed auto
duplex auto
negotiation auto
history BPS
!
interface GigabitEthernet0/3
no ip address
load-interval 30
media-type rj45
speed auto
duplex auto
negotiation auto
!
interface GigabitEthernet0/3.16
encapsulation dot1Q 16
ip address 172.16.0.3 255.255.255.0
ip nat inside
!
interface GigabitEthernet0/3.900
description FPU Firewall
encapsulation dot1Q 900
ip address 64.222.162.62 255.255.255.192
!
interface FastEthernet1/0
ip address 74.181.125.18 255.255.255.252
ip nat outside
load-interval 30
duplex full
!
router ospf 100
router-id 10.255.254.4
redistribute connected subnets
redistribute static subnets route-map VPN
network 10.255.254.0 0.0.0.255 area 100
network 10.255.255.0 0.0.0.255 area 100
network 192.168.5.0 0.0.0.255 area 100
!
ip local pool VPNPool 192.168.5.0 192.168.5.255
ip nat inside source list 50 interface GigabitEthernet0/2 overload
ip nat inside source static 172.16.0.20 66.150.135.243
ip forward-protocol nd
!
!
no ip http server
ip http authentication local
ip http secure-server
ip route 0.0.0.0 0.0.0.0 74.181.125.21
ip route 10.0.0.0 255.0.0.0 172.16.0.2
ip route 10.10.64.0 255.255.254.0 172.16.0.2 name Students
ip route 10.21.0.0 255.255.255.0 172.16.0.2 name CGPS
ip route 172.16.0.0 255.240.0.0 172.16.0.2
ip route 172.16.0.0 255.255.0.0 172.16.0.2 name FPU_Admin
ip route 172.18.0.0 255.255.0.0 172.16.0.2 name Servers
ip route 172.19.1.0 255.255.255.0 172.16.0.2 name Lab
ip route 172.19.3.0 255.255.255.0 172.16.0.2 name Library
ip route 172.21.0.0 255.255.255.0 172.16.0.2 name Wireless
!
access-list 40 permit 192.168.5.0 0.0.0.255
access-list 50 permit 10.10.64.0 0.0.1.255
access-list 50 permit 10.21.0.0 0.0.0.255
access-list 50 permit 172.16.0.0 0.0.255.255
access-list 50 permit 172.18.0.0 0.0.255.255
access-list 50 permit 172.19.1.0 0.0.0.255
access-list 50 permit 172.19.3.0 0.0.0.255
access-list 50 permit 172.21.0.0 0.0.0.255
access-list 50 permit 192.168.5.0 0.0.0.255
access-list 50 permit 10.0.0.0 0.0.0.255
access-list 50 permit 172.16.0.0 0.0.15.255
access-list 61 permit 216.52.173.226
access-list 61 permit 84.129.48.24
!
route-map VPN permit 10
match ip address 50

As Mark and Rick have already said to get a default route into OSPF you need to use the "default-information orignate" command.

You do not need to redistribute your static default route into OSPF, all you need is the default route in the IP routing table and that command added to your OSPF configuration.

Jon

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Router B also has a route-map VPN.  A route-map controls what's accepted for redistribution.

It would help if you would post more of your configs and what you're exactly trying to accomplish.

Review Cisco Networking for a $25 gift card