The following configuration shows dynamic address translation from a large prefix to a small pool, translating a /24 subnet to a pool of 10 addresses. Sessions from the first 10 host sessions are assigned an address from the pool on a first-come, first-served basis, and any additional requests are rejected. Each host with an assigned NAT addresses can participate in multiple sessions.
- [edit nat services]
- pool my-pool {
- address-range low 10.10.10.1 high 10.10.10.10;
- }
- rule src-nat {
- match-direction input;
-
- term t1 {
-
- from {
- source-address 192.168.1.0/24;
- }
-
- then {
-
- translated {
- translation-type source dynamic;
- source-pool my-pool;
- }
- }
- }
- }