簡介
本文檔介紹Cisco Nexus 7000 RISE與Citrix NetScaler的整合。
Cisco®遠端整合服務引擎(RISE)是一種創新解決方案,允許任何Citrix NetScaler服務裝置(物理或虛擬)在Cisco Nexus® 7000系列交換機上顯示為虛擬線卡。Cisco RISE在網路資料平面和服務裝置之間建立通訊路徑。這種緊密整合簡化了服務部署並最佳化了應用程式資料路徑,從而提高了資料中心的運營效率。
Cisco RISE的主要優勢包括:
● 增強的裝置可用性:Cisco RISE通過從服務裝置獲取即時路由更新來實現對服務裝置的有效管理,從而降低應用流量丟棄路由的可能性。通過利用擴展的控制平面,Cisco RISE可以在應用和裝置級別提供更快的收斂速度和服務故障恢復。Cisco RISE還通過自動發現和引導增強了0天體驗,從而減少了管理員參與的需求。
● 資料路徑最佳化:管理員可以使用各種Cisco RISE功能自動化和最佳化動態資料中心中的網路服務交付。在應用交付控制器(ADC)中,基於策略的自動路由(APBR)使裝置能夠獲得自動實施路由所需的Cisco Nexus交換機引數。每當調配新的應用程式時,都會動態獲知這些路由。APBR無需管理員手動配置基於策略的路由,將伺服器響應流量重定向到ADC,同時保留客戶端的源IP地址。
● Cisco RISE還實現了與Cisco Prime™ Network Analysis Module(NAM)2300平台裝置的控制平面整合,簡化了網路管理員的操作體驗。Cisco Prime NAM與Cisco Nexus 7000系列交換機整合,可提供應用可視性、效能分析和更深入的網路智慧。這種可視性使管理員能夠有效地管理分散式應用的交付。思科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