04-H3C_雙向PIM典型配置舉例
本章節下載: 04-H3C_雙向PIM典型配置舉例 (231.69 KB)
資料版本:6W100-20200330
產品版本:Release 7585P05
Copyright © 2020 bobty下载软件 版權所有,保留一切權利。 非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。 除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。 本文檔中的信息可能變動,恕不另行通知。 |
目 錄
本文檔介紹了雙向PIM配置舉例。
雙向PIM(Bidirectional Protocol Independent Multicast,雙向協議無關組播)通過建立以RP(Rendezvous Point,彙集點)為中心、分別連接組播源和接收者的雙向RPT(Rendezvous Point Tree,共享樹),使組播數據沿著雙向RPT從組播源經由RP轉發到接收者。適用於一個組播組中同時對應多個接收者和多個組播源的組網,例如多方電視電話會議。
本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。
如圖1所示,三層交換機Switch A、Switch B和Switch C上均運行OSPF協議,單播路由正常。接收者通過組播方式接收視頻點播信息,組播源Source 1和Source 2都向組播組225.1.1.1發送組播信息,末梢用戶網絡N1和N2中的Host A和Host B均為該組播信息的接收者。
要求在該網絡中采用雙向PIM協議實現組播數據的分發,以減少三層交換機所維護的組播轉發表項數量;同時為了避免因單一RP故障而使通信中斷,該網絡采用動態RP和靜態RP配合方式,來起到RP的備份。
圖1 雙向PIM配置組網圖
接口 |
IP地址 |
設備 |
接口 |
IP地址 |
|
Switch A |
Vlan-int100 |
10.10.1.1/24 |
Switch C |
Vlan-int102 |
10.102.1.1/24 |
|
Vlan-int12 |
10.12.1.1/24 |
|
Vlan-int13 |
10.13.1.3/24 |
|
Vlan-int13 |
10.13.1.1/24 |
|
Vlan-int23 |
10.23.1.3/24 |
|
|
|
|
Vlan-int33 |
|
Switch B |
Vlan-int101 |
10.101.1.1/24 |
Source1 |
- |
10.10.1.2/24 |
|
Vlan-int12 |
10.12.1.2/24 |
Source2 |
- |
10.33.1.4/24 |
|
Vlan-int23 |
10.23.1.2/24 |
|
|
|
· 選擇一台設備的接口作為服務於雙向PIM的C-RP,並為該雙向PIM域指定一個C-BSR,以負責在雙向PIM域中收集並發布RP信息,C-RP和C-BSR可以由同一接口來充當,也可以配置在不同設備上。本例中指定Switch A的VLAN接口12作為C-RP和C-BSR。
· 由於本網絡中隻配置了一個C-RP,為了避免因單一節點故障而引起的通信中斷,可以再配置一個服務於雙向PIM的靜態RP進行備份。本例中通過將靜態RP的IP地址指定為該網絡中某網段內但實際不存在的一個地址,從而形成RPL,連接到RPL上的所有接口都可以充當RP,以提供可靠的備份功能。本例中將實際不存在的地址10.13.1.4/24配置為靜態RP的地址,從而連接到對應RPL的交換機Switch A、Switch C都可以提供RP的功能。
· 同一台設備相同實例的所有接口上啟用的PIM模式必須相同。
· 雙向PIM域內的所有三層交換機上都必須配置完全相同的靜態RP。
· 雙向PIM域內的所有三層交換機的接口都必須使能PIM-SM。
· 在邊界設備連接用戶網絡的接口上必須使能IGMP功能,以建立和維護各組播組的成員關係。
(1) 使能組播路由功能
<SwitchA> system-view
System View: return to User View with Ctrl+Z.
[SwitchA] multicast routing
[SwitchA-mrib] quit
(2) 配置各接口及接口地址,並使能PIM-SM
# 配置連接組播源Source 1的接口及接口地址,使能PIM-SM。
[SwitchA] vlan 100
[SwitchA-vlan100] port ten-gigabitethernet 1/0/1
[SwitchA-vlan100] quit
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ip address 10.10.1.1 24
[SwitchA-Vlan-interface100] pim sm
[SwitchA-Vlan-interface100] quit
# 配置連接Switch B的接口及接口地址,使能PIM-SM。
[SwitchA] vlan 12
[SwitchA-vlan12] port ten-gigabitethernet 1/0/2
[SwitchA-vlan12] quit
[SwitchA-vlan12] interface vlan-interface 12
[SwitchA-Vlan-interface12] ip address 10.12.1.1 24
[SwitchA-Vlan-interface12] pim sm
[SwitchA-Vlan-interface12] quit
# 配置連接Switch C的接口及接口地址,使能PIM-SM。
[SwitchA] vlan 13
[SwitchA-vlan13] port ten-gigabitethernet 1/0/3
[SwitchA-vlan13] quit
[SwitchA] interface vlan-interface 13
[SwitchA-Vlan-interface13] ip address 10.13.1.1 24
[SwitchA-Vlan-interface13] pim sm
[SwitchA-Vlan-interface13] quit
(3) 配置C-RP和靜態RP
# 指定VLAN接口12的IP地址為C-BSR和C-RP。
[SwitchA] pim
[SwitchA-pim] c-bsr 10.12.1.1
[SwitchA-pim] c-rp 10.12.1.1 bidir
# 指定IP地址10.13.1.4為靜態RP的IP地址。
[SwitchA-pim] static-rp 10.13.1.4 bidir
(4) 使能雙向PIM
[SwitchA-pim] bidir-pim enable
[SwitchA-pim] quit
(5) 配置單播路由協議,以建立正確的單播路由表項
[SwitchA] ospf 1
[SwitchA-ospf-1] import-route direct
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
(1) 使能組播路由功能
<SwitchB> system-view
System View: return to User View with Ctrl+Z.
[SwitchB] multicast routing
[SwitchB-mrib] quit
(2) 配置各接口及接口地址,並使能PIM-SM
# 配置連接Switch A的接口及接口地址,使能PIM-SM。
[SwitchB] vlan 12
[SwitchB-vlan12] port ten-gigabitethernet 1/0/2
[SwitchB-vlan12] quit
[SwitchB] interface vlan-interface 12
[SwitchB-Vlan-interface12] ip address 10.12.1.2 24
[SwitchB-Vlan-interface12] pim sm
[SwitchB-Vlan-interface12] quit
# 配置連接Switch C的接口及接口地址,使能PIM-SM。
[SwitchB] vlan 23
[SwitchB-vlan23] port ten-gigabitethernet 1/0/3
[SwitchB-vlan23] quit
[SwitchB] interface vlan-interface 23
[SwitchB-Vlan-interface23] ip address 10.23.1.2 24
[SwitchB-Vlan-interface23] pim sm
[SwitchB-Vlan-interface23] quit
# 配置連接網絡N1的接口及接口地址,使能PIM-SM和IGMP(缺省情況下,IGMP的版本為IGMPv2)。
[SwitchB] vlan 101
[SwitchB-vlan101] port ten-gigabitethernet 1/0/1
[SwitchB-vlan101] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] ip address 10.101.1.1 24
[SwitchB-Vlan-interface101] pim sm
[SwitchB-Vlan-interface101] igmp enable
[SwitchB-Vlan-interface101] quit
(3) 配置靜態RP。指定IP地址10.13.1.4為靜態RP的IP地址。
[SwitchB] pim
[SwitchB-pim] static-rp 10.13.1.4 bidir
(4) 使能雙向PIM
[SwitchB-pim] bidir-pim enable
[SwitchB-pim] quit
(5) 配置單播路由協議,以建立正確的單播路由表項
[SwitchB] ospf 1
[SwitchB-ospf-1] import-route direct
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
(1) 使能組播路由功能
<SwitchC> system-view
System View: return to User View with Ctrl+Z.
[SwitchC] multicast routing
[SwitchC-mrib] quit
(2) 配置各接口及接口地址,並使能PIM-SM
# 配置連接組播源Source 2的接口及接口地址,使能PIM-SM。
[SwitchC] vlan 33
[SwitchC-vlan33] port ten-gigabitethernet 1/0/4
[SwitchC-vlan33] quit
[SwitchC] interface vlan-interface 33
[SwitchC-Vlan-interface33] ip address 10.33.1.3 24
[SwitchC-Vlan-interface33] pim sm
[SwitchC-Vlan-interface33] quit
# 配置連接Switch A的接口及接口地址,使能PIM-SM
[SwitchC] vlan 13
[SwitchC-vlan13] port ten-gigabitethernet 1/0/3
[SwitchC-vlan13] quit
[SwitchC] interface vlan-interface 13
[SwitchC-Vlan-interface13] ip address 10.13.1.3 24
[SwitchC-Vlan-interface13] pim sm
[SwitchC-Vlan-interface13] quit
# 配置連接Switch B的接口及接口地址,使能PIM-SM。
[SwitchC] vlan 23
[SwitchC-vlan23] port ten-gigabitethernet 1/0/2
[SwitchC-vlan23] quit
[SwitchC] interface vlan-interface 23
[SwitchC-Vlan-interface23] ip address 10.23.1.3 24
[SwitchC-Vlan-interface23] pim sm
[SwitchC-Vlan-interface23] quit
# 配置連接網絡N2的接口及接口地址,使能PIM-SM和IGMP(缺省情況下,IGMP的版本為IGMPv2)。
[SwitchC] vlan 102
[SwitchC-vlan102] port ten-gigabitethernet 1/0/1
[SwitchC-vlan102] quit
[SwitchC] interface vlan-interface 102
[SwitchC-Vlan-interface102] ip address 10.102.1.1 24
[SwitchC-Vlan-interface102] pim sm
[SwitchC-Vlan-interface102] igmp enable
[SwitchC-Vlan-interface102] quit
(3) 配置靜態RP。指定IP地址10.13.1.4為靜態RP的IP地址
[SwitchC] pim
[SwitchC-pim] static-rp 10.13.1.4 bidir
(4) 使能雙向PIM
[SwitchC-pim] bidir-pim enable
[SwitchC-pim] quit
(5) 配置單播路由協議,以建立正確的單播路由表項
[SwitchC] ospf 1
[SwitchC-ospf-1] import-route direct
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
(1) 按照如上配置後,查看配置信息發現Switch A、Switch B和Switch C之間建立了PIM鄰居關係。
# 查看Switch A上的PIM鄰居信息。
[SwitchA] display pim neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires DR-Priority Mode
10.12.1.2 Vlan12 00:02:27 00:01:45 1 B
10.13.1.3 Vlan13 00:02:27 00:01:19 1 B
# 查看Switch B上的PIM鄰居信息。
[SwitchB] display pim neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires DR-Priority Mode
10.12.1.1 Vlan12 00:03:05 00:01:44 1 B
10.23.1.3 Vlan23 00:13:49 00:01:29 1 B
# 查看Switch C上的PIM鄰居信息。
[SwitchC] display pim neighbor
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires DR-Priority Mode
10.13.1.1 Vlan13 00:03:28 00:01:39 1 B
10.23.1.2 Vlan23 00:14:05 00:01:36 1 B
(2) 通過使用display pim bsr-info命令可以查看PIM-SM域中的BSR信息。
# 查看Switch A上PIM-SM域中的BSR信息。
[SwitchA] display pim bsr-info
Scope: non-scoped
State: Elected
Bootstrap timer: 00:01:18
Elected BSR address: 10.12.1.1
Priority: 64
Hash mask length: 30
Uptime: 00:04:01
Candidate BSR address: 10.12.1.1
Priority: 64
Hash mask length: 30
# 查看Switch B上PIM-SM域中的BSR信息。
[SwitchB] display pim bsr-info
Scope: non-scoped
State: Accept Preferred
Bootstrap timer: 00:00:26
Elected BSR address: 10.12.1.1
Priority: 64
Hash mask length: 30
Uptime: 00:10:41
# 查看Switch C上PIM-SM域中的BSR信息。
[SwitchC] display pim bsr-info
Scope: non-scoped
State: Accept Preferred
Bootstrap timer: 00:02:08
Elected BSR address: 10.12.1.1
Priority: 64
Hash mask length: 30
Uptime: 00:15:41
(3) 通過使用display pim rp-info命令可以查看PIM-SM域中的RP信息。
# 查看Switch A上所有組播組對應的RP信息。
[SwitchA] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4 [B]
RP address Priority HoldTime Uptime Expires
10.12.1.1 (local) 192 180 00:06:01 00:02:58
Static RP information:
RP address ACL Mode Preferred
10.13.1.4 ---- bidir No
# 查看Switch B上所有組播組對應的RP信息。
[SwatchB] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4 [B]
RP address Priority HoldTime Uptime Expires
10.12.1.1 192 180 00:06:33 00:02:26
Static RP information:
RP address ACL Mode Preferred
10.13.1.4 ---- bidir No
# 查看Switch C上所有組播組對應的RP信息。
[SwitchC] display pim rp-info
BSR RP information:
Scope: non-scoped
Group/MaskLen: 224.0.0.0/4 [B]
RP address Priority HoldTime Uptime Expires
10.12.1.1 192 180 00:06:51 00:02:05
Static RP information:
RP address ACL Mode Preferred
10.13.1.4 ---- bidir No
(4) 通過使用display pim df-info命令可以查看雙向PIM的DF信息。
# 查看Switch A上雙向PIM的DF信息
[SwitchA] display pim df-info
RP address: 10.12.1.1
Interface State DF-Pref DF-Metric DF-Uptime DF-Address
Vlan100 Win 0 0 00:01:09 10.10.1.1 (local)
Vlan12 - - - - -
Vlan13 Win 0 0 00:01:10 10.13.1.1 (local)
RP address: 10.13.1.4
Interface State DF-Pref DF-Metric DF-Uptime DF-Address
Vlan100 Win 0 0 00:00:07 10.10.1.1 (local)
Vlan12 Win 0 0 00:00:07 10.12.1.1 (local)
Vlan13 - - - - -
# 查看Switch B上雙向PIM的DF信息
[SwatchB] display pim df-info
RP address: 10.12.1.1
Interface State DF-Pref DF-Metric DF-Uptime DF-Address
Vlan12 - - - - -
Vlan23 Win 0 0 00:01:46 10.23.1.2 (local)
Vlan101 Win 0 0 00:01:45 10.101.1.1 (local)
RP address: 10.13.1.4
Interface State DF-Pref DF-Metric DF-Uptime DF-Address
Vlan12 Lose 0 0 00:00:44 10.12.1.1
Vlan23 Lose 0 0 00:00:53 10.23.1.3
Vlan101 Win 10 2 00:00:53 10.101.1.1 (local)
# 查看Switch C上雙向PIM的DF信息
[SwitchC] display pim df-info
RP address: 10.12.1.1
Interface State DF-Pref DF-Metric DF-Uptime DF-Address
Vlan102 Win 10 2 00:02:07 10.102.1.1 (local)
Vlan33 Win 10 2 00:02:06 10.33.1.3 (local)
Vlan13 Lose 0 0 00:02:07 10.13.1.1
Vlan23 Lose 0 0 00:02:07 10.23.1.2
RP address: 10.13.1.4
Interface State DF-Pref DF-Metric DF-Uptime DF-Address
Vlan102 Win 0 0 00:01:24 10.102.1.1 (local)
Vlan33 Win 0 0 00:01:23 10.33.1.3 (local)
Vlan13 - - - - -
Vlan23 Win 0 0 00:01:24 10.23.1.3 (local)
(5) 通過使用display multicast forwarding df-info命令可以查看組播轉發的DF信息
# 查看Switch A上組播轉發的DF信息
[SwitchA] display multicast forwarding df-info
Total 2 RPs, 2 matched
00001. RP address: 10.12.1.1
Flags: 0x0
Uptime: 00:02:42
RPF interface: Vlan-interface12
List of 2 DF interfaces:
1: Vlan-interface100
2: Vlan-interface13
00002. RP address: 10.13.1.4
Flags: 0x0
Uptime: 00:01:41
RPF interface: Vlan-interface13
List of 2 DF interfaces:
1: Vlan-interface100
2: Vlan-interface12
# 查看Switch B上組播轉發的DF信息
[SwitchB] display multicast forwarding df-info
Total 2 RPs, 2 matched
00001. RP address: 10.12.1.1
Flags: 0x0
Uptime: 00:03:18
RPF interface: Vlan-interface12
List of 2 DF interfaces:
1: Vlan-interface23
2: Vlan-interface101
00002. RP address: 10.13.1.4
Flags: 0x0
Uptime: 00:02:24
RPF interface: Vlan-interface23
List of 1 DF interfaces:
1: Vlan-interface101
# 查看Switch C上組播轉發的DF信息
[SwitchC] display multicast forwarding df-info
Total 2 RPs, 2 matched
00001. RP address: 10.12.1.1
Flags: 0x0
Uptime: 00:03:38
RPF interface: Vlan-interface23
List of 2 DF interfaces:
1: Vlan-interface102
2: Vlan-interface33
00002. RP address: 10.13.1.4
Flags: 0x0
Uptime: 00:02:41
RPF interface: Vlan-interface13
List of 3 DF interfaces:
1: Vlan-interface33
2: Vlan-interface23
3: Vlan-interface102
(6) Host A和Host B指定加入組播組G(225.1.1.1)後,Source 1和Source 2都向組播組225.1.1.1發送組播信息,查看各交換機上的PIM路由表信息,可以看出(*,G)表項總數、PIM的模式、入接口、上遊鄰居、RPF鄰居和下遊接口信息。
# 查看Switch A上的PIM路由表信息。
[SwitchA] display pim routing-table
Total 1 (*, G) entry; 0 (S, G) entry
(*, 225.1.1.1)
RP: 10.12.1.1 (local)
Protocol: pim-bidir, Flag: WC LOC ACT
UpTime: 00:21:59
Upstream interface: Vlan-interface12
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlan-interface12
Protocol: pim-bidir, UpTime: 00:21:59, Expires: -
2: Vlan-interface13
Protocol: pim-bidir, UpTime: 00:03:26, Expires: -
# 查看Switch B上的PIM路由表信息。
[SwitchB] display pim routing-table
Total 1 (*, G) entry; 0 (S, G) entry
(*, 225.1.1.1)
RP: 10.12.1.1
Protocol: pim-bidir, Flag: WC LOC ACT
UpTime: 00:23:47
Upstream interface: Vlan-interface12
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 3
1: Vlan-interface12
Protocol: pim-bidir, UpTime: 00:23:47, Expires: -
2: Vlan-interface23
Protocol: pim-bidir, UpTime: 00:21:56, Expires: -
3: Vlan-interface101
Protocol: igmp, UpTime: 00:23:47, Expires: -
# 查看Switch C上的PIM路由表信息。
[SwitchC] display pim routing-table
Total 1 (*, G) entry; 0 (S, G) entry
(*, 225.1.1.1)
RP: 10.12.1.1
Protocol: pim-bidir, Flag: WC ACT
UpTime: 00:01:45
Upstream interface: Vlan-interface23
Upstream neighbor: 10.23.1.2
RPF prime neighbor: 10.23.1.2
Downstream interface(s) information:
Total number of downstreams: 2
1: Vlan-interface102
Protocol: igmp, UpTime: 00:01:05, Expires: -
2: Vlan-interface23
Protocol: pim-bidir, UpTime: 00:00:53, Expires: -
· Switch A:
#
ospf 1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#
vlan 12 to 13
#
vlan 100
#
interface Vlan-interface12
ip address 10.12.1.1 255.255.255.0
pim sm
#
interface Vlan-interface13
ip address 10.13.1.1 255.255.255.0
pim sm
#
interface Vlan-interface100
ip address 10.10.1.1 255.255.255.0
pim sm
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 100
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 12
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port access vlan 13
#
multicast routing
#
pim
bidir-pim enable
c-bsr 10.12.1.1
c-rp 10.12.1.1 bidir
static-rp 10.13.1.4 bidir
#
· Switch B:
#
ospf 1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#
vlan 12
#
Vlan 23
#
vlan 101
#
interface Vlan-interface12
ip address 10.12.1.2 255.255.255.0
pim sm
#
interface Vlan-interface23
ip address 10.23.1.2 255.255.255.0
pim sm
#
interface Vlan-interface101
ip address 10.101.1.1 255.255.255.0
pim sm
igmp enable
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 101
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 12
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port access vlan 23
#
multicast routing
#
pim
bidir-pim enable
static-rp 10.13.1.4 bidir
#
· Switch C:
#
ospf 1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#
vlan 13
#
vlan 23
#
vlan 33
#
vlan 102
#
interface Vlan-interface13
ip address 10.13.1.3 255.255.255.0
pim sm
#
interface Vlan-interface23
ip address 10.23.1.3 255.255.255.0
pim sm
#
interface Vlan-interface33
ip address 10.33.1.3 255.255.255.0
pim sm
#
interface Vlan-interface102
ip address 10.102.1.1 255.255.255.0
pim sm
igmp enable
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 102
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 23
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port access vlan 13
#
interface Ten-GigabitEthernet1/0/4
port link-mode bridge
port access vlan 33
#
multicast routing
#
pim
bidir-pim enable
static-rp 10.13.1.4 bidir
· H3C S10500係列以太網交換機 IP組播配置指導-R758X
· H3C S10500係列以太網交換機 IP組播命令參考-R758X
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!