cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4174
Views
15
Helpful
4
Replies

How to advertise a NAT pool into OSPF

kaustav.gupta
Level 1
Level 1

Hi,

Source NAT is being done in a internal routerfor traffc from LAN.How to advertise that pool via OSPF such that all routers in the AS can send traffic to that subnet. Presently a static route has been configured in an ASBR pointing to that Source NAT subnet.

4 Replies 4

Richard Burts
Hall of Fame
Hall of Fame

A static route to the range of NAT addresses and redistribute static into OSPF is certainly one way to do it. You might also think about assigning an IP address in the pool range to a loopback interface and putting a network statement for the loopback into OSPF. (You will also need to put ip ospf network point-to-point under the loopback to get OSPF to advertise the subnet instead of treating the loopback as a host address which is the default behavior).

HTH

Rick

HTH

Rick

Hi,

This is the sample config which I prepared with your suggestion.. Can u comment on the same..

interface loopback 1

ip address 203.92.201.190 255.255.255.255

description " NAT pool subnte_1 advt"

ip ospf network point-to-point

no shut

interface loopback 2

ip address 203.92.201.206 255.255.255.255

description " NAT pool subnet_2 advt"

ip ospf network point-to-point

no shut

!

router ospf 1

redistribute static subnets route_map To_Internal_LAN

log-adjacency-changes

network 203.92.201.232 0.0.0.3 area 0

network 203.92.201.244 0.0.0.3 area 0

network 203.92.203.144 0.0.0.0 area 0

network 203.192.201.176 0.0.0.15 area 0

network 203.192.201.192 0.0.0.15 area 0

Kaustav

Creating the loopback with netmask of 255.255.255.255 is not what I thought I was suggesting although reading my response I see that I was not as clear as I had thought. You will need to assign a netmask for a subnet that includes the NAT pool. If you put the loopback into a subnet of the right size, include the ip ospf network point-to-point under the loopback, and have a network statement in OSPF that includes the loopback, then OSPF will advertise the subnet to all its OSPF peers. This will give all the other OSPF routers an entry in their routing table that will allow them to reach the addresses in the NAT pool.

HTH

Rick

HTH

Rick

I know this post was a long time ago but it is relevant in my studies now.  This was a great help and a pretty slick way to advertise those addresses.


Thanks! 

Review Cisco Networking products for a $25 gift card