configure
system
chassis-mode d
exit all
configure
card 3
card-type iom3-xp
mda 1
mda-type isa-bb
no shutdown
exit
no shutdown
exit
card 4
card-type iom3-xp
mda 1
mda-type isa-bb
no shutdown
exit
no shutdown
exit all
configure isa
nat-group 1 create
active-mda-limit 2
mda 3/1
mda 4/1
no shutdown
exit all
A NAT outside pool is configured using the following command:
configure {router | service vprn <service-id>}
nat
outside
pool <nat-pool-name> [nat-group <nat-group-id> type <pool-type> create]
port-reservation {blocks <num-blocks> | ports <num-ports>}
port-forwarding-range <range-end>
subscriber-limit <subscriber-limit>
deterministic
port-reservation <num-ports>
exit
address-range <start-ip-address> <end-ip-address> create
exit
exit
exit
exit
nat-pool-name — Specifies the name of the NAT pool up to 32 characters max.
nat-group-id — Specifies the NAT group ID. The values are 1 — 4.
pool-type — Species the pool type (
large-scale).
num-blocks — Specifies the number of port-blocks per IP address. Setting num-blocks to one (1) for large scale NAT will enable 1:1 NAT for IP addresses in this pool The values are 1 — 64512
num-ports — Specifies the number of ports per block. The values are 1 — 32256
range-end — Specifies the end of the port range available for port forwarding. The values are 1023 — 65535
subscriber-limit Specifies the maximum number of subscribers per IP address.
A power of 2 (2^n) number for deterministic NAT
[1,2,4,8,16,32,64,128,256,512,1024,2048, 4096, 8192,16348, 32768]
1..65535 for non-deterministic NAT
default: 65535 for non-deterministic
num-ports — Specifies the number of ports in a deterministic port block that is allocated and dedicated to a single subscribers during the configuration phase. The values are 1..65535
start-ip-address — Specifies the beginning IP address in a.b.c.d form.
end-ip-address — Specifies the ending IP address in a.b.c.d. form.
A NAT policy is configured using the following command:
configure service nat
nat-policy <nat-policy-name> [create]
block-limit <[1..40]>
pool <nat-pool-name> {router <router-instance> | service-name <service-name>}
exit
nat-policy-name — Specifies the NAT policy name up to 32 characters max.
block-limit —The max number of deterministic plus dynamic port blocks that can be assigned to a single inside IP address. In other words, the maximum number of dynamic port blocks that can be assigned to an inside IP address when the deterministic port block is exhausted equals (block-limit - 1).
nat-pool-name — Specifies the NAT pool name up to 32 characters max.
router-instance — Specifies the router instance the pool belongs to, either by router name or
service ID. : <
router-name>|<
service-id>
The router name values are
Base or
service-id [1..2147483647]
service-name — Specifies the name of the service up to 64 characters max.
A NAT inside prefix is configured using the following command:
configure [router| service vprn <service-id>]
nat
inside
deterministic
classic-lsn-max-subscriber-limit <max>
prefix <ip-prefix/length> subscriber-type <nat-sub-type> nat-policy <nat-policy-name> create
map start <lsn-sub-address> end <lsn-sub-address> to <outside-ip-address>
no shutdown
exit
exit
exit
exit
max — The power of 2 (2^n) number that must match the largest subscriber limit number in a deterministic pool referenced from this inside routing instance. The range for this command is the same as the subscriber-limit command under the pool hierarchy. The values are 1,2,4,8 — 2768
ip-prefix/length — A prefix on the inside encompassing subscribers that will be deterministically mapped to an outside IP address and port block in the corresponding pool.
<ip-prefix/ip-pref*> <ipv4-prefix>/<ipv4-prefix-length> |
<ipv6-prefix>/<ipv6-prefix-length>
<
ipv4-prefix> a.b.c.d (host bits must be 0)
<
ipv4-prefix-length> [0..32]
<
ipv6-prefix> x:x:x:x:x:x:x:x (eight 16-bit pieces)
x:x:x:x:x:x:d.d.d.d
x - [0..FFFF]H
d - [0..255]D
<
ipv6-prefix-length> [0..128]
<
nat-sub-type> : classic-lsn-sub
<
nat-policy-name> Specifies a NAT policy name up to 32 characters in length.
•
|
Case 1 : Mapping multiple prefixes from the same VRF into the same outside pool.
|
•
|
Case 2 : Mapping multiple prefixes from the same VRF into different outside pools.
|
•
|
Case 3 : Mapping overlapping prefixes from different VRFs into the same outside pool.
|
The NAT outside pool is configured as follows:
configure router nat
outside
pool "nat-pool-1" nat-group 1 type large-scale create
port-reservation ports 180
port-forwarding-range 4023
subscriber-limit 128
deterministic
port-reservation 300
exit
address-range 192.168.0.1 192.168.0.100 create
exit
no shutdown
exit all
The NAT policy is configured as follows:
configure service nat
nat-policy "nat-policy-1" create
block-limit 4
pool "nat-pool-1" router Base
exit all
The NAT inside prefix is configured as follows:
configure service vprn 15001 nat
inside
destination-prefix 0.0.0.0/0
deterministic
classic-lsn-max-subscriber-limit 256
prefix 10.0.0.0/24 subscriber-type classic-lsn-sub
nat-policy "nat-policy-1" create
map start 10.0.0.0 end 10.0.0.255 to 192.168.0.1
no shutdown
exit
prefix 10.10.4.0/22 subscriber-type classic-lsn-sub
nat-policy "nat-policy-1" create
map start 10.10.4.0 end 10.10.7.255 to 192.168.0.3
no shutdown
exit all
•
|
The classic-lsn-max-subscriber-limit value should be greater or equal to the largest subscriber-limit of all pools referenced by NAT policies within the corresponding inside routing instance. It must be 2^n and affects ingress hashing of deterministic subscribers.
|
•
|
map statements are automatically created when the prefix is created and it is no shutdown.
|
show router 15001 nat lsn-hosts inside-ip-prefix 10.0.0.0/25
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.0.0.0 Base 192.168.0.1
10.0.0.1 Base 192.168.0.1
<snip>
10.0.0.127 Base 192.168.0.1
-------------------------------------------------------------------------------
No. of hosts: 128
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.0.0.128/25
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.0.0.128 Base 192.168.0.2
10.0.0.129 Base 192.168.0.2
<snip>
10.0.0.255 Base 192.168.0.2
-------------------------------------------------------------------------------
No. of hosts: 128
===============================================================================
show router nat lsn-blocks inside-ip 10.0.0.0
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.1 [4024..4323]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.0.0.0
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router nat lsn-blocks inside-ip 10.0.0.255
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.2 [42124..42423]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.0.0.255
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.10.4.0/25
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.10.4.0 Base 192.168.0.3
10.10.4.1 Base 192.168.0.3
<snip>
10.10.4.127 Base 192.168.0.3
-------------------------------------------------------------------------------
No. of hosts: 128
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.10.7.128/25
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.10.7.128 Base 192.168.0.10
10.10.7.129 Base 192.168.0.10
<snip>
10.10.7.255 Base 192.168.0.10
-------------------------------------------------------------------------------
No. of hosts: 128
===============================================================================
To show LSN blocks on the outside routing instance Base for the first inside IP within 10.10.4.0/24 prefix, the following command can be used:
show router nat lsn-blocks inside-ip 10.10.4.0
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.3 [4024..4323]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.10.4.0
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
To show LSN blocks on the outside routing instance Base for the last inside IP within 10.10.4.0/24 prefix, the following command can be used:
show router nat lsn-blocks inside-ip 10.10.7.255
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.10 [42124..42423]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:26
Inside router : vprn15001
Inside IP address : 10.10.7.255
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router nat lsn-blocks inside-ip 10.0.0.1
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.1 [4324..4623]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.0.0.1
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router nat lsn-blocks inside-ip 10.0.0.1
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.1 [4324..4623]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.0.0.1
192.168.0.1 [42424..42603]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:33:21
Inside router : vprn15001
Inside IP address : 10.0.0.1
-------------------------------------------------------------------------------
Number of blocks: 2
===============================================================================
Logging is verified using Log 99 (in case event-control nat events are generated) which shows the mapping details to the new dynamic block as follows:
137 2013/07/21 09:33:21.90 UTC MINOR: NAT #2012 Base NAT
"{1} Map 192.168.0.1 [42424-42603] MDA 4/1 -- 276824065 classic-lsn-sub vprn15001 10.0.0.1 at 2013/07/21 09:33:21"
show router nat lsn-blocks inside-ip 10.0.0.1
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.1 [4324..4623]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.0.0.1
192.168.0.1 [42424..42603]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:33:21
Inside router : vprn15001
Inside IP address : 10.0.0.1
192.168.0.1 [42604..42783]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:35:44
Inside router : vprn15001
Inside IP address : 10.0.0.1
-------------------------------------------------------------------------------
Number of blocks: 3
===============================================================================
Logging is verified using Log 99 (in case event-control nat events are generated) which shows the mapping details to the new dynamic block as follows:
138 2013/07/21 09:35:44.20 UTC MINOR: NAT #2012 Base NAT
"{2} Map 192.168.0.1 [42604-42783] MDA 4/1 -- 276824065 classic-lsn-sub vprn15001 10.0.0.1 at 2013/07/21 09:35:44"
show router nat lsn-blocks inside-ip 10.0.0.1
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.0.1 [4324..4623]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:30:20
Inside router : vprn15001
Inside IP address : 10.0.0.1
192.168.0.1 [42424..42603]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:33:21
Inside router : vprn15001
Inside IP address : 10.0.0.1
192.168.0.1 [42604..42783]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:35:44
Inside router : vprn15001
Inside IP address : 10.0.0.1
192.168.0.1 [42784..42963]
Pool : nat-pool-1
Policy : nat-policy-1
Started : 2013/07/21 09:37:08
Inside router : vprn15001
Inside IP address : 10.0.0.1
-------------------------------------------------------------------------------
Number of blocks: 4
===============================================================================
Logging is verified using Log 99 (in case event-control nat events are generated) which shows the mapping details to the new dynamic block as follows:
139 2013/07/21 09:37:08.10 UTC MINOR: NAT #2012 Base NAT
"{3} Map 192.168.0.1 [42784-42963] MDA 4/1 -- 276824065 classic-lsn-sub vprn15001 10.0.0.1 at 2013/07/21 09:37:08"
show router route-table 192.168.0.1/32
===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags] Type Proto Age Pref
Next Hop[Interface Name] Metric
-------------------------------------------------------------------------------
192.168.0.1/32 Remote NAT 00h07m50s 0
NAT outside to mda 4/1 0
-------------------------------------------------------------------------------
No. of Routes: 1
Flags: L = LFA nexthop available B = BGP backup route available
n = Number of times nexthop is repeated
===============================================================================
show isa nat-group 1 members
===============================================================================
ISA Group 1 members
===============================================================================
Group Member State Mda Addresses Blocks Se-% Hi Se-Prio
-------------------------------------------------------------------------------
1 1 active 3/1 4 1024 < 1 N 0
1 2 active 4/1 6 1536 < 1 N 0
-------------------------------------------------------------------------------
No. of members: 2
===============================================================================
show isa nat-group 1 member 2 statistics | match "no ip or port"
no ip or port : 2135
The NAT outside pools are configured as follows:
configure service vprn 15002 nat
outside
pool "nat-pool-2" nat-group 1 type large-scale create
port-reservation ports 80
subscriber-limit 256
deterministic
port-reservation 180
exit
address-range 192.168.2.1 192.168.2.200 create
exit
no shutdown
exit
pool "nat-pool-3" nat-group 1 type large-scale create
port-reservation ports 120
port-forwarding-range 4023
subscriber-limit 64
deterministic
port-reservation 840
exit
address-range 192.168.3.1 192.168.3.200 create
exit
no shutdown
exit all
The NAT policies are configured as follows:
configure service nat
nat-policy "nat-policy-2" create
block-limit 4
pool "nat-pool-2" router 15002
exit
nat-policy "nat-policy-3" create
block-limit 2
pool "nat-pool-3" router 15002
exit
exit all
The NAT inside prefix is configured as follows:
configure service vprn 15001 nat
inside
destination-prefix 0.0.0.0/0
deterministic
classic-lsn-max-subscriber-limit 256
prefix 10.1.0.0/23 subscriber-type classic-lsn-sub
nat-policy "nat-policy-2" create
map start 10.1.0.0 end 10.1.1.255 to 192.168.2.1
no shutdown
exit
prefix 10.2.0.0/22 subscriber-type classic-lsn-sub
nat-policy "nat-policy-3" create
map start 10.2.0.0 end 10.2.3.255 to 192.168.3.1
no shutdown
exit all
show router 15001 nat lsn-hosts inside-ip-prefix 10.1.0.0/24
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.1.0.0 15002 192.168.2.1
10.1.0.1 15002 192.168.2.1
<snip>
10.1.0.255 15002 192.168.2.1
-------------------------------------------------------------------------------
No. of hosts: 256
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.1.1.0/24
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.1.1.0 15002 192.168.2.2
10.1.1.1 15002 192.168.2.2
<snip>
10.1.1.255 15002 192.168.2.2
-------------------------------------------------------------------------------
No. of hosts: 256
===============================================================================
show router 15002 nat lsn-blocks inside-ip 10.1.0.0
===============================================================================
Large-Scale NAT blocks for vprn15002
===============================================================================
192.168.2.1 [1024..1203]
Pool : nat-pool-2
Policy : nat-policy-2
Started : 2013/07/21 09:55:49
Inside router : vprn15001
Inside IP address : 10.1.0.0
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router 15002 nat lsn-blocks inside-ip 10.1.1.255
===============================================================================
Large-Scale NAT blocks for vprn15002
===============================================================================
192.168.2.2 [46924..47103]
Pool : nat-pool-2
Policy : nat-policy-2
Started : 2013/07/21 09:55:49
Inside router : vprn15001
Inside IP address : 10.1.1.255
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.2.0.0/26
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.2.0.0 15002 192.168.3.1
10.2.0.1 15002 192.168.3.1
<snip>
10.2.0.63 15002 192.168.3.1
-------------------------------------------------------------------------------
No. of hosts: 64
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.2.3.192/26
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.2.3.192 15002 192.168.3.16
10.2.3.193 15002 192.168.3.16
<snip>
10.2.3.255 15002 192.168.3.16
-------------------------------------------------------------------------------
No. of hosts: 64 ===============================================================================
show router 15002 nat lsn-blocks inside-ip 10.2.0.0
===============================================================================
Large-Scale NAT blocks for vprn15002
===============================================================================
192.168.3.1 [4024..4863]
Pool : nat-pool-3
Policy : nat-policy-3
Started : 2013/07/21 09:56:23
Inside router : vprn15001
Inside IP address : 10.2.0.0
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router 15002 nat lsn-blocks inside-ip 10.2.3.255
===============================================================================
Large-Scale NAT blocks for vprn15002
===============================================================================
192.168.3.16 [56944..57783]
Pool : nat-pool-3
Policy : nat-policy-3
Started : 2013/07/21 09:56:23
Inside router : vprn15001
Inside IP address : 10.2.3.255
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
The NAT outside pool is configured as follows:
configure router nat
outside
pool "nat-pool-4" nat-group 1 type large-scale create
port-reservation ports 461
port-forwarding-range 4023
subscriber-limit 64
deterministic
port-reservation 500
exit
address-range 192.168.4.1 192.168.4.100 create
exit
no shutdown
exit all
The NAT policy is configured as follows:
configure service nat
nat-policy "nat-policy-4" create
block-limit 4
pool "nat-pool-4" router Base
exit all
The NAT inside prefix is configured as follows:
configure service vprn 15001 nat
inside
destination-prefix 0.0.0.0/0
deterministic
classic-lsn-max-subscriber-limit 256
prefix 10.5.0.0/20 subscriber-type classic-lsn-sub
nat-policy "nat-policy-4" create
map start 10.5.0.0 end 10.5.15.255 to 192.168.4.1
no shutdown
exit all
configure service vprn 15002 nat
inside
destination-prefix 0.0.0.0/0
deterministic
classic-lsn-max-subscriber-limit 128
prefix 10.5.0.0/27 subscriber-type classic-lsn-sub
nat-policy "nat-policy-4" create
map start 10.5.0.0 end 10.5.0.31 to 192.168.4.65
no shutdown
exit all
show router 15001 nat lsn-hosts inside-ip-prefix 10.5.0.0/26
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.5.0.0 Base 192.168.4.1
10.5.0.1 Base 192.168.4.1
<snip>
10.5.0.63 Base 192.168.4.1
-------------------------------------------------------------------------------
No. of hosts: 64
===============================================================================
show router 15001 nat lsn-hosts inside-ip-prefix 10.5.15.192/26
===============================================================================
Large-Scale NAT hosts for router 15001
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.5.15.192 Base 192.168.4.64
10.5.15.193 Base 192.168.4.64
<snip>
10.5.15.255 Base 192.168.4.64
-------------------------------------------------------------------------------
No. of hosts: 64
===============================================================================
To show LSN blocks on the outside routing instance Base for the first inside IP within 10.5.0.0/20 prefix, the following command can be used:
show router nat lsn-blocks inside-ip 10.5.0.0 inside-router 15001
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.4.1 [4024..4523]
Pool : nat-pool-4
Policy : nat-policy-4
Started : 2013/07/21 10:18:39
Inside router : vprn15001
Inside IP address : 10.5.0.0
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
To show LSN blocks on the outside routing instance Base for the last inside IP within 10.5.0.0/20 prefix, the following command can be used:
show router nat lsn-blocks inside-ip 10.5.15.255 inside-router 15001
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.4.64 [35524..36023]
Pool : nat-pool-4
Policy : nat-policy-4
Started : 2013/07/21 10:18:39
Inside router : vprn15001
Inside IP address : 10.5.15.255
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router 15002 nat lsn-hosts inside-ip-prefix 10.5.0.0/27
===============================================================================
Large-Scale NAT hosts for router 15002
===============================================================================
Inside IP Out-Router Outside IP
-------------------------------------------------------------------------------
10.5.0.0 Base 192.168.4.65
10.5.0.1 Base 192.168.4.65
<snip>
10.5.0.31 Base 192.168.4.65
-------------------------------------------------------------------------------
No. of hosts: 32
===============================================================================
show router nat lsn-blocks inside-ip 10.5.0.0 inside-router 15002
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.4.65 [4024..4523]
Pool : nat-pool-4
Policy : nat-policy-4
Started : 2013/07/21 10:19:40
Inside router : vprn15002
Inside IP address : 10.5.0.0
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
show router nat lsn-blocks inside-ip 10.5.0.31 inside-router 15002
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.4.65 [19524..20023]
Pool : nat-pool-4
Policy : nat-policy-4
Started : 2013/07/21 10:19:40
Inside router : vprn15002
Inside IP address : 10.5.0.31
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================
A tools command is available which shows the reverse mapping (outside to inside) for deterministic NAT instead of using logging.
tools dump nat deterministic-mapping outside-ip <ipv4-address> router <router-instance> outside-port <[1..65535]>
<ipv4-address> : a.b.c.d
<router-instance> : <router-name>|<service-id>
router-name - "Base"
service-id - [1..2147483647]
tools dump nat deterministic-mapping outside-ip 192.168.4.1 router "Base" outside-port 4024
classic-lsn-sub inside router 15001 ip 10.5.0.0 -- outside router Base ip 192.168.4.1 port 4024 at Sun Jul 21 10:32:44 UTC 2013
tools dump nat deterministic-mapping outside-ip 192.168.4.65 router "Base" outside-port 4024
classic-lsn-sub inside router 15002 ip 10.5.0.0 -- outside router Base ip 192.168.4.65 port 4024 at Sun Jul 21 10:33:38 UTC 2013
configure service nat deterministic-script location <remote-url>
admin nat save-deterministic-script
show service nat deterministic-script
===============================================================================
Deterministic NAT script data
===============================================================================
Location : ftp://*:*@10.10.10.10/pub/python/deterministic-
nat.py
Save needed : no
Last save result : success
Last save time : 2013/07/21 10:35:36
===============================================================================
user@external-server$./deterministic-nat.py
Usage: deterministic-nat.py {{DIRECTION PARAMS} | -h[elp] }
where DIRECTION := { -f[orward] | -b[ackward] }
where PARAMS := { -s[ervice] -a[ddress] -p[ort] }
user@external-server$./deterministic-nat.py -f -s 15001 -a 10.0.0.1
classic-lsn-sub has public ip address 192.168.0.1 from service 0 and is using ports [4324 - 4623]
user@external-server$./deterministic-nat.py -b -s 0 -a 192.168.0.1 -p 4325
classic-lsn-sub has private ip address 10.0.0.1 from service 15001
The NAT outside pools are configured as follows:
configure router nat
outside
pool "nat-pool-1" nat-group 1 type large-scale create
port-reservation ports 180
port-forwarding-range 4023
subscriber-limit 128
deterministic
port-reservation 300
exit
address-range 192.168.0.1 192.168.0.100 create
exit
no shutdown
exit
pool "nat-pool-Non-Deterministic" nat-group 1
type large-scale create
address-range 192.168.7.1 192.168.7.100 create
exit
no shutdown
exit all
The NAT policies are configured as follows:
configure service nat
nat-policy "nat-policy-1" create
block-limit 4
pool "nat-pool-1" router Base
exit
nat-policy "nat-policy-Non-Deterministic" create
pool "nat-pool-Non-Deterministic" router Base
exit all
The NAT inside prefixes are configured as follows:
configure service vprn 15001
nat
inside
destination-prefix 0.0.0.0/0
deterministic
classic-lsn-max-subscriber-limit 128
prefix 10.0.0.0/24 subscriber-type classic-lsn-sub
nat-policy "nat-policy-1" create
map start 10.0.0.0 end 10.0.0.255 to 192.168.0.1
no shutdown
exit
exit
nat-policy "nat-policy-Non-Deterministic"
exit all
show router nat lsn-blocks inside-ip 10.7.0.1
===============================================================================
Large-Scale NAT blocks for Base
===============================================================================
192.168.7.50 [1024..1527]
Pool : nat-pool-Non-Deterministic
Policy : nat-policy-Non-Deterministic
Started : 2013/07/21 10:59:59
Inside router : vprn15001
Inside IP address : 10.7.0.1
-------------------------------------------------------------------------------
Number of blocks: 1
===============================================================================