此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍在启用定位器身份分离协议(LISP)的网络中跨数据中心(DC)移动而无需更改其IP地址的IP设备的配置和验证。
思科建议您具备LISP的基本知识。
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
在LISP环境中,此设备称为动态终端标识符(EID)。LISP多跳移动性支持子网扩展模式,该模式允许不同DC拥有相同的子网,而子网又允许虚拟机(VM)在迁移到另一DC时保留其分配的IP地址。
第一跳路由器(FHR)检测动态EID的存在,并通过EID通知消息通知xTR端网关。xTR注册动态EID以映射服务器,并对通过LISP域的流量执行LISP封装和解封功能。
部署在不同DC中的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已打开电源,并已开始将流量发送到远程站点(即站点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将此动态EID通知所有其他FHR。
此FHR将映射通知消息发送到所有其他FHR,这些FHR包括本地站点和所有远程站点中的FHR。在本例中,FHR-1将有关172.16.54.200的映射通知发送到本地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。
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。站点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。
在数据中心之间进行虚拟机迁移之前,请执行以下步骤。现在,VM从West DC移动到East DC,无需更改IP地址。当VM从West DC移动到East DC时,East DC的FHR-3从VM接收数据包,并将其IP地址添加到动态EID表。然后,它向包括West DC的所有FHR发送映射通知请求,并且一旦West DC收到映射通知请求,它会从动态EID表中删除VM条目,该EID表是当VM存在于West DC时创建的。West DC的xTR现在安装到VM IP的空0路由。
以下是FHR-3上Dynamic-EID在东DC的状态:
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. xTR at West DC在路由表中添加空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. FHR-3通过EID通知更新East xTR,然后East xTR使用迁移的VM前缀向MS发送映射寄存器:
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迁移之前,对于站点3,VM IP的RLOC是West xTR(10.10.10.10)。 将VM迁移到东DC后,一旦West xTR收到来自站点3的流量,它就会将SMR消息发送到站点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