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
*************************************************