06 - CGN Configuration
06 - CGN Configuration
06 - CGN Configuration
What is CGNAT?
Carrier Grade NAT (CGN or CGNAT), also known as Large Scale NAT (LSN) is a
means to solve the problem of the limited number of IP addresses available
in the 32-bit IPv4 address space. It employs translation devices built into
the operator's network to transform private network addresses into public
IPv4 addresses. Thus, it is possible to share small packets of public
addresses between several end sites, or which greatly expand the capacity of
the existing network.
One CGN usage scenario was labeled NAT444 because some customer connections
to Internet services on the public Internet passed through three different
IPv4 addressing domains: the consumer's private network, the provider's
private network, and the public internet.
2
www.l8group.net
A10 CGN Solutions to Extend IPv4 (NAT44/444)
www.l8group.net
Types of CGNAT configuration
Static
In the static configuration, the port range is fixed for each inside client.
Dynamic
It depends!!!!
www.l8group.net
Fixed-NAT: alternate configuration mechanism
Map inside addresses to public address and L4 port range
Deterministic allocation
L4 ports pre-allocated
ü User Quota
ü Less / No logging
ü Easier Environment Provisioning?
www.l8group.net
Fixed-Nat Dynamic Pool
Optional hybrid Fixed/Dynamic
www.l8group.net
Components of a Fixed-NAT configuration
www.l8group.net
Define a Fixed-Nat
Configure Fixed-NAT global configuration level (command on 1 line)
Cgnv6 fixed-nat inside 100.64.0.2 100.64.15.254 netmask /20 nat 192.0.2.255
192.0.2.254 netmask /27 dynamic-pool-size 5000 vrid 1
www.l8group.net
Fixed NAT math
It’s advised to creat CGNAT from: 1/16, 1/32, 1/64
Let’s understand about quantity of ports:
We know that a single IP has 65535 ports, but because of good practices we
should preserve the ports from 0-1023, that are reserved as service ports.
Ports per clients: Considering the need to serve 2048 clients using 2
Thousand ports , how many public ips will i need?
64511
= 2000 𝑃𝑜𝑟𝑡𝑠 𝑝𝑒𝑟 𝑢𝑠𝑒𝑟
32 2048
= 64 𝑃𝑢𝑏𝑙𝑖𝑐 𝑖𝑝𝑠
64511 32
= 1000 𝑃𝑜𝑟𝑡𝑠 𝑝𝑒𝑟 𝑢𝑠𝑒𝑟
64
www.l8group.net
Components of a NAT44(4) LSN configuration
Aka Dynamic-NAT
NAT-Pool
Limit-ID
Class List of IP addresses / subnets
Source Class List Binding
Inside/Outside Interfaces
10
www.l8group.net
Define a NAT Pools
Configure NAT pools at the global configuration level
Cgnv6 nat pool NAT1 192.168.0.2.224 192.0.2.254 netmask /27 vrid 1
11
www.l8group.net
Define NAT Pool Group (Best Practice)
Configure NAT pool groups at global configuration level
Cgnv6 nat pool-group NAT-Group
member NAT1
member NAT2
member NAT3
12
www.l8group.net
Configuring IP address selection algorithms
Algorithm for IP address selection from NAT pool is configurable on a global basis
13
www.l8group.net
User Quotas
14
www.l8group.net
Define LSN Limit IDs (LID) – the policy
LID define policy, i.e., the rules
Configure LSN-LID at global configuration level
Cgnv6 lsn-lid 1
source-nat-pool NAT-Group
user-quota icmp 50
user-quota udp 250
user-quota tcp 250
15
www.l8group.net
Understanding class lists
Classifies/segments address space into groups
Set of IP host or subnet addresses and mapping to LSN LIDs
1 list -> 64,000 subnets and 8 million host IP addresses
Each entry (row) defines a class
Supports IPv4 or IPv6 addresses
16
www.l8group.net
Define and Bind LSN Class List
Create the class list at global configuration level
Class-list CL_CGN1
100.64.1.0/24 lsn-lid 1 subnet class
100.64.254.123 lsn-lid 2 host class
100.64.8.6/32 lsn-lid 3 host class
0.0.0.0/0 lsn-lid 1023 wildcard class
17
www.l8group.net
Configure inside and Outside LSN interfaces
IP inside NAT interfaces: ingress for traffic to be NATed (client side)
18
www.l8group.net
Troubleshooting LSN
Confirm Ip nat inside/outside
show interfaces [ [ethernet 1] or [ve 100] ]
19
www.l8group.net
Troubleshooting LSN Sessions
Check sessions
show session […]
show session filter <filter>
Clear sessions
clear session [all | filter <filter>
Check sessions for internal (NATed) user
sh cgnv6 lsn inside-user <user.inside.IP.addr>
20
www.l8group.net