07-07-2011 09:14 AM - edited 03-04-2019 12:54 PM
NAT question on 2801 with IOS 12.3:
I need three internal addresses to NAT to one external IP for outbound traffic but for inbound traffic I'd like that same external IP to map to one of the internal IPs.
Example:
Outbound - Internal 10.10.10.10, .11, .12 all NAT to 172.16.16.16
Inbound - 172.16.16.16 NATs to 10.10.10.10
Why? The internal .10 is a cluster IP so I want inbound traffic to go it but outbound will come from the physical IPs of the server. I would think this would be a fairly common situation but my NAT experience is limited to 1-to-1 static NATs and interface overloads.
I don't believe there will ever be any outbound traffic from the .10 so eliminating that from the outbound would be fine.
07-07-2011 10:36 AM
This is not fairly common, however you could try and use dynamic nat for the 3 internal hosts outbound, and a static inbound nat for the one host. Give it a try and let us know how you get on.
Sent from Cisco Technical Support iPad App
07-07-2011 02:54 PM
ip nat pool Cluster 10.10.10.10 10.10.10.12 prefix-length 24 type rotary
access-list 10 permit 172.16.16.16
ip nat inside destination list 10 pool Cluster
create dns entry for the inside global address of cluster server = 172.16.16.16
Dont forget to apply nat to the interfaces inside/outside.
res
Paul
07-12-2011 12:16 PM
I think this is my solution. I'm still awaiting confirmation that everything works.
! Outbound
access-list 10 permit 10.10.10.11
access-list 10 permit 10.10.10.12
access-list 10 permit 10.10.10.13
!
ip nat pool PUBLIC 240.1.1.1 240.1.1.1 prefix-length 30
ip nat inside source list 10 pool PUBLIC overload
!
! Inbound
ip nat inside source static 10.10.10.11 240.1.1.1
I noticed that the prefix-length would take 32 but would protest that it shouldn't be more than 30 bits.
07-12-2011 03:15 PM
This won't work !
As suggested above for inbound direction to nat to
Multiple ips u need destination nat
Or u can use load balancing hardware best but this require cost and re design to the network
Try if your iOS support server loadbalancing slb this can help you to load balnce the traffic coming to a VIP address one ip to multiple servers and it will take care of the nating of it
Good luck
If helpful rate
Sent from Cisco Technical Support iPhone App
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide