簡介
本檔案介紹如何在思科以應用程式為中心的基礎架構(ACI)中設定網際網路通訊協定服務層級協定(IPSLA),以追蹤從一個L3out得知的靜態路由,並僅當子網可從第一個L3out連線時,才向另一個L3out通告。
必要條件
需求
思科建議您瞭解以下主題:
- ACI軟體4.1版及更高版本
- L3out指向外部裝置或伺服器
- EX和 — FX機箱
- 跟蹤路由以使用網際網路控制訊息通訊協定(ICMP)和TCP探測(在本範例中使用的是ICMP探測)
註:所有Cisco Nexus第二代交換機(包括 — EX和 — FX機箱)都支援ACI映像IP SLA。請閱讀IP SLA的准則和限制。
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- ACI版本5.2(2f)
- N9K-C93180YC-FX
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
某些伺服器有多個介面(如環回),可通過伺服器的物理IP地址從ACI訪問。在這種情況下,您可能要求新增靜態路由並在外部進行通告,但前提是伺服器的物理IP可以訪問。因此,IP SLA跟蹤功能是不可避免的配置,只能通過針對這些伺服器的L3out配置來實現。目前,橋接域上的靜態路由不支持IP SLA跟蹤功能。在本文檔中,我們將查詢使用IP SLA的伺服器示例和傳輸路由配置。
設定
- 朝向伺服器和N3K裝置的L3out。
- 為伺服器的物理IP地址配置IP SLA跟蹤。
- 在L3out下配置到使用IP SLA跟蹤的伺服器的靜態路由,並從另一個L3out通告到N3K。
網路圖表
ACI實驗拓撲
組態
摘要步驟:
ACI交換矩陣策略:
- 建立合約(例如,一個允許使用所有流量的通用預設過濾器,但您可以使用在同一租戶本地建立的特定過濾器來允許特定流量。在這種情況下,請確保允許我們用於IP SLA跟蹤的協定)。
- 建立指向伺服器10.100.0.100/24的新L3out(ACI端SVI 550,IP地址為10.100.0.254)
- 建立IP SLA跟蹤策略(IP SLA監控策略、跟蹤成員策略、跟蹤清單策略)
- 在L3out下向具有IP SLA跟蹤清單的伺服器新增靜態路由。
- 建立使用BGP(EBGP)ACI AS 65535和N3K AS 65536
- 從L3out向N3K匯出靜態路由。
- 驗證配置和可達性。
- 建立合約(例如,使用允許所有流量的通用預設過濾器,但是,您可以使用在同一租戶本地建立的特定過濾器來允許特定流量,但是在這種情況下,請確保允許使用我們用於IP SLA跟蹤的協定)。
建立合約
2.建立指向伺服器10.100.0.100/24的新L3out(ACI端SVI 550,IP地址為10.100.0.254)。
建立L3out
將節點連線到L3out
將介面連線到L3out
配置外部EPG
將合約附加到L3out
3.建立IP SLA跟蹤策略(IP SLA監視策略、跟蹤成員策略、跟蹤清單策略)。
IP SLA監控策略:
配置IP SLA監控策略
IP SLA跟蹤成員:
將IP新增到監控策略
跟蹤清單策略:
配置跟蹤清單
4.使用新建立的IP SLA跟蹤清單策略在L3out下配置通往伺服器的靜態路由。
在L3out下配置靜態路由
5.建立一個新的指向N3K裝置的L3out,該裝置使用邊界網關協定(BGP)。(EBGP)ACI AS 65535和N3K AS 65536。
設定BGP通訊協定
BGP對等設定檔
配置BGP對等策略
在L3out下配置邏輯介面配置檔案
外部EPG匯出傳輸中的子網L3out
將合約附加到外部EPG
6.從L3out向N3K匯出靜態路由。
switchname N3K
feature bgp
feature interface-vlan
interface Vlan550
no shutdown
vrf member BGP_L3out
ip address 100.0.0.2/30
interface loopback200
vrf member BGP_L3out
ip address 30.30.30.1/32
interface Ethernet1/1
switchport mode trunk
router bgp 65536
address-family ipv4 unicast
neighbor 100.0.0.1
vrf BGP_L3out
router-id 3.3.3.3
address-family ipv4 unicast
network 30.30.30.1/32
neighbor 100.0.0.1
remote-as 65535
update-source Vlan550
address-family ipv4 unicast
驗證
使用本節內容,確認您的組態是否正常運作。
Nexus3K。
傳輸路由通告由拓撲說明
N3K# routing vrf BGP_L3out
N3K%BGP_L3out# show ip route
IP Route Table for VRF "BGP_L3out"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF
30.30.30.1/32, ubest/mbest: 2/0, attached
*via 30.30.30.1, Lo200, [0/0], 02:35:27, local
*via 30.30.30.1, Lo200, [0/0], 02:35:27, direct
100.0.0.0/30, ubest/mbest: 1/0, attached
*via 100.0.0.2, Vlan550, [0/0], 05:52:18, direct
100.0.0.2/32, ubest/mbest: 1/0, attached
*via 100.0.0.2, Vlan550, [0/0], 05:52:18, local
200.0.0.1/32, ubest/mbest: 1/0
*via 100.0.0.1, [20/0], 02:32:36, bgp-65536, external, tag 65535
源為N3K環回地址可訪問伺服器環回。
N3K
interface loopback200
vrf member BGP_L3out
ip address 30.30.30.1/32
N3K# ping 200.0.0.1 vrf BGP_L3out source 30.30.30.1
PING 200.0.0.1 (200.0.0.1): 56 data bytes
64 bytes from 200.0.0.1: icmp_seq=0 ttl=252 time=0.94 ms
64 bytes from 200.0.0.1: icmp_seq=1 ttl=252 time=0.729 ms
64 bytes from 200.0.0.1: icmp_seq=2 ttl=252 time=0.658 ms
64 bytes from 200.0.0.1: icmp_seq=3 ttl=252 time=0.706 ms
64 bytes from 200.0.0.1: icmp_seq=4 ttl=252 time=0.655 ms
--- 200.0.0.1 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.655/0.737/0.94 ms
ACI枝葉102路由表(具有指向Nexus 3K的L3out)。
Leaf102# show ip route vrf TN_D:VRF_S
IP Route Table for VRF "TN_D:VRF_S"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF
10.100.0.0/24, ubest/mbest: 1/0
*via 10.0.96.64%overlay-1, [200/0], 02:56:36, bgp-65535, internal, tag 65535
30.30.30.1/32, ubest/mbest: 1/0 <<address of N3K.
*via 100.0.0.2%TN_D:VRF_S, [20/0], 02:44:34, bgp-65535, external, tag 65536
100.0.0.0/30, ubest/mbest: 1/0, attached, direct
*via 100.0.0.1, vlan19, [0/0], 05:09:37, direct
100.0.0.1/32, ubest/mbest: 1/0, attached
*via 100.0.0.1, vlan19, [0/0], 05:09:37, local, local
101.101.101.101/32, ubest/mbest: 1/0
*via 10.0.96.64%overlay-1, [1/0], 02:56:36, bgp-65535, internal, tag 65535
102.102.102.102/32, ubest/mbest: 2/0, attached, direct
*via 102.102.102.102, lo5, [0/0], 16:49:13, local, local
*via 102.102.102.102, lo5, [0/0], 16:49:13, direct
200.0.0.1/32, ubest/mbest: 1/0
*via 10.0.96.64%overlay-1, [1/0], 02:42:15, bgp-65535, internal, tag 65535
從CLI驗證枝葉101 IP SLA配置。
Leaf101# show ip sla configuration
IP SLAs Infrastructure Engine-III
Entry number: 2000
Owner: owner-icmp-echo-dme
Tag:
Operation timeout (milliseconds): 900
Type of operation to perform: icmp-echo
Target address/Source address: 10.100.0.100/0.0.0.0
Traffic-Class parameter: 0x0
Type Of Service parameter: 0x0
Request size (ARR data portion): 28
Verify data: No
Vrf Name: TN_D:VRF_S
Schedule:
Operation frequency (seconds): 5 (not considered if randomly scheduled)
Next Scheduled Start Time: Start Time already passed
Group Scheduled : FALSE
Randomly Scheduled : FALSE
Life (seconds): Forever
Entry Ageout (seconds): 3600
Recurring (Starting Everyday): FALSE
Status of entry (SNMP RowStatus): Active
Threshold (milliseconds): 900
Distribution Statistics:
Number of statistic hours kept: 2
Number of statistic distribution buckets kept: 1
Statistic distribution interval (milliseconds): 20
History Statistics:
Number of history Lives kept: 0
Number of history Buckets kept: 15
History Filter Type: None
Leaf101# show track brief
TrackId Type Instance Parameter State Last Change
4 IP SLA 2000 reachability up 2021-09-16T18:08:42.364+00:00
3 List --- percentage up 2021-09-16T18:08:42.365+00:00
Leaf101# show track
Track 1
List Threshold percentage
Threshold percentage is up
6 changes, last change 2021-09-16T00:01:50.339+00:00
Threshold percentage up 1% down 0%
Tracked List Members:
Object 2 (100)% up
Attached to:
Route prefix 200.0.0.1/32
Track 2
IP SLA 2000
reachability is up
6 changes, last change 2021-09-16T00:01:50.338+00:00
Tracked by:
Track List 1
使用託管對象查詢(Moquery)命令進行驗證:
apic1# moquery -c fvIPSLAMonitoringPol -f 'fv.IPSLAMonitoringPol.name=="ICMP_Monitor"'
Total Objects shown: 1
# fv.IPSLAMonitoringPol
name : ICMP_Monitor
annotation :
childAction :
descr :
dn : uni/tn-TN_D/ipslaMonitoringPol-ICMP_Monitor
extMngdBy :
httpMethod : get
httpUri : /
httpVersion : HTTP10
ipv4Tos : 0
ipv6TrfClass : 0
lcOwn : local
modTs : 2021-09-15T21:18:48.195+00:00
monPolDn : uni/tn-common/monepg-default
nameAlias :
ownerKey :
ownerTag :
reqDataSize : 28
rn : ipslaMonitoringPol-ICMP_Monitor
slaDetectMultiplier : 3
slaFrequency : 5
slaPort : 0
slaType : icmp
status :
threshold : 900
timeout : 900
uid : 15374
userdom : :all:
apic1# moquery -c fvTrackMember -f 'fv.TrackMember.name=="Server_Physical_IP"'
Total Objects shown: 1
# fv.TrackMember
name : Server_Physical_IP
annotation :
childAction :
descr :
dn : uni/tn-TN_D/trackmember-Server_Physical_IP
dstIpAddr : 10.100.0.100
extMngdBy :
id : 2000
lcOwn : local
modTs : 2021-09-15T21:16:22.992+00:00
monPolDn : uni/tn-common/monepg-default
nameAlias :
ownerKey :
ownerTag :
rn : trackmember-Server_Physical_IP
scopeDn : uni/tn-TN_D/out-L3out_Static_server
status :
uid : 15374
userdom : :all:
apic1# moquery -c fvTrackList -f 'fv.TrackList.name=="Tracking_Server_Physical_IP"'
Total Objects shown: 1
# fv.TrackList
name : Tracking_Server_Physical_IP
annotation :
childAction :
descr :
dn : uni/tn-TN_D/tracklist-Tracking_Server_Physical_IP
extMngdBy :
lcOwn : local
modTs : 2021-09-15T07:41:15.958+00:00
monPolDn : uni/tn-common/monepg-default
nameAlias :
ownerKey :
ownerTag :
percentageDown : 0
percentageUp : 1
rn : tracklist-Tracking_Server_Physical_IP
status :
type : percentage
uid : 15374
userdom : :all:
weightDown : 0
weightUp : 1
疑難排解
目前尚無適用於此組態的具體疑難排解資訊。
如果鏈路斷開或物理IP地址無法訪問,ACI IP SLA在配置的閾值達到之後顯示目標IP「timeout」。
L3out介面關閉
鏈路關閉後IP SLA監控鏈路狀態
枝葉101 CLI驗證(您可以看到「上次操作返回代碼」超時)。
Leaf101# show ip sla statistics
IPSLAs Latest Operation Statistics
IPSLA operation id: 2000
Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: 23:54:30 UTC Wed Sep 15 2021
Latest operation return code: Timeout
Number of successes: 658
Number of failures: 61
Operation time to live: forever
只要伺服器可訪問,它就會顯示OK狀態。
鏈路啟動後的IP SLA監控狀態
Leaf101# show ip sla statistics
IPSLAs Latest Operation Statistics
IPSLA operation id: 2000
Latest RTT: 1 milliseconds
Latest operation start time: 00:03:15 UTC Thu Sep 16 2021
Latest operation return code: OK
Number of successes: 18
Number of failures: 86
Operation time to live: forever
相關資訊