This article provides information about the destination NAT with a contiguous block of addresses.
In case of a contiguous block of addresses, pool based destination NAT performs one-to-one mapping between the IP addresses in the match conditions to the IP addresses that are defined in the address pool.
The following scenarios are possible, in case of Destination NAT with more than one IP address in the match condition and the pool: Scenario 1 - The address range is equal in the match condition and address pool :
[edit] root@210-5# show security nat destination pool p1 { address 192.168.1.0/24; } rule-set rs1 { from zone trust; rule r1 { match { destination-address 20.1.1.0/24; } then { destination-nat pool p1; } } }
20.1.1.1 -> 192.168.1.1 20.1.1.2 -> 192.168.1.2 20.1.1.3 -> 192.168.1.4 …..
[edit] root@210-5# show security nat destination pool p1 { address 192.168.1.0/24; } rule-set rs1 { from zone trust; rule r1 { match { destination-address 20.1.1.16/28; } then { destination-nat pool p1; } } }
20.1.1.17 -> 192.168.1.1 20.1.1.18 -> 192.168.1.2 ….. 20.1.1.30 -> 192.168.1.14
[edit] root@210-5# show security nat destination pool p1 { address 192.168.1.16/28; } rule-set rs1 { from zone trust; rule r1 { match { destination-address 20.1.1.0/24; } then { destination-nat pool p1; } } }
20.1.1.1 -> 192.168.1.17 20.1.1.2 -> 192.168.1.18 ….. 20.1.1.14 -> 192.168.1.30 20.1.1.15 -> Untranslated …..
[edit] root@210-5# show security nat destination pool p1 { address 192.168.1.10/24; } rule-set rs1 { from zone trust; rule r1 { match { destination-address 20.1.1.0/24; } then { destination-nat pool p1; } } }
20.1.1.1 -> 192.168.1.10 20.1.1.2 -> 192.168.1.11 20.1.1.3 -> 192.168.1.12 ….. 20.1.1.244 -> 192.168.1.254 20.1.1.245 -> Untranslated 20.1.1.246 -> Untranslated …..
[edit] root@210-5# show security nat destination pool p1 { address 192.168.1.0/24; } rule-set rs1 { from zone trust; rule r1 { match { destination-address 20.1.1.10/24; } then { destination-nat pool p1; } } }
20.1.1.1 -> Untranslated 20.1.1.2 -> Untranslated ….. 20.1.1.10 -> 192.168.1.1 20.1.1.11 -> 192.168.1.2 ….. 20.1.1.254 -> 192.168.1.245