深入理解Netscaler INat
深入理解Netscaler INat
http://blog.51cto.com/caojin/1898173
Netscaler的INat主要是用作基于目的地址的转换,将client访问的公网IP通过Netscaler转换成服务器的私网IP,与DNAT作用类似。由于Netscaler默认的工作机制就是同时做源IP:【源端口】+目的IP:【目的端口】的转换,也就是说它默认执行了NAPT(端口映射)但有不完全等同与NAPT。NAPT只替换目的IP和端口,而Netscaler默认是全部替换的。
测试环境:
SNIP:10.110.110.121
10.110.140.151
10.110.140.152
MIP: 10.110.140.153
VIP:111.1.1.1
Client:10.110.110.146
Server VIP:10.110.140.150
Server:10.110.110.130
配置方法:
> add inat <name> <public ip> <private ip>(private ip不能是Netscaler所属的IP包括VIP)
-ftp ( ENABLED | DISABLED )
-mode STATELESS
-proxyIP <ip_addr|ipv6_addr>
-tcpproxy ( ENABLED | DISABLED )
-td <positive_integer>
-tftp ( ENABLED | DISABLED )
-usip ( ON | OFF )
-usnip ( ON | OFF )

When the appliance forwards a packet to a server, the source IP address assigned to the
packet is determined as follows:
If use subnet IP (USNIP) mode is enabled and use source IP (USIP) mode is disabled,
the NetScaler uses a subnet IP address (SNIP) as the source IP address.
If USNIP mode is disabled and USIP mode is disabled, the NetScaler uses a mapped IP
address (MIP) as the source IP address.
If USIP mode is enabled, and USNIP mode is disabled the NetScaler uses the client IP
(CIP) address as the source IP address.
If both USIP and USNIP modes are enabled, USIP mode takes precedence.
You can also configure the NetScaler to use a unique IP address as the source IP
address, by setting the proxyIP parameter.
If none of the above modes is enabled and a unique IP address has not been
specified, the NetScaler attempts to use a MIP as the source IP address.
If both USIP and USNIP modes are enabled and a unique IP address has been
specified, the order of precedence is as follows: USIP-unique IP-USNIP-MIP-Error.
To protect the NetScaler from DoS attacks, you can enable TCP proxy. However, if other
protection mechanisms are used in your network, you may want to disable them.
如果启用了proxy ip,那么与服务器连接就只用一个SNIP,与静态DNAT类似

如果关闭proxy ip,Netscaler将采用轮训的方式,用与私网目的IP一个网段的SNIP来连接服务器,类似动态DNAT

只打开USIP时,Netscaler会用client的源ip来与后台私网连接(由于测试环境没有去client的路由因此没有完成TCP连接)

同时打开USIP和USNIP时,由于USIP的优先级高于USNIP,Netscaler会用client的源ip来与后台私网连接(由于测试环境没有去client的路由因此没有完成TCP连接)

关闭USIP和USNIP后,Netscaler会用MIP来与后台连接

关闭USIP和USNIP,但选择了Proxy IP后,被选择的SNIP优先高于MIP,会用它与后台服务器连接

不管是用USIP还是USNIP,启用了TCP proxy后Netscaler都会用client源IP来与后台连接,tcp proxy可以保护Netscaler抵抗DOS攻击

Mode中的stateless只能应用与IPV4-IPV6的转换
深入理解Netscaler INat的更多相关文章
- Netscaler立身之本—NAT
Netscaler立身之本—NAT http://blog.51cto.com/caojin/1926579 一.前言 ADC的主要作用是作为服务器的反向代理来进行应用发布的,介于客户端和服务器端之间 ...
- Neutron 理解 (7): Neutron 是如何实现负载均衡器虚拟化的 [LBaaS V1 in Juno]
学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GR ...
- nginx配置之深入理解
继上一篇<debian+nginx配置初探--php环境.反向代理和负载均衡>成功之后,有点小兴奋,终于不用整lvs那么复杂来搞定负载,但还是有很多概念没弄清楚. 什么是CGI.FastC ...
- Netscaler工作流程
Netscaler工作流程 http://blog.51cto.com/caojin/1898310 Citrix Netscaler有很多功能模块来满足应用交付的需求,为了能够做好的配置和排错工作, ...
- NetScaler的cookieinsert和sourceip联合保持机制
NetScaler的cookieinsert和sourceip联合保持机制 使用NetScaler的cookieinsert和sourceip联合进行session保持机制即主用cookieinser ...
- 理解CSS视觉格式化
前面的话 CSS视觉格式化这个词可能比较陌生,但说起盒模型可能就恍然大悟了.实际上,盒模型只是CSS视觉格式化的一部分.视觉格式化分为块级和行内两种处理方式.理解视觉格式化,可以确定得到的效果是应 ...
- 彻底理解AC多模式匹配算法
(本文尤其适合遍览网上的讲解而仍百思不得姐的同学) 一.原理 AC自动机首先将模式组记录为Trie字典树的形式,以节点表示不同状态,边上标以字母表中的字符,表示状态的转移.根节点状态记为0状态,表示起 ...
- 理解加密算法(三)——创建CA机构,签发证书并开始TLS通信
接理解加密算法(一)--加密算法分类.理解加密算法(二)--TLS/SSL 1 不安全的TCP通信 普通的TCP通信数据是明文传输的,所以存在数据泄露和被篡改的风险,我们可以写一段测试代码试验一下. ...
- node.js学习(三)简单的node程序&&模块简单使用&&commonJS规范&&深入理解模块原理
一.一个简单的node程序 1.新建一个txt文件 2.修改后缀 修改之后会弹出这个,点击"是" 3.运行test.js 源文件 使用node.js运行之后的. 如果该路径下没有该 ...
随机推荐
- centos下安装docker以及docker-composer
背景 docker已经出来了很久,而我一直想混迹到docker大军中进行冲锋陷阵,恰逢公司项目的需要,因此今天玩了一把docker的安装.使用Docker 一键部署 LNMP+Redis 环境 事先准 ...
- maven-生命周期与插件
Maven的生命周期是抽象的,具体的操作由插件实现,类似于java的模板设计模式. 1.生命周期 认识生命周期 maven有clean.default.site三种生命周期,每种生命周期都包含一些阶段 ...
- Java源码解析——集合框架(一)——ArrayList
ArrayList源码分析 ArrayList就是动态数组,是Array的复杂版本,它提供了动态的增加和减少元素.灵活的设置数组的大小. 一.类声明 public class ArrayList< ...
- C# Regex正则验证规则
using System; using System.Text.RegularExpressions; namespace MetarCommonSupport { /// <summary&g ...
- 【tp5.1】七牛云上传图片
composer安装: composer require qiniu/php-sdk 配置使用: 在tp5.1的配置文件app.php中配置七牛云的参数 'qiniu' => [ 'access ...
- Ubuntu 16.04 swoole扩展安装注意!!!
前言:目前很多项目估计常常会用到swoole扩展,如个人使用Ubuntu虚拟机安装扩展,这里总结一下遇到的问题: 一.先保证服务器时间同步当前地区时间,如北京时间: 1.设定时区 如:设定时区:dpk ...
- [转]select top n 动态赋值
怎样实现 select top n 语句中 n 的动态赋值呢?怎样实现 select top n 语句中 n 的动态赋值,求教各位了. 要把这个n值传到存储过程中,再加入 select t ...
- PHP(YII2实现) 微信网页授权
参考地址 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842 实现步骤分析: 获取code->access ...
- python 函数 练习
# 2.写函数,接收n个数字,求这些参数数字的和. def sum_func(*args): total = 0 for i in args: total += i return total prin ...
- PHP中的mysql_unbuffered_query与mysql_query的区别
对于mysql_query大家都很熟悉,下面先简单介绍下mysql_unbuffered_query mysql_unbuffered_query (PHP 4 >= 4.0.6, PHP 5) ...