OSPF on a NATTED subnet

Unanswered Question
Oct 4th, 2007

We implemented OSPF across a Sprint MPLS network. One of the sites we recently acquired has overlapping addresses so we have a static nat command mapping their internal subnet to another subnet. I need this NATTED address to be distributed via OSPF.

I have the following

interface FastEthernet0/0

ip address 192.168.1.250 255.255.255.0

ip nat inside

duplex auto

speed auto

!

interface Serial0/0/0

ip address 172.20.174.198 255.255.255.252

ip nat outside

service-module t1 timeslots 1-4

!

router ospf 1

router-id 172.20.174.198

log-adjacency-changes

redistribute static subnets

passive-interface FastEthernet0/0

network 172.20.174.196 0.0.0.3 area 0

network 192.168.41.0 0.0.0.255 area 0

!

ip classless

ip route 0.0.0.0 0.0.0.0 192.168.1.1

ip route 192.168.41.0 255.255.255.0 Null0

ip route 192.168.200.0 255.255.255.0 192.168.1.1

!

ip nat inside source static network 192.168.1.0 192.168.41.0 /24

For some reason 192.168.41.0 isn't being distributed.

As a test I tried this

interface loopback1

ip address 192.168.41.1 255.255.255.0

and this actually worked.

Why doesn't it work without it?

I have redistribute statis set under OSPF and I have a static route to 192.168.41.0 pointing to Null0.

Denny

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
sundar.palaniappan Thu, 10/04/2007 - 15:36

Denny,

It should work with your configuration. When you don't have the loopback 1 interface created what does 'show ip route 192.168.41.0' shows up as. If it shows up as a static null route then the redistribution should work.

HTH

Sundar

dennylester Thu, 10/04/2007 - 15:44

Here is what it shows

Known via "static", distance 1, metric 0 (connected)

Redistributing via ospf 1

Advertised by ospf 1 subnets

Routing Descriptor Blocks:

* directly connected, via Null0

Route metric is 0, traffic share count is 1

This has me stumped.

Denny

sundar.palaniappan Thu, 10/04/2007 - 16:05

I quickly tested this in my lab and it works just fine. Do you have any distribute list (inbound) applied on the router that should be learning the route that's filtering this route. Does the recipient router learn the other static routes via OSPF?

If possible post a sanitized copy of the full configuration from both routers.

R2#show run | b router ospf

router ospf 1

log-adjacency-changes

redistribute static subnets

network 172.30.1.12 0.0.0.0 area 0

R2#show ip route 200.200.200.0

Routing entry for 200.200.200.0/24

Known via "static", distance 1, metric 0 (connected)

Redistributing via ospf 1

Advertised by ospf 1 subnets

Routing Descriptor Blocks:

* directly connected, via Null0

Route metric is 0, traffic share count is 1

R1#show ip route ospf

O E2 200.200.200.0/24 [110/20] via 172.30.1.12, 00:29:47, Ethernet0/0

R1#show ip route 200.200.200.0

Routing entry for 200.200.200.0/24

Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 10

Last update from 172.30.1.12 on Ethernet0/0, 00:29:54 ago

Routing Descriptor Blocks:

* 172.30.1.12, from 100.100.100.1, 00:29:54 ago, via Ethernet0/0

Route metric is 20, traffic share count is 1

HTH

Sundar

dennylester Thu, 10/04/2007 - 20:35

Hi Sundar,

Thank you for replying.

I'm out of the office until Monday, so I won't be able to post the configs until then.

Do you really think it could be the other side?

I thought I had ruled out the Sprint MPLS Network and the host site when the Remote Site successfully distributed the subnet after applying an IP address in that subnet to the loopback interface.

The moment I removed the subnet from the loopback interface the route was removed.

Perhaps I am missing something.

I'm going to check and see if the version IOS could be the problem. I believe it is 12.4(1c)

Actions

This Discussion