您可以通过运行自动RP和引导程序等协议为交汇点(RP)提供冗余。但是,如果失败,其收敛速度不会太快。任播RP的概念是,在要用作RP的两台或多台路由器上配置了相同的IP地址(rp地址)。然后,在IGP中通告此IP。其他路由器将根据到达rp地址的最佳路径选择这些路由器中的任意一台。如果出现故障,收敛与内部网关协议(IGP)相同。
有了这个概念,问题就来了。信息需要在不同的RP之间同步,因为很少有发送方和接收方可以加入路由器1作为RP,而很少有发送方和接收方可以加入路由器2作为RP。这些路由器不会拥有所有源的完整信息,而且组播会中断。此问题的解决方法是,在充当RP的所有路由器之间,建立一种同步与源有关的信息的机制。有两种协议可用于此目的:
组播源发现协议(MSDP)
PIM
MSDP已经存在了一段时间。每当源注册到RP时,源活动消息都会发送到其他路由器。PIM有一项增强功能,本文档将详细介绍。目前,此增强功能仅适用于Nexus。
Cisco 建议您了解以下主题:
任播RP
PIM(Nexus)
本文档不限于特定的软件和硬件版本。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
以下是示例拓扑:
发件人(172.16.1.1)-(9/3)Nexus-1(9/2)-(9/2)Nexus-2
Nexus 1相关配置:
ip pim rp-address 10.1.1.1 group-list 224.0.0.0/4 ip pim anycast-rp 10.1.1.1 192.168.1.1 ip pim anycast-rp 10.1.1.1 192.168.2.2 interface loopback1 ip address 192.168.1.1/32 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode interface loopback7 ip address 10.1.1.1/32 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode interface Ethernet9/2 ip address 10.7.7.1/24 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode interface Ethernet9/3 ip address 172.16.1.2/24 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode
Nexus 2相关配置:
ip pim rp-address 10.1.1.1 group-list 224.0.0.0/4 ip pim ssm range 232.0.0.0/8 ip pim anycast-rp 10.1.1.1 192.168.1.1 ip pim anycast-rp 10.1.1.1 192.168.2.2 interface loopback1 ip address 192.168.2.2/32 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode interface loopback7 ip address 10.1.1.1/32 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode interface Ethernet9/2 ip address 10.7.7.2/24 ip router ospf 1 area 0.0.0.0 ip pim sparse-mode
有两个Nexus机箱:Nexus-1和Nexus-2。两者都将用作RP。RP地址应为10.1.1.1。Loopback 7位于配置了此IP的两个Nexus机箱上。然后,此环回在开放最短路径优先(OSPF)中通告,因此网络中的不同路由器将到达Nexus-1或Nexus-2作为RP。这取决于最佳路径度量。
在两个Nexuses上,使用以下命令将10.1.1.1定义为RP:
ip pim rp-address 10.1.1.1 group-list 224.0.0.0/4
现在,您需要定义称为RP集的内容。这是用作RP的所有路由器的集合。您需要在每台潜在RP路由器上设置一个环回,该环回与用作RP地址的环回不同。在本例中,loopback 1位于IP地址分别为192.168.1.1/32和192.168.2.2/32的Nexus上。此环回1用于定义RP集。执行此操作的命令是:
ip pim anycast-rp <rp-address> <ip-address-of-poric-RP>
用于设置的两个Nexus的命令是:
ip pim anycast-rp 10.1.1.1 192.168.1.1
ip pim anycast-rp 10.1.1.1 192.168.2.2
这里需要注意的一点是,您需要定义自己的IP以及RP集。因此,这两个命令都需要放在Nexus上。
定义RP集后,您将看到RP映射的输出:
Nexus-1# show ip pim rp PIM RP Status Information for VRF "default" BSR disabled Auto-RP disabled BSR RP Candidate policy: None BSR RP policy: None Auto-RP Announce policy: None Auto-RP Discovery policy: None Anycast-RP 10.1.1.1 members: 192.168.1.1* 192.168.2.2 RP: 10.1.1.1*, (0), uptime: 00:00:58, expires: never, priority: 0, RP-source: (local), group ranges: 224.0.0.0/4 Nexus-2# show ip pim rp PIM RP Status Information for VRF "default" BSR disabled Auto-RP disabled BSR RP Candidate policy: None BSR RP policy: None Auto-RP Announce policy: None Auto-RP Discovery policy: None Anycast-RP 10.1.1.1 members: 192.168.1.1 192.168.2.2* RP: 10.1.1.1*, (0), uptime: 02:46:54, expires: never, priority: 0, RP-source: (local), group ranges: 224.0.0.0/4
例如,您在属于RP集的路由器之一上收到一条注册消息。此路由器将在其表中为此源添加S、G。此外,路由器将向RP集的所有其他成员发送PIM注册消息。此注册消息的源IP地址是RP集中此路由器的地址,目的地址是RP集中每台路由器的地址。
在本示例中,当源172.16.1.1将发往239.1.1的组播数据包发送到Nexus-1时,Nexus-1首先将此源注册为RP,并向源172.16.1.1和组239.1.1发送注册消息。当Nexus-2时收到此注册表后,它会在mroute表中添加172.16.1.1、239.1.1.1的S、G条目。现在,RP Nexus-1和Nexus-2都了解此来源。从Nexus-1发送到Nexus-2的注册消息具有源IP 192.168.1.1和目的IP 192.168.2.2,如RP集中所定义。
注册过程后,两个Nexus框上的Mroute条目:
Nexus-1# sh ip mroute 239.1.1.1 IP Multicast Routing Table for VRF "default" (172.16.1.1/32, 239.1.1.1/32), uptime: 00:00:22, ip pim Incoming interface: Ethernet9/3, RPF nbr: 172.16.1.1, internal Outgoing interface list: (count: 0) Nexus-2# sh ip mroute 239.1.1.1 IP Multicast Routing Table for VRF "default" (172.16.1.1/32, 239.1.1.1/32), uptime: 00:00:17, pim ip Incoming interface: Ethernet9/2, RPF nbr: 10.7.7.1, internal Outgoing interface list: (count: 0)
在Nexus-2上执行此类寄存器消息的数据包转储:
Ethernet II, Src: d8:67:d9:04:5f:41 (d8:67:d9:04:5f:41), Dst: d8:67:d9:02:3b:41 (d8:67:d9:02:3b:41) Destination: d8:67:d9:02:3b:41 (d8:67:d9:02:3b:41) Address: d8:67:d9:02:3b:41 (d8:67:d9:02:3b:41) .... ...0 .... .... .... .... = IG bit: Individual address (unicast) .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default) Source: d8:67:d9:04:5f:41 (d8:67:d9:04:5f:41) Address: d8:67:d9:04:5f:41 (d8:67:d9:04:5f:41) .... ...0 .... .... .... .... = IG bit: Individual address (unicast) .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default) Type: IP (0x0800) Internet Protocol, Src: 192.168.1.1 (192.168.1.1), Dst: 192.168.2.2 (192.168.2.2) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) 0000 00.. = Differentiated Services Codepoint: Default (0x00) .... ..0. = ECN-Capable Transport (ECT): 0 .... ...0 = ECN-CE: 0 Total Length: 128 Identification: 0x1b27 (6951) Flags: 0x00 0.. = Reserved bit: Not Set .0. = Don't fragment: Not Set ..0 = More fragments: Not Set Fragment offset: 0 Time to live: 254 Protocol: PIM (0x67) Header checksum: 0x9aea [correct] [Good: True] [Bad : False] Source: 192.168.1.1 (192.168.1.1) Destination: 192.168.2.2 (192.168.2.2) Protocol Independent Multicast Version: 2 Type: Register (1) Checksum: 0xdeff [correct] PIM parameters Flags: 0x00000000 0... .... .... .... .... .... .... .... = Not border .0.. .... .... .... .... .... .... .... = Not Null-Register Internet Protocol, Src: 172.16.1.1 (172.16.1.1), Dst: 239.1.1.1 (239.1.1.1) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) 0000 00.. = Differentiated Services Codepoint: Default (0x00) .... ..0. = ECN-Capable Transport (ECT): 0 .... ...0 = ECN-CE: 0 Total Length: 100 Identification: 0x0000 (0) Flags: 0x00 0.. = Reserved bit: Not Set .0. = Don't fragment: Not Set ..0 = More fragments: Not Set Fragment offset: 0 Time to live: 254 Protocol: ICMP (0x01) Header checksum: 0xa294 [correct] [Good: True] [Bad : False] Source: 172.16.1.1 (172.16.1.1) Destination: 239.1.1.1 (239.1.1.1) Internet Control Message Protocol Type: 8 (Echo (ping) request) Code: 0 () Checksum: 0x9484 [correct] Identifier: 0x0000 Sequence number: 0 (0x0000) Data (72 bytes) 0000 00 00 00 00 00 71 e9 54 ab cd ab cd ab cd ab cd .....q.T........ 0010 ab cd ab cd ab cd ab cd ab cd ab cd ab cd ab cd ................ 0020 ab cd ab cd ab cd ab cd ab cd ab cd ab cd ab cd ................ 0030 ab cd ab cd ab cd ab cd ab cd ab cd ab cd ab cd ................ 0040 ab cd ab cd ab cd ab cd ........ Data: 000000000071E954ABCDABCDABCDABCDABCDABCDABCDABCD... [Length: 72]
您可以使用此过滤器捕获Nexus带内的PIM数据包:
ethanalyzer本地接口带内捕获 — 过滤器“ip proto 103” limit-captured-frames 0 write logflash:pim.pcap
这将开始无限期捕获PIM数据包,直到按cntrl+c。数据包显示在屏幕上,并会写入logflash中的pim.pcap文件。您还可以包含用于捕获来自特定PIM邻居(“ip proto 103 and host <ip_address>”)的数据包的IP地址。
以下是有助于检查Nexus上注册过程的两个调试:
debug ip pim data-register send
debug ip pim data-register receive
Nexus -1
2012 Sep 20 12:25:52.537472 pim: [6405] (default-base) Received Register from 172.16.1.2 for (172.16.1.1/32, 239.1.1.1/32) 2012 Sep 20 12:25:52.537656 pim: [6405] (default-base) Create route for (172.16.1.1/32, 239.1.1.1/32) 2012 Sep 20 12:25:52.537716 pim: [6405] (default-base) Add route (172.16.1.1/32, 239.1.1.1/32) to MRIB, multi-route TRUE 2012 Sep 20 12:25:52.537745 pim: [6405] (default-base) RP 10.1.1.1 is an Anycast-RP 2012 Sep 20 12:25:52.537771 pim: [6405] (default-base) Forward Register to Anycast-RP member 192.168.2.2 2012 Sep 20 12:25:52.537825 pim: [6405] (default-base) Send Register-Stop to 172.16.1.2 for (172.16.1.1/32, 239.1.1.1/32) 2012 Sep 20 12:25:52.538591 pim: [6405] (default-base) Received Register-Stop from 10.1.1.1 for (172.16.1.1/32, 239.1.1.1/32)
Nexus -2
2012 Sep 20 12:26:36.367862 pim: [7189] (default-base) Received Register from 192.168.1.1 for (172.16.1.1/32, 239.1.1.1/32) 2012 Sep 20 12:26:36.368093 pim: [7189] (default-base) Create route for (172.16.1.1/32, 239.1.1.1/32) 2012 Sep 20 12:26:36.368175 pim: [7189] (default-base) Add route (172.16.1.1/32, 239.1.1.1/32) to MRIB, multi-route FALSE 2012 Sep 20 12:26:36.368223 pim: [7189] (default-base) RP 10.1.1.1 is an Anycast-RP 2012 Sep 20 12:26:36.368240 pim: [7189] (default-base) Register received from Anycast-RP member 192.168.1.1
此RFC提供有关PIM注册过程的详细信息:http://tools.ietf.org/rfc/rfc4610.txt
此外,有关详细信息,请参阅配置PIM和PIM6。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
07-Nov-2012 |
初始版本 |