set_real_ip_from <big-ip floating snat ip address>; real_ip_header X-Forwarded-For;
将 < big-ip floating snat ip address > 替换为活动BIG-IP在向NGINX Web服务器发送请求时使用的SNAT IP地址或浮动Self IP地址。对于 BIG-IP 不使用自 IP 浮动 IP 地址或使用 SNAT 池的配置,请为 SNAT 池的每个 SNAT IP 地址添加一行。
例如,对于 HA 部署,其中每个 BIG-IP 设备都使用 NGINX Web 服务器网络上的非浮动自 IP 地址。
1 2 3
set_real_ip_from <big-ip self ip address active device>; set_real_ip_from <big-ip self ip address standby device>; real_ip_header X-Forwarded-For;
注意: 在此示例*<big-ip self ip 地址活动设备>是活动 BIG-IP 设备的Self IP 地址,它使用 SNAT 将流量定向到 NGINX Web 服务器,<big-ip 自 IP 地址备用设备>*是备用 BIG-IP 设备的Self IP 地址,该设备使用 SNAT 将流量定向到 NGINX Web 服务器。
set_real_ip_from <snat pool ip address 1>; set_real_ip_from <snat pool ip address 2>; set_real_ip_from <snat pool ip address 3>; real_ip_header X-Forwarded-For;
*注: 将 **< snat pool ip address >*的每个实例替换为 SNAT 池配置中列出的每个 IP 地址。
Apache2
您可以将 Apache Web 服务器配置为从 X-Forwarded-For HTTP 标头中提取 IP 地址,并通过将相应的日志记录指令添加到主 Apache 配置文件(通常称为 httpd.conf)或相关的虚拟主机配置文件,将该 IP 地址记录到 Web 服务器日志文件中。
您可以将 Microsoft IIS Web 服务器配置为从 X-Forwarded-For HTTP 标头中提取 IP 地址,并将 IP 地址记录到 Web 服务器日志文件中。为此,必须从 DevCentral 上的 IIS X-Forwarded-For ISAPI 日志筛选器页下载并安装 IIS X-Forwarded-For ISAPI 日志筛选器的 32 位或 64 位发行版。若要安装筛选器,请使用 Microsoft IIS 管理器实用工具将其添加到 Microsoft IIS 网站。
dsmod user CN=user1,CN=Users,DC=yd,DC=cn-profile \\1.1.1.1\userprofile\$username$ dsmod user CN=user2,CN=Users,DC=yd,DC=cn-profile \\1.1.1.1\userprofile\$username$ dsmod user CN=user3,CN=Users,DC=yd,DC=cn-profile \\1.1.1.1\userprofile\$username$
Cisco Catalyst 9404R和Cisco Catalyst 9407R支持(16.11.1 and later can support StackWise Virtual on C9410R chassis and all the ports used for configuring a StackWise Virtual Link (SVL). Whether it is a port on the supervisor module or a port on the linecard.)
SW01#conf t SW01(config)#interface range TenG3/0/1 - 2 SW01(config-if)stackwise-virtual link 1 SW01(config-if)#end
SW02#conf t SW02(config)#interface range TenG3/0/1 - 2 SW02(config-if)stackwise-virtual link 1 SW02(config-if)#end
最后,配置dual-active detection(DAD)将使用的接口。 最多可以配置四个。
1 2 3 4 5 6 7 8 9
SW01#conf t SW01(config)#interface GigabitEthernet1/1/0/1 SW01(config-if)stackwise-virtual dual-active-detection SW01(config-if)#end
SW02#conf t SW02(config)#interface GigabitEthernet1/1/0/1 SW02(config-if)stackwise-virtual dual-active-detection SW02(config-if)#end
所有配置完成之后保存重启
1 2 3 4 5
BrainSW01#wr mem BrainSW01#reload
BrainSW02#wr mem BrainSW02#reload
可以使用以下命令验证配置
1 2 3 4 5 6 7 8
show switch show stackwise-virtual show stackwise-virtual switch show stackwise-virtual link show stackwise-virtual bandwidth show stackwise-virtual neighbors show stackwise-virtual dual-active-detection show stackwise-virtual dual-active-detection pagp