cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
862
Views
5
Helpful
4
Replies

NAT & Routing

jfeo
Level 1
Level 1

I been using static nat and has been cumbersome to manage. For example I will do a /24 static nat to make all the NATs are known for monitoring. Question came up that can we NAT a subnet and they will always line up with last octet the same

example

ip nat inside source static network 10.10.10.0 192.168.1.0 /24

 

10.10.10.1 will always get 192.168.1.1 

10.10.10.240 will always get 192.168.1.240

1 Accepted Solution

Accepted Solutions

Hello


@jfeo wrote:

Ok that is how I can match the end host. Can I apply this do any VRF?


 ip nat inside source list 100 pool Nat-Host vrf xxx


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

4 Replies 4

Hello,

 

I don't think this is possible. If you want the last octets to match, you need individual entries:

 

ip nat inside source static 10.10.10.1 192.168.1.1

ip nat inside source static 10.10.10.2 192.168.1.2

ip nat inside source static 10.10.10.3 192.168.1.3

etc.

etc.

etc.

Hello


@jfeo wrote:

I been using static nat and has been cumbersome to manage. For example I will do a /24 static nat to make all the NATs are known for monitoring. Question came up that can we NAT a subnet and they will always line up with last octet the same


Yes you can , either statically or dyamically

Example of Dynamic nat matchng host
access-list 100 permit ip 10.10.10.0 0.0.0255 any
ip nat pool Nat-Host 192.168.1.2 192.168.1.253 prefix-length 24 type match-host
ip nat inside source list 100 pool Nat-Host

The above nat example will nat inside local hosts residing in the 10.10.10.0 /24 subnet to its related natted inside global ip address of 192.168.1.x


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Ok that is how I can match the end host. Can I apply this do any VRF?

Hello


@jfeo wrote:

Ok that is how I can match the end host. Can I apply this do any VRF?


 ip nat inside source list 100 pool Nat-Host vrf xxx


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking products for a $25 gift card