本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本文描述在啟用定位器身份分離協定(LISP)的網路中跨資料中心(DC)移動的IP裝置的配置和驗證,無需更改其IP地址。
思科建議您瞭解LISP的基本知識。
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
在LISP環境中,此裝置稱為動態端點識別符號(EID)。LISP多跳移動支援子網擴展模式,該模式允許不同的DC具有相同的子網,從而允許虛擬機(VM)在遷移到其他DC時保留其分配的IP地址。
第一跳路由器(FHR)檢測動態EID的存在,並通過EID通知消息將其通知給xTR側網關。xTR註冊動態EID以對映伺服器,並對通過LISP域的流量執行LISP封裝和解除封裝功能。
部署在不同資料中心的xTR必須通過資料中心互聯(DCI)技術(如重疊傳輸虛擬化(OTV))進行連線。 在Nexus中,支援OTV組播模式。
此影象用作文檔其餘部分的示例拓撲。
在本文討論的示例中,流量從VM(172.16.54.200)持續流向站點3(172.16.20.1)。
第一躍點路由器(FHR-1):
!
feature lisp
!
ip lisp etr
!
lisp dynamic-eid VM
database-mapping 172.16.54.0/24 10.1.1.1 priority 10 weight 50
database-mapping 172.16.54.0/24 10.2.2.2 priority 10 weight 50
eid-notify 10.10.10.10 key 3 9125d59c18a9b015
map-notify-group 225.1.1.1
!
interface loopback0
ip address 10.1.1.1/32
ip router ospf 1 area 0.0.0.0
!
interface Vlan2
no shutdown
lisp mobility VM
lisp extended-subnet-mode
ip address 172.16.54.3/24
ip ospf passive-interface
ip router ospf 1 area 0.0.0.0
ip pim sparse-mode
no ip arp gratuitous request
hsrp 1
preempt
priority 120
ip 172.16.54.1
!
FHR-2:
!
feature lisp
!
ip lisp etr
!
lisp dynamic-eid VM
database-mapping 172.16.54.0/24 10.1.1.1 priority 10 weight 50
database-mapping 172.16.54.0/24 10.2.2.2 priority 10 weight 50
eid-notify 10.10.10.10 key 3 9125d59c18a9b015
map-notify-group 225.1.1.1
!
interface Vlan2
no shutdown
lisp mobility VM
lisp extended-subnet-mode
ip address 172.16.54.2/24
ip ospf passive-interface
ip pim sparse-mode
no ip arp gratuitous request
hsrp 1
preempt
priority 90
ip 172.16.54.1
!
interface loopback0
ip address 10.2.2.2/32
ip router ospf 1 area 0.0.0.0
xTR:
!
feature lisp
!
ip lisp itr-etr
ip lisp database-mapping 172.16.54.0/24 10.10.10.10 priority 10 weight 50
ip lisp itr map-resolver 192.168.1.1
ip lisp etr map-server 192.168.1.1 key 3 9125d59c18a9b015
!
lisp dynamic-eid VM
database-mapping 172.16.54.0/24 10.10.10.10 priority 10 weight 50
eid-notify authentication-key 3 9125d59c18a9b015
!
interface loopback0
ip address 10.10.10.10/32
ip router ospf 1 area 0.0.0.0
!
FHR-3:
!
feature lisp
!
ip lisp etr
!
lisp dynamic-eid VM
database-mapping 172.16.54.0/24 10.3.3.3 priority 10 weight 50
database-mapping 172.16.54.0/24 10.4.4.4 priority 10 weight 50
eid-notify 10.11.11.11 key 3 9125d59c18a9b015
map-notify-group 225.1.1.1
!
interface Vlan2
no shutdown
lisp mobility VM
lisp extended-subnet-mode
ip address 172.16.54.4/24
ip ospf passive-interface
ip router ospf 1 area 0.0.0.0
ip pim sparse-mode
no ip arp gratuitous request
hsrp 1
preempt
priority 110
ip 172.16.54.1
!
interface loopback0
ip address 10.3.3.3/32
ip router ospf 1 area 0.0.0.0
FHR-4:
!
feature lisp
!
ip lisp etr
!
lisp dynamic-eid VM
database-mapping 172.16.54.0/24 10.3.3.3 priority 10 weight 50
database-mapping 172.16.54.0/24 10.4.4.4 priority 10 weight 50
eid-notify 10.11.11.11 key 3 9125d59c18a9b015
map-notify-group 225.1.1.1
!
interface Vlan2
no shutdown
lisp mobility VM
lisp extended-subnet-mode
ip pim sparse-mode
ip ospf passive-interface
ip address 172.16.54.5/24
hsrp 1
preempt
priority 90
ip 172.16.54.1
!
interface loopback0
ip address 10.4.4.4/32
ip router ospf 1 area 0.0.0.0
xTR:
!
interface loopback0
ip address 10.11.11.11/32
ip router ospf 1 area 0.0.0.0
!
feature lisp
!
ip lisp itr-etr
ip lisp database-mapping 172.16.54.0/24 10.11.11.11 priority 10 weight 50
ip lisp itr map-resolver 192.168.1.1
ip lisp etr map-server 192.168.1.1 key 3 9125d59c18a9b015
!
lisp dynamic-eid VM
database-mapping 172.16.54.0/24 10.11.11.11 priority 9 weight 50
eid-notify authentication-key 3 9125d59c18a9b015
!
!
router lisp
locator-table default
site 1
authentication-key cisco
eid-prefix 172.16.54.0/24 accept-more-specifics
exit
!
site 2
authentication-key cisco
eid-prefix 172.16.20.0/24 accept-more-specifics
exit
!
ipv4 map-server
ipv4 map-resolver
!
router lisp
database-mapping 172.16.20.0/24 10.20.20.20 priority 10 weight 50
ipv4 itr map-resolver 192.168.1.1
ipv4 itr
ipv4 etr map-server 192.168.1.1 key cisco
ipv4 etr
exit
!
interface Loopback1
ip address 10.20.20.20 255.255.255.255
!
interface Loopback2
ip address 172.16.20.1 255.255.255.0
!
步驟1.啟動VM。
VM已通電並開始向遠端站點(即Site-3)傳送流量。 FHR-1收到此流並建立動態EID:
N7K-358-West-FHR1# show lisp dynamic-eid summary
LISP Dynamic EID Summary for VRF "default"
* = Dyn-EID learned by site-based Map-Notify
! = Dyn-EID learned by routing protocol
^ = Dyn-EID learned by EID-Notify
Dyn-EID Name Dynamic-EID Interface Uptime Last Pending
Packet Ping Count
VM 172.16.54.200 Vlan2 06:50:21 00:12:12 0
N7K-358-West-FHR1# show lisp dynamic-eid detail
LISP Dynamic EID Information for VRF "default"
Dynamic-EID name: VM
Database-mapping [0] EID-prefix: 172.16.54.0/24, LSBs: 0x00000003
Locator: 10.1.1.1, priority: 10, weight: 50
Uptime: 06:51:34, state: up, local
Locator: 10.2.2.2, priority: 10, weight: 50
Uptime: 06:50:10, state: up
Registering more-specific dynamic-EIDs
Registering routes: disabled
Map-Server(s): none configured, use global Map-Server
Site-based multicast Map-Notify group: 225.1.1.1
Extended Subnet Mode configured on 1 interfaces
Number of roaming dynamic-EIDs discovered: 3
Last dynamic-EID discovered: 172.16.54.1, 00:00:04 ago
Roaming dynamic-EIDs:
172.16.54.200, Vlan2, uptime: 06:50:31, last activity: 00:12:22
Discovered by: packet reception
步驟2. FHR安裝LISP路由。
如步驟1所示,FHR在收到來自VM的資料包時會建立一個動態EID條目。然後在路由資訊庫(RIB)中安裝a/32路由:
N7K-358-FHR1-West-DC# show ip route 172.16.54.200
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>
172.16.54.200/32, ubest/mbest: 1/0, attached
*via 172.16.54.200, Vlan2, [240/0], 06:58:08, lisp, dyn-eid
via 172.16.54.200, Vlan2, [250/0], 06:58:45, am
步驟3. FHR通知所有其他FHR有關此動態EID。
此FHR向所有其他FHR(包括本地站點以及所有遠端站點中的FHR)傳送對映通知消息。在我們的示例中,FHR-1將有關172.16.54.200的Map-Notify傳送到本地DC上的FHR-2以及東DC上的FHR-3和FHR-4。
但只有本地站點FHR可以在其RIB中安裝該EID的路由,如下所示:
N7K-358-FHR2-West-DC# show lisp dynamic-eid detail
LISP Dynamic EID Information for VRF "default"
Dynamic-EID name: VM
Database-mapping [0] EID-prefix: 172.16.54.0/24, LSBs: 0x00000003
Locator: 10.1.1.1, priority: 10, weight: 50
Uptime: 00:01:04, state: up
Locator: 10.2.2.2, priority: 10, weight: 50
Uptime: 00:01:53, state: up, local
Registering more-specific dynamic-EIDs
Registering routes: disabled
Map-Server(s): none configured, use global Map-Server
Site-based multicast Map-Notify group: 225.1.1.1
Extended Subnet Mode configured on 1 interfaces
Number of roaming dynamic-EIDs discovered: 1
Last dynamic-EID discovered: 172.16.54.200, 00:01:04 ago
Roaming dynamic-EIDs:
172.16.54.200, Vlan2, uptime: 00:01:04, last activity: 00:00:42
Discovered by: site-based Map-Notify
Secure-handoff pending for sources: none
N7K-358-FHR2-West-DC#sh ip route 172.16.54.200
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>
172.16.54.200/32, ubest/mbest: 1/0, attached
*via 172.16.54.200, Vlan2, [240/0], 00:00:08, lisp, dyn-eid
via 172.16.54.200, Vlan2, [250/0], 00:01:53, am
步驟4. FHR將此EID更新為本地xTR。
當FHR上的兩個站點都知道EID時,它會通知其本地站點的xTR有關此EID(使用EID-Notify消息)。
East DC xTR路由器也為此字首安裝空的0路由,而West DC xTR在RIB中新增此字首。
N7K-FA8-East_xTR#show ip route 172.16.54.200
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>
172.16.54.200/32, ubest/mbest: 1/0, attached
*via 172.16.54.200, Null0, [241/0], 00:00:32, lisp, dyn-eid
N7K-358-West_xTR#show lisp dynamic-eid detail
LISP Dynamic EID Information for VRF "default"
Dynamic-EID name: VM
Database-mapping [0] EID-prefix: 172.16.54.0/24, LSBs: 0x00000001
Locator: 10.10.10.10, priority: 10, weight: 50
Uptime: 00:02:37, state: up, local
Registering more-specific dynamic-EIDs
Registering routes: disabled
Map-Server(s): none configured, use global Map-Server
Site-based multicast Map-Notify group: none configured
Number of roaming dynamic-EIDs discovered: 1
Last dynamic-EID discovered: 172.16.54.1, 00:00:06 ago
Roaming dynamic-EIDs:
172.16.54.200, (null), uptime: 00:00:28, last activity: 00:00:06
Discovered by: EID-Notify
EID-Notify Locators:
10.1.1.1
10.2.2.2
N7K-358-West_xTR#sh ip route 172.16.54.200
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>
172.16.54.0/24, ubest/mbest: 1/0
via 10.10.13.3, Eth3/2, [110/44], 00:01:00, ospf-1, intra
本地xTR向MR/MS註冊EID:
East DC xTR還向MR/MS傳送對映註冊消息,並向它們註冊這個新發現的EID。Site-3路由器也是如此。
MS_MR#show lisp site 172.16.54.200/32
LISP Site Registration Information
Site name: 1
Allowed configured locators: any
Requested EID-prefix:
EID-prefix: 172.16.54.200/32
First registered: 07:11:28
Routing table tag: 0
Origin: Dynamic, more specific of 172.16.54.0/24
Merge active: No
Proxy reply: No
TTL: 00:03:00
State: complete
Registration errors:
Authentication failures: 0
Allowed locators mismatch: 0
ETR 10.10.90.1, last registered 00:00:07, no proxy-reply, map-notify
TTL 00:03:00, no merge, hash-function sha1, nonce 0x00000000-0x00000000
state complete, no security-capability
xTR-ID N/A
site-ID N/A
Locator Local State Pri/Wgt Scope
10.10.10.10 yes up 10/50 IPv4 none
MS_MR#sh lisp site 172.16.20.0/24
LISP Site Registration Information
Site name: 2
Allowed configured locators: any
Requested EID-prefix:
EID-prefix: 172.16.20.0/24
First registered: 06:30:48
Routing table tag: 0
Origin: Configuration, accepting more specifics
Merge active: No
Proxy reply: No
TTL: 1d00h
State: complete
Registration errors:
Authentication failures: 0
Allowed locators mismatch: 0
ETR 10.10.67.7, last registered 00:00:23, no proxy-reply, map-notify
TTL 1d00h, no merge, hash-function sha1, nonce 0xEE339164-0xC3199AF1
state complete, no security-capability
xTR-ID 0x7C6C7CF6-0x2AE64A0C-0xDCBC62DA-0x79762795
site-ID unspecified
Locator Local State Pri/Wgt Scope
10.20.20.20 yes up 10/50 IPv4 none
步驟5.檢驗站點1和站點3 xTR上的流量:
N7K-358-West_xTR# show ip lisp map-cache
LISP IP Mapping Cache for VRF "default" (iid 0), 3 entries
* = Locator data counters are cumulative across all EID-prefixes
0.0.0.0/1, uptime: 00:13:28, expires: 00:01:31, via map-reply
Negative cache entry, action: forward-native
128.0.0.0/3, uptime: 00:13:28, expires: 00:01:31, via map-reply
Negative cache entry, action: forward-native
172.16.20.0/24, uptime: 00:00:26, expires: 23:59:33, via map-reply, auth
Locator Uptime State Priority/ Data Control MTU
Weight in/out in/out
10.20.20.20 00:00:26 up 10/50 0/0* 0/0 1500
站點3 LISP對映快取條目:
Site-3#show ip lisp map-cache
LISP IPv4 Mapping Cache for EID-table default (IID 0), 2 entries
0.0.0.0/0, uptime: 01:53:04, expires: never, via static send map-request
Negative cache entry, action: send-map-request
172.16.54.200/32, uptime: 01:50:02, expires: 22:09:57, via map-reply, complete
Locator Uptime State Pri/Wgt
10.10.10.10 01:50:02 up 10/50
步驟6. VM從West DC移至East DC。
這些步驟是在DC之間進行VM遷移之前執行的。現在,VM從West DC移動到East DC,無需更改IP地址。當VM從West DC移動到East DC時,East DC的FHR-3收到來自VM的資料包,並將其IP地址新增到動態EID表中。然後,它將對映通知請求傳送到包括West DC的所有FHR,並且West DC收到對映通知請求後,會從West DC中存在虛擬機器時建立的動態EID表中刪除VM條目。West DC的xTR現在將空0路由安裝到VM的IP。
以下是東部DC的FHR-3上的動態EID狀態:
N7K-FA8-East_FHR3# sh lisp dynamic-eid detail
LISP Dynamic EID Information for VRF "default"
Dynamic-EID name: VM
Database-mapping [0] EID-prefix: 172.16.54.0/24, LSBs: 0x00000003
Locator: 10.3.3.3, priority: 10, weight: 50
Uptime: 02:04:48, state: up, local
Locator: 10.4.4.4, priority: 10, weight: 50
Uptime: 02:03:27, state: up
Registering more-specific dynamic-EIDs
Registering routes: disabled
Map-Server(s): none configured, use global Map-Server
Site-based multicast Map-Notify group: 225.1.1.1
Extended Subnet Mode configured on 1 interfaces
Number of roaming dynamic-EIDs discovered: 1
Last dynamic-EID discovered: 172.16.54.1, 00:00:14 ago
Roaming dynamic-EIDs:
172.16.54.200, Vlan2, uptime: 00:04:28, last activity: 00:03:11
Discovered by: packet reception
N7K-FA8-East_FHR3# sh ip route 172.16.54.200
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>
172.16.54.200/32, ubest/mbest: 1/0, attached
*via 172.16.54.200, Vlan2, [240/0], 00:05:00, lisp, dyn-eid
via 172.16.54.200, Vlan2, [250/0], 00:05:10, am
因此,West FHR沒有適用於VM的動態EID,即172.16.54.200:
N7K-358-West-FHR1(config)# sh lisp dynamic-eid summary
LISP Dynamic EID Summary for VRF "default"
* = Dyn-EID learned by site-based Map-Notify
! = Dyn-EID learned by routing protocol
^ = Dyn-EID learned by EID-Notify
Dyn-EID Name Dynamic-EID Interface Uptime Last Pending
Packet Ping Count
VM 172.16.54.2 Vlan2 00:33:30 00:00:07 0
步驟7. West DC的xTR在路由表中新增了null 0條目:
N7K-358-West_xTR# sh ip route 172.16.54.200
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>
172.16.54.200/32, ubest/mbest: 1/0, attached
*via 172.16.54.200, Null0, [241/0], 00:00:05, lisp, dyn-eid
步驟8.East xTR由FHR-3通過EID通知更新,然後East xTR向MS傳送帶有遷移的VM字首的對映暫存器:
N7K-FA8-East_xTR(config)# show lisp dynamic-eid Detail
LISP Dynamic EID Information for VRF "default"
Dynamic-EID name: VM
Database-mapping [0] EID-prefix: 172.16.54.0/24, LSBs: 0x00000001
Locator: 10.11.11.11, priority: 9, weight: 50
Uptime: 02:19:51, state: up, local
Registering more-specific dynamic-EIDs
Registering routes: disabled
Map-Server(s): none configured, use global Map-Server
Site-based multicast Map-Notify group: none configured
Number of roaming dynamic-EIDs discovered: 1
Last dynamic-EID discovered: 172.16.54.1, 00:00:58 ago
Roaming dynamic-EIDs:
172.16.54.200, (null), uptime: 00:17:50, last activity: 00:00:25
Discovered by: EID-Notify
EID-Notify Locators:
10.3.3.3
10.4.4.4
MS_MR#sh lisp site 172.16.54.200
LISP Site Registration Information
Site name: 1
Allowed configured locators: any
Requested EID-prefix:
EID-prefix: 172.16.54.200/32
First registered: 02:02:24
Routing table tag: 0
Origin: Dynamic, more specific of 172.16.54.0/24
Merge active: No
Proxy reply: No
TTL: 00:03:00
State: complete
Registration errors:
Authentication failures: 0
Allowed locators mismatch: 0
ETR 10.11.17.1, last registered 00:00:32, no proxy-reply, map-notify
TTL 00:03:00, no merge, hash-function sha1, nonce 0x00000000-0x00000000
state complete, no security-capability
xTR-ID N/A
site-ID N/A
Locator Local State Pri/Wgt Scope
10.11.11.11 yes up 9/50 IPv4 none
步驟9.兩個xTR都可以更新對映快取條目。
在VM遷移之前,對於Site-3,VM的IP的RLOC為West xTR(10.10.10.10)。 將VM遷移到East DC後,一旦West xTR收到來自Site-3的流量,它就會將SMR消息傳送到Site-3路由器,以便更新East xTR(10.11.11.11)的新RLOC地址,如下所示:
Site-3#sh ip lisp map-cache
LISP IPv4 Mapping Cache for EID-table default (IID 0), 2 entries
0.0.0.0/0, uptime: 02:03:23, expires: never, via static send map-request
Negative cache entry, action: send-map-request
172.16.54.200/32, uptime: 02:00:22, expires: 23:57:56, via map-reply, complete
Locator Uptime State Pri/Wgt
10.11.11.11 00:02:03 up 9/50
N7K-FA8-East_xTR(config)# show ip lisp map-cache
LISP IP Mapping Cache for VRF "default" (iid 0), 1 entries
* = Locator data counters are cumulative across all EID-prefixes
172.16.20.0/24, uptime: 00:25:24, expires: 23:34:35, via map-reply, auth
Locator Uptime State Priority/ Data Control MTU
Weight in/out in/out
10.20.20.20 00:25:24 up 10/50 0/0* 0/0 1500
使用本節內容,確認您的組態是否正常運作。
驗證工作將在操作順序一節的步驟5中介紹。
本節提供的資訊可用於對組態進行疑難排解。
可以使用這些調試來排除受控環境中的LISP故障。
debug ip lisp mapping control debug lisp mapping register debug lisp smr debug lisp ha debug lisp loc-reach-algorithm receive-probe debug lisp loc-reach-algorithm send-probe debug ip mroute map_notify_addr 32 detail debug ip lisp mapping data