OSPF with some type of NAT solution

Unanswered Question
Aug 24th, 2010

Hi

I have 10.0.21.X/24 as a HSRP btwn 2 core peers in OSPF Area 0 which is my server VLAN. We are relocating our HQ and moving servers in phases. We found one server whereby clients connect via IP rather than hostname and say has an IP of 10.0.21.100/24. I need to relocate this server to a new subnet in our new building which is 10.100.21.100/24 while at the same time ensuring clients can still reach it via 10.0.21.100. The new HQ is connect via WAN  which is Area 0 but the new server subnet 10.100.21.X/24 is in a non-zero Area.

How can I do this?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
aamercado Mon, 08/30/2010 - 21:49

Below is the config I think would work. Here’s the traffic flow

1.       Lo75 is advertising specific route 10.0.21.75/32. Note that a couple hops away another router is advertising 10.0.21.0/24

2.       In my network, OSPF should route to Lo75 and hit G0/0 with cost 5 with NAT inside and PBR

3.       Assuming PBR takes precedence over routing table, then G0/0 send NAT to Lo0 for translation

4.       Lo0 translation from outside 10.0.21.75  to inside 10.100.211.34

5.       After translation, G0/1 or G0/0 send it back out straight to server base on recursive routing table lookup for 10.100.211.0 network which is also advertise via OSPF. Not too sure on my ACL or if I should just use one physical interface or 2?

Will this work before I test?

*************************************************

interface Loopback0

ip address 172.16.1.1 255.255.255.0

ip nat outside

!

interface Loopback75

description TO-ADVERTISE-TO-OSPF-FOR-SPECIFIC-HOST-ROUTE

ip address 10.0.21.75 255.255.255.255

!

interface GigabitEthernet0/0

description OUTSIDE INTERFACE

ip address 10.101.1.10 255.255.255.254

ip nat inside

ip policy route-map OUTSIDE

ip ospf network point-to-point

ip ospf cost 5

duplex auto

speed auto

media-type rj45

!

interface GigabitEthernet0/1

ip address 10.101.1.12 255.255.255.254

ip nat inside

ip policy route-map INSIDE

ip ospf network point-to-point

ip ospf cost 10

duplex auto

speed auto

media-type rj45

!

router ospf 1

router-id 10.101.1.10

log-adjacency-changes

network 10.0.21.75 0.0.0.0 area 0

network 10.101.1.0 0.0.0.255 area 0

!

ip nat outside source static 10.0.21.75 10.100.211.34

!

access-list 100 permit ip host 10.0.21.75 any

access-list 101 permit ip any any

route-map INSIDE permit 10

description INSIDE FROM 10.101.1.12 TO .13 ON DC-CORE-1-N7K

match ip address 101

set ip next-hop 10.100.211.34

!

route-map OUTSIDE permit 10

description OUTSIDE FROM 10.101.1.10 TO .11 ON DC-CORE-1-N7K

match ip address 100

set ip next-hop 10.100.211.34

*************************************************

Actions

This Discussion