Wednesday, December 13, 2017

IxLoad and NAT

    When using NAT the IP seen/used in public is not the  one actually configured  in your private network.
I am going to  present here 3  particular cases so you will understand what needs to be configured in IxLoad in order to accommodate them. 
For all this  cases the client and the server  are emulated by IxLoad and the NAT is performed by  your DUT.

For easy reference I will use the  following IPs
client IP =10.1.1.1
server IP = 10.2.2.2
client  public IP ( when NAT is used)= 1.1.1.1
server public IP ( when NAT is used)= 2.2.2.2

-----------------------------------------------------------------------------------
Case 1: Client is behind NAT  and   the server is not NATed.
Client private IP= 10.1.1.1
Client public IP= 1.1.1.1
Server IP=  10.2.2.2
-----------------------------------------------------------------------------------
When the packet leaves the client is has the following IPs:
IP source=10.1.1.1
IP destination= 10.2.2.2
When the packet reaches the  server it has the  following IPs:
IP source= Client Public IP=1.1.1.1
IP destination= 10.2.2.2
***Our server emulations will reply to packets coming from any source ( not neceseraly the one configured on the client)
-----------------------------------------------------------------------------------
In IxLoad you should use the following :
Client range = 10.1.1.1
Server range = 10.2.2.2
***you do not need a DUT
Point the IxLoad client  activity directly to the server activity
-----------------------------------------------------------------------------------

-----------------------------------------------------------------------------------
Case 2: Client is not NATed and Server is behind NAT
Client IP=10.1.1.1
Server Private IP= 10.2.2.2
Server Public IP= 2.2.2.2
-----------------------------------------------------------------------------------
When the packet leaves the client it has the following IPs:
IP source=10.1.1.1
IP destination=2.2.2.2
When the packet reaches the  server it has the  following IPs:
IP source=Client IP= 10.1.1.1
IP destination= 10.2.2.2
***Our server emulations will reply to packets coming from any source ( not necessarily the one configured on the client)
-----------------------------------------------------------------------------------
In IxLoad you should use the following :
Client Activity range = 10.1.1.1
Server Activity range = 10.2.2.2
DUT  IP = 2.2.2.2 
Point the client  activity to the DUT
-----------------------------------------------------------------------------------

-----------------------------------------------------------------------------------
Case 3: Client is behind NAT and Server is behind NAT
Client private IP= 10.1.1.1
Client public IP= 1.1.1.1
Server Private IP= 10.2.2.2
Server Public IP= 2.2.2.2
When the packet leaves the client it has the following IPs:
IP source=10.1.1.1
IP destination= Server Public IP=2.2.2.2
When the packet reaches the  server it has the  following IPs:
IP source= Client Public IP =1.1.1.1
IP destination= Server Private IP=10.2.2.2
***Our server emulations will reply to packets coming from any source ( not necessarily the one configured on the client)
-----------------------------------------------------------------------------------
In IxLoad you should use the following :
Client Activity range = 10.1.1.1
Server Activity range = 10.2.2.2
DUT  IP = 2.2.2.2 
Point the client  activity to the DUT
-----------------------------------------------------------------------------------

-----------------------------------------------------------------------------------
Reference:
http://www.faqs.org/rfcs/rfc1631.html