简介
本文档介绍Cisco Nexus 7000 RISE与Citrix NetScaler的集成。
Cisco®远程集成服务引擎(RISE)是一种创新解决方案,允许任何Citrix NetScaler服务设备(无论是物理设备还是虚拟设备)在Cisco Nexus® 7000系列交换机上显示为虚拟线卡。Cisco RISE在网络数据平面和服务设备之间建立通信路径。这种紧密集成简化了服务部署并优化了应用数据路径,从而提高了数据中心的运营效率。
Cisco RISE的主要优势包括:
●增强的设备可用性:Cisco RISE通过从服务设备获取实时路由更新来实现对服务设备的高效管理,从而降低应用流量丢弃路由的可能性。通过利用扩展控制平面,Cisco RISE可在应用和设备级别提供更快的融合和从服务故障中恢复。Cisco RISE还通过自动发现和引导来增强日常体验,从而减少管理员参与的需要。
●数据路径优化:管理员可以使用各种Cisco RISE功能在动态数据中心中自动化和优化网络服务交付。在应用交付控制器(ADC)中,自动化的基于策略的路由(APBR)使设备能够获取自动实施路由所需的Cisco Nexus交换机参数。这些路由在调配新应用时动态获取。APBR无需管理员手动配置基于策略的路由来将服务器响应流量重定向到ADC,同时保留客户端的源IP地址。
● Cisco RISE还支持与Cisco Prime™网络分析模块(NAM)2300平台设备进行控制平面集成,从而简化网络管理员的操作体验。Cisco Prime NAM与Cisco Nexus 7000系列交换机集成,可提供应用可视性、性能分析和更深入的网络智能。此可视性使管理员能够有效地管理分布式应用的交付。Cisco RISE集成将不断发展,以透明地扩展交换机上多个虚拟设备环境(VDC)的可见性,进一步提高运营灵活性和简便性。可扩展性和灵活性:Cisco RISE可部署在Cisco Nexus 7000系列交换机上,并允许服务设备在VDC中运行,从而允许以多种方式部署独立服务实例,例如一对多、多对一和无数种多对多配置,以支持任何多租户方案。
●提高业务灵活性:Cisco RISE可通过实时调配资源来适应不断增长的数据中心和客户需求。Cisco RISE还减少了推出新服务所需的时间,消除了重新设计网络的需要,并对不断变化的客户需求作出动态响应。
要求
基本了解NXOS和RISE
基本了解NetScaler。
使用的组件
本文档中的信息基于以下软件和硬件版本:
- Nexus 7010软件NXOS 6.2(16)
- Citrix NetScaler NSMPX-11500。软件版本:NS11.1:构建50.10.nc
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
拓扑
概述
在实验中,我们有以下设备:
- 运行Windows 2008 R2的两台服务器:IIS作为Web服务器。每台服务器都有测试网页
- Nexus 7000 交换机:在此交换机上运行的RISE服务,将HTTP流量重定向到NetScaler
- Citrix NetScaler:执行流量负载均衡
- 管理测试PC
在本实验中,NetScaler启用了USIP,以提供以下优势:
- Web服务器日志可以使用真IP地址提高可跟踪性
- Web服务器可以灵活使用实际IP地址来控制谁可以访问
- Web应用需要客户端IP,以便自己进行日志记录
- Web应用需要客户端IP进行身份验证
如果没有USIP,所有HTTP请求源IP地址都将显示自NetScaler。
启用USIP后,流量如下:
- 在PC上,打开Web浏览器并转到http://40.40.41.101/test.html。
- HTTP请求将到达Nexus 7000。N7K将流量重定向到NetScaler。
- NetScaler将请求发送到服务器之一。
- 服务器HTTP响应到达N7K,但源IP地址是服务器的实际地址,例如源IP地址可以是30.30.32.35或30.30.31.33。由于N7K已配置RISE,因此它不会直接将响应发送到PC。相反,它使用PBR查找并再次向NetScaler发送HTTP响应。这可确保流量不会中断。
- NetScaler将HTTP响应源IP地址更改为VIP 40.40.41.101,并将HTTP响应发回PC
配置
Nexus 7010 配置
feature ospf
feature pbr
feature interface-vlan
feature hsrp
feature rise
vlan 1,99,125,130,132,201
route-map _rise-system-rmap-Vlan125 permit 1 !- - - - - >Generated by RISE. Manual configuration is NOT required.
match ip address _rise-system-acl-20.20.21.5-Vlan125 !- - - - - >Generated by RISE. Manual configuration is NOT required.
set ip next-hop 20.20.21.5 !- - - - - >Generated by RISE. Manual configuration is NOT required.
route-map _rise-system-rmap-Vlan132 permit 1 !- - - - - >Generated by RISE. Manual configuration is NOT required.
match ip address _rise-system-acl-20.20.21.5-Vlan132 !- - - - - >Generated by RISE. Manual configuration is NOT required.
set ip next-hop 20.20.21.5 !- - - - - >Generated by RISE. Manual configuration is NOT required.
interface Vlan99
description RISE control VLAN SVI
no shutdown
mtu 9216
no ip redirects
ip address 20.20.99.2/24
no ipv6 redirects
ip ospf passive-interface
hsrp version 2
hsrp 99
preempt
priority 110
ip 20.20.99.1
interface Vlan125
description RISE server 1 VLAN SVI
no shutdown
ip address 30.30.31.1/24
ip policy route-map _rise-system-rmap-Vlan125 !- - - - - >Generated by RISE. Manual configuration is NOT required.
interface Vlan130
description RISE testing PC VLAN SVI
no shutdown
ip address 100.100.100.1/24
interface Vlan132
description RISE server 2 VLAN SVI
no shutdown
ip address 30.30.32.1/24
ip policy route-map _rise-system-rmap-Vlan132 !- - - - - >Generated by RISE. Manual configuration is NOT required.
interface Vlan201
description RISE Data VLAN SVI
no shutdown
mtu 9216
no ip redirects
ip address 20.20.21.2/24
no ipv6 redirects
ip ospf passive-interface
hsrp version 2
hsrp 201
preempt
priority 110
ip 20.20.21.1
interface Ethernet9/1
description connect to Testing PC
switchport
switchport access vlan 130
no shutdown
interface Ethernet9/2
description connect to Server 1
switchport
switchport access vlan 125
no shutdown
interface Ethernet9/3
description connect to Server 2
switchport
switchport access vlan 132
no shutdown
interface Ethernet10/1
description connect to NetScaler
switchport
switchport mode trunk
switchport trunk allowed vlan 99,201
spanning-tree port type edge
no shutdown
service vlan-group 21 201
service type rise name ns21 mode indirect
vlan 99
vlan group 21
ip 20.20.99.5 255.255.255.0
no shutdown
NetScaler配置
#Configure NSIP, this is also the IP used by N7K for RISE
set ns config -IPAddress 20.20.99.5 -netmask 255.255.255.0
#Configure NSVLAN 99 and bind it to LACP channel LA/1
set ns config -nsvlan 99 -ifnum LA/1
# Enable RISE
enable ns feature WL SP LB CS CMP PQ SSL HDOSP REWRITE RISE
enable ns mode FR L3 USIP CKA TCPB Edge USNIP PMTUD RISE_APBR RISE_RHI
#Configure interfaces
set interface 10/1 -mtu 9000 -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0 -intftype "Intel 10G" -ifnum LA/1
add channel LA/1 -tagall ON -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0
set channel LA/1 -mtu 9000 -tagall ON -throughput 0 -lrMinThroughput 0 -bandwidthHigh 0 -bandwidthNormal 0
bind channel LA/1 10/1
#Add RISE control and data VLANs
add vlan 99
add vlan 201
#Configure RISE data VLAN IP address and bind interface to data VLAN
add ns ip 10.66.91.170 255.255.254.0 -vServer DISABLED -mgmtAccess ENABLED #This is for management only
add ns ip 20.20.21.5 255.255.255.0 -vServer DISABLED
bind vlan 201 -ifnum LA/1 -tagged #Need to be tagged because N7K E10/1 is configured as trunk port.
bind vlan 201 -IPAddress 20.20.21.5 255.255.255.0
# Configure Virtual Servers.
add ns ip 40.40.41.101 255.255.255.0 -type VIP -snmp DISABLED -hostRoute ENABLED -hostRtGw 20.20.21.5 -metric 100 -vserverRHILevel NONE -vserverRHIMode RISE
add server SERV-2 30.30.32.35
add server SERV-1 30.30.31.33
add service SVC-1-tcpHTTP SERV-1 TCP 80 -gslb NONE -maxClient 0 -maxReq 0 -cip DISABLED -usip YES -useproxyport YES -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA YES -TCPB NO -CMP NO
add service SVC-2-tcpHTTP SERV-2 TCP 80 -gslb NONE -maxClient 0 -maxReq 0 -cip DISABLED -usip YES -useproxyport YES -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA YES -TCPB NO -CMP NO
add lb vserver VSRV-40-tcpHTTP TCP 40.40.41.101 80 -persistenceType NONE -connfailover STATEFUL -cltTimeout 180
add lb vserver VSRV-40-tcpHTTPS TCP 40.40.41.101 443 -persistenceType NONE -connfailover STATEFUL -cltTimeout 180
bind lb vserver VSRV-40-tcpHTTP SVC-1-tcpHTTP
bind lb vserver VSRV-40-tcpHTTP SVC-2-tcpHTTP
#Configure route
add route 0.0.0.0 0.0.0.0 20.20.21.1
add route 10.0.0.0 255.0.0.0 10.66.91.1 # - - - - > For management only
add route 30.30.31.0 255.255.255.0 20.20.21.1
add route 30.30.32.0 255.255.255.0 20.20.21.1
#configure RISE to run in indirect mode
set rise param -indirectMode ENABLED
#Save config and reboot
save ns config
reboot
Are you sure you want to restart NetScaler (Y/N)? [N]:y
服务器
本示例使用Microsoft Windows 2008 R2 IIS作为Web服务器。请按照Windows文档说明如何配置IIS。
安装IIS后,您可以直接访问Web服务器VIP,而无需创建额外的网页。在本文档中,为了演示故障切换,我们在IIS主目录(默认为c:\inetpub\wwwroot)下的每台服务器上创建一个测试页“test.html”。 测试页的内容如下:
服务器1测试页内容:"这是服务器1"
服务器2测试页内容:"这是服务器2"
验证
使用本部分可确认配置能否正常运行。
在PC上验证
1.打开Web浏览器并转到http://40.40.41.101/test.html。它应显示一个测试页面。
2.关闭服务器1。重复步骤1。应显示“这是服务器2”
3.使服务器1联机并关闭服务器2。再次重复步骤1。它应显示“这是服务器1”
验证N7K
STLD1-630-01.05-N7K-RU21# show ip route static
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
40.40.41.101/32, ubest/mbest: 1/0 - - - - - - - - >RHI injected routes
*via 20.20.21.5, Vlan201, [100/0], 03:18:00, static
STLD1-630-01.05-N7K-RU21# show route-map
route-map _rise-system-rmap-Vlan125, permit, sequence 1 - - -- - - - - - >Generated by NetScaler.
Match clauses:
ip address (access-lists): _rise-system-acl-20.20.21.5-Vlan125
Set clauses:
ip next-hop 20.20.21.5
route-map _rise-system-rmap-Vlan132, permit, sequence 1 - - -- - - - - - >Generated by NetScaler.
Match clauses:
ip address (access-lists): _rise-system-acl-20.20.21.5-Vlan132
Set clauses:
ip next-hop 20.20.21.5
STLD1-630-01.05-N7K-RU21# sho access-lists dynamic - - - - - >Dynamic ACL download from NetScaler (or pushed by Netscaler)
IP access list __urpf_v4_acl__
10 permit ip any any
IPv6 access list __urpf_v6_acl__
10 permit ipv6 any any
IP access list _rise-system-acl-20.20.21.5-Vlan125
10 permit tcp 30.30.31.33/32 eq 443 any
20 permit tcp 30.30.31.33/32 eq www any
IP access list _rise-system-acl-20.20.21.5-Vlan132
10 permit tcp 30.30.32.35/32 eq 443 any
20 permit tcp 30.30.32.35/32 eq www any
IP access list sl_def_acl
statistics per-entry
10 deny tcp any any eq telnet syn
20 deny tcp any any eq www syn
30 deny tcp any any eq 22 syn
40 permit ip any any
STLD1-630-01.05-N7K-RU21# show run int vl 132
!Command: show running-config interface Vlan132
!Time: Mon Mar 27 03:44:13 2017
version 6.2(16)
interface Vlan132
no shutdown
ip address 30.30.32.1/24
ip policy route-map _rise-system-rmap-Vlan132 - - - - - >APBR, this command was generated by RISE
STLD1-630-01.05-N7K-RU21# show run int vl 125
!Command: show running-config interface Vlan125
!Time: Mon Mar 27 03:44:16 2017
version 6.2(16)
interface Vlan125
no shutdown
ip address 30.30.31.1/24
ip policy route-map _rise-system-rmap-Vlan125 - - - - - >APBR, this command was generated by RISE
STLD1-630-01.05-N7K-RU21#
TLD1-630-01.05-N7K-RU21# show rise
Name Slot Vdc Rise-Ip State Interface
Id Id
--------------- ---- --- --------------- ------------ ----------------
ns21 300 1 20.20.99.5 active N/A
RHI Configuration
ip prefix len nhop ip weight vlan vrf slot-id
--------------- ---------- --------------- ------ ---- ---------- -------
40.40.41.101 32 20.20.21.5 100 201 default 300 - - - - > RHI
APBR Configuration - - - - > APBR
rs ip rs port protocol nhop ip rs nhop apbr state slot-id
--------------- ------- -------- --------------- -------- ---------- -------
30.30.31.33 80 TCP 20.20.21.5 Vlan125 ADD DONE 300
30.30.31.33 443 TCP 20.20.21.5 Vlan125 ADD DONE 300
30.30.32.35 80 TCP 20.20.21.5 Vlan132 ADD DONE 300
30.30.32.35 443 TCP 20.20.21.5 Vlan132 ADD DONE 300