通過運行諸如自動RP和引導之類的協定,可以為集結點(RP)提供冗餘。但是,如果出現故障,它們的收斂速度不會那麼快。有一個任播RP的概念,即您要用作RP的兩台或多台路由器上配置相同的IP地址(rp-address)。然後,在IGP中通告此IP。其它路由器將根據通往rp-address的最佳路徑選擇這些路由器中的任意一個。發生故障時,收斂與內部網關協定(IGP)相同。
這個概念產生了一個問題。資訊需要在不同的RP之間同步,因為可能只有少數傳送者和接收器加入作為RP的路由器1,而可能很少有傳送者和接收器加入作為RP的路由器2。這些路由器沒有所有源的完整資訊,因此組播會被破壞。此問題的解決方案是具有一個機制,以同步有關作為RP的所有路由器之間的源的資訊。有兩種協定可用於此目的:
多點傳送來源探索通訊協定(MSDP)
PIM
MSDP已經存在了一段時間。每當源註冊到RP時,源活動消息就會傳送到其他路由器。本文檔詳細介紹對PIM的增強。目前,此增強功能僅適用於Nexus。
思科建議您瞭解以下主題:
任播RP
PIM(Nexus)
本文件所述內容不限於特定軟體和硬體版本。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
以下是拓撲範例:
傳送方(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)中通告該環回,因此網路中的不同路由器將到達RP的Nexus-1或Nexus-2。這取決於最佳路徑度量。
在兩個Nexus上,使用以下命令將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-prospective-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盒上同時新增條目:
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檔案。您還可以包括IP地址,以捕獲來自特定PIM鄰居(「ip proto 103和主機<ip_address>」)的資料包。
以下是有助於檢查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 |
初始版本 |