您可以通过运行协议(如自动RP和引导程序)为交汇点(RP)提供冗余。但是,如果发生故障,收敛速度不会那么快。任播RP的概念是,您要用作RP的两台或多台路由器上配置相同的IP地址(rp地址)。然后,在IGP中通告此IP。其它路由器将根据通向rp-address的最佳路径选择其中任何路由器。在发生故障时,收敛与内部网关协议(IGP)相同。
有了这个概念,问题就出现了。信息需要在不同的RP之间同步,因为可能只有少数发送方和接收方加入作为RP的路由器1,而很少有发送方和接收方加入作为RP的路由器2。这些路由器没有所有源的完整信息,因此组播将中断。此问题的解决方案是具有一个机制,以同步有关作为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。环回7位于配置了此IP的两个Nexus盒上。此环回随后在开放最短路径优先(OSPF)中通告,因此网络中的不同路由器将到达RP的Nexus-1或Nexus-2。这取决于最佳路径度量。
在两个网桥上,使用以下命令将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上。此loopback 1用于定义RP集。执行相同操作的命令是:
ip pim anycast-rp <rp-address> <ip-address-of-prospect-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.1的组播数据包发送到Nexus-1时,Nexus-1首先将此源注册为RP,然后向Nexus-2发送源172.16.1.1和组239.1.1.1的注册消息。当Nexus-2收到此注册时,它将在mroute表中为172.16.1.1和239.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 local interface inband capture-filter "ip proto 103" limit-captured-frames 0 write logflash:pim.pcap
这将开始无限期地捕获PIM数据包,直到按下cntrl+c。数据包将显示在屏幕上,并会写入logflash中的pim.pcap文件。还可以包括捕获来自特定PIM邻居(“ip proto 103和主机<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 |
25-Oct-2012 |
初始版本 |