CCIE路由實驗(6) -- 組播Multicasting

1.組播IGMP的各類狀況
2.PIM Dense-Mode
3.PIM Sparse-Mode
4.PIM雙向樹和SSM
5.動態RP之auto-rp
6.動態RP之BSR
7.Anycast RP
8.域間組播
9.IPv6組播bootstrap

enable
conf t
no ip do lo
enable pass cisco
line con 0
logg sync
exec-t 0 0
exit
line vty 0 4
pass cisco
logg sync
exit
host 網絡

1.組播IGMP的各類狀況
------------------------------------------------------app

實驗目的
1.深刻了解IGMPv1,IGMPv2,IGMPv3的區別
2.掌握配置IGMPv1,IGMPv2,IGMPv3的方法
3.理解不一樣IGMP版本查詢路由器(querying router)的選舉方法
4.理解DR的做用和選取方法
5.理解最後一個報告者(last reporter)的概念和不一樣IGMP版本的主機離開組的方式
6.理解IGMPv2最後一跳路由器的兩種查詢方法
7.理解fast leave
8.理解配置限制特定組的加入
9.理解IGMPv3的report方式如何兼容IGMPv2tcp

實驗假設:R1和R2模擬兩臺PC,加入組播組。R3和R4模擬最後一跳路由器ide


基本配置:
完成IP地址和IGP的配置,IGP爲全網運行OSPF,均運行在area 0.oop

R1:
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit

router ospf 1
router-id 11.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 0
exit

R2:
int f0/0
ip add 1.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit

router ospf 1
router-id 22.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 22.1.1.0 0.0.0.255 area 0
exit

R3:
int f0/0
ip add 1.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit

router ospf 1
router-id 33.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 33.1.1.0 0.0.0.255 area 0
exit

R4:
int f0/0
ip add 1.1.1.4 255.255.255.0
no shut
exit
int l0
ip add 44.1.1.1 255.255.255.0
exit

router ospf 1
router-id 44.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 44.1.1.0 0.0.0.255 area 0
exit
View Code

-----------------------------------------------------
R3/R4:
ip multicast-routing
int f0/0
ip pim sparse-mode
exit

R2:
show ip igmp int f0/0

R3/R4:
show ip igmp int f0/0
show ip pim int

查詢路由器的做用:在有多個最後一跳路由器的狀況下,由查詢路由器發起IGMP的查詢(query)消息。IGMPv2和IGMPv3的查詢路由器的選取原則爲接口IP地址小的爲查詢路由器。

DR的做用:在有多個第一跳路由器的狀況下,由DR負責轉發組播源發出的組播流和向RP註冊;在有多個最後一跳路由器的狀況下,由DR負責向組播源或者RP發送PIM的join消息。
DR的選取原則:優選DR優先級高的爲DR,若是優先級同樣,則選取IP地址大的爲DR。

----------------------------------------------------
R3:
int f0/0
ip pim dr-priority 2
exit

show ip pim int

int f0/0
ip igmp ver 1
no ip pim dr-priority 2
exit

R4:
int f0/0
ip igmp ver 1
exit

show ip igmp int f0/0

DR路由器同時也是IGMPv1的查詢路由器。

-----------------------------------------------
觀察IGMP在最後一跳路由器和主機之間的交互狀況,如哪臺主機是last reporter, reporter抑制功能,主機離開一個組是否發送leave信息。

R3/R4:
int f0/0
ip igmp ver 2
exit

R1/R2:
int f0/0
ip igmp join-group 228.1.1.1
exit

R3:
debug ip igmp
no debug all
show ip igmp groups

當前R3的last reporter是R2

R2:
int f0/0
no ip igmp join-group 228.1.1.1

當last reporter離開一個組的時候,要發送leave報文通知最後一跳路由器,而後路由器連續發送兩個查詢報文,查詢是否還有該組的接收者存在,此時的查詢報文是針對特定組的查詢;對於非last reporter離開一個組,不須要發送leave報文,由於這個時候路由器記錄的組播接收者不是它。普通查詢是週期性的,爲60s一次,特定組的查詢是針對有用戶發出leave報文才觸發的。

-----------------------------------------
fast leave: 在最後一跳路由器的接口只有一個接收者的狀況下,若是接受者離開該組,發送leave報文,路由器不須要發送查詢報文,直接中止發送組播流到該接口,這樣能夠大大的減小leave latency。

R3:
access-list 1 permit 229.1.1.1
int f0/0
ip igmp immediate-leave group-list 1
exit

R1:
int f0/0
ip igmp join-group 229.1.1.1
no ip igmp join-group 229.1.1.1
exit

-----------------------------------------------
缺省狀況下,最後一跳路由器能夠接收任何主機加入任何組。能夠配置最後一跳路由器限制特定組的加入。(IGMPv2)

R3:
access-list 2 permit 228.1.1.1
access-list 2 permit 229.1.1.1
int f0/0
ip igmp access-group 2
exit

R1:
int f0/0
ip igmp join-group 230.1.1.1
exit

-------------------------------------------------------
IGMPv3支持針對特定源的特定組加入功能。

R2:
int f0/0
shutdown
exit

R3:
int f0/0
ip igmp version 3
ip pim sparse-mode
exit

end
show running-config int f0/0
conf t

R1:
int f0/0
ip igmp version 3
ip igmp join-group 232.1.1.1 source 33.1.1.1
ip igmp join-group 228.1.1.1
exit

end
show running-config int f0/0
conf t

R3:
show ip igmp groups detail

針對232.1.1.1,加入指定源33.1.1.1,爲include模式,也就是說只能接收33.1.1.1發出的目的地址爲232.1.1.1的組播流;
針對228.1.1.1,爲exclude模式,可是排除的組播源列表爲空,也就是說能夠接收任何組播源發出的目的地址爲228.1.1.1的組播流,這樣就實現了對IGMPv2的兼容。學習

2.PIM Dense-Mode
------------------------------------------------------------------------------------------------------測試

實驗目的
1.掌握配置PIM DM的基本步驟
2.掌握trouble shooting PIM DM
3.理解PIM的工做過程,體會組播樹的生成和維護過程
4.理解assert選舉方法和在哪些鏈路會選舉assert路由器
5.理解嫁接過程
6.理解剪枝過程
7.深刻理解RPF檢查
8.理解組播路由表的標識位
spa

實驗假設:R5模擬組播源,R3模擬第一跳路由器,R7模擬最後一跳路由器,R8模擬組播接收者。
完成IP地址和IGP的配置,IGP爲全網運行OSPF,均運行在area 0.
debug

配置接口以及IGP(OSPF)

R1:
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.1 255.255.255.0
no shut
exit

router ospf 1
router-id 11.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
exit

R2:
int f0/0
ip add 1.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
no shut
exit
int s2/1
ip add 23.1.1.2 255.255.255.0
no shut
exit

router ospf 1
router-id 22.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 22.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit

R3:
int f0/0
ip add 1.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit
int f0/1
ip add 36.1.1.3 255.255.255.0
no shut
exit
int f1/0
ip add 35.1.1.3 255.255.255.0
no shut
exit
int s2/1
ip add 23.1.1.3 255.255.255.0
no shut
exit

router ospf 1
router-id 33.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 33.1.1.0 0.0.0.255 area 0
network 35.1.1.0 0.0.0.255 area 0
network 36.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
exit

R4:
int f0/0
ip add 1.1.1.4 255.255.255.0
no shut
exit
int l0
ip add 44.1.1.1 255.255.255.0
exit

router ospf 1
router-id 44.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 44.1.1.0 0.0.0.255 area 0
exit

R5:
int f1/0
ip add 35.1.1.5 255.255.255.0
no shut
exit
int l0
ip add 55.1.1.1 255.255.255.0
exit

router ospf 1
router-id 55.1.1.1
network 35.1.1.0 0.0.0.255 area 0
network 55.1.1.0 0.0.0.255 area 0
exit

R6:
int f0/1
ip add 36.1.1.6 255.255.255.0
no shut
exit
int l0
ip add 66.1.1.1 255.255.255.0
exit

router ospf 1
router-id 66.1.1.1
network 36.1.1.0 0.0.0.255 area 0
network 66.1.1.0 0.0.0.255 area 0
exit

R7:
int f0/0
ip add 78.1.1.7 255.255.255.0
no shut
exit
int f1/0
ip add 17.1.1.7 255.255.255.0
no shut
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
no shut
exit
int l0
ip add 77.1.1.1 255.255.255.0
exit

router ospf 1
router-id 77.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
network 77.1.1.0 0.0.0.255 area 0
exit

R8:
int f0/0
ip add 78.1.1.8 255.255.255.0
no shut
exit
int l0
ip add 88.1.1.1 255.255.255.0
exit

router ospf 1
router-id 88.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 88.1.1.0 0.0.0.255 area 0
exit
View Code

配置PIM Dense-Mode(除組播源及接受者外)

R1:
ip multicast-routing
int f0/0
ip pim dense-mode
exit
int f1/0
ip pim dense-mode
exit

R2:
ip multicast-routing
int f0/0
ip pim dense-mode
exit
int s2/0
ip pim dense-mode
exit
int s2/1
ip pim dense-mode
exit

R3:
ip multicast-routing
int f0/0
ip pim dense-mode
exit
int f0/1
ip pim dense-mode
exit
int f1/0
ip pim dense-mode
exit
int s2/1
ip pim dense-mode
exit

R4:
ip multicast-routing
int f0/0
ip pim dense-mode
exit

R6:
ip multicast-routing
int f0/1
ip pim dense-mode
exit

R7:
ip multicast-routing
int f0/0
ip pim dense-mode
exit
int f1/0
ip pim dense-mode
exit
int s2/0
ip pim dense-mode
exit
View Code

-------------------------------------------------
R2:
show ip pim int
show ip pim neighbor

R8:
int f0/0
ip igmp join-group 228.1.1.1
exit

R7:
show ip mroute

R5:
ping 228.1.1.1 repeat 10000

ping產生的是組播數據流,沿着組播樹到達接收者,接收者而後單播發送echo reply報文到組播源,因此看到reply報文是從78.1.1.8來的。
因爲測試數據分別通過組播樹和單播路由,所以若是測試不成功,並不表明組播樹必定有問題,還多是單播的路由有故障,此時能夠在接收者上debug ip icmp來判斷。

R6:
int l0
ip pim dense-mode
ip igmp join-group 228.1.1.1
exit

R5:
ping 228.1.1.1 repeat 10000

R3/R1/R2/R7:
show ip mroute

能夠看到組播路徑是R5->R3->R1->R7->R8。在R3的s2/1的出接口和R2的s2/0的出接口上都有A標識,標識是該鏈路的assert路由器,避免重複組播流。
assert路由器選取原則:優選去往組播源IGP metric值小的路由器,其次選IP地址大的路由器。

每一個路由器轉發組播包的時候,都須要作RPF(reverse path forwarding)檢查,肯定收到組播的接口與echo reply的接口一致,不然丟棄組播包,此處檢查的依據是組播源。
RPF檢查的順序:組播靜態路由-->DVMRP(現實中不用)-->MB-BGP學習到的路由-->單播協議學習到的路由

對於每一個組,路由器上的組播路由表都有兩個表項,分別爲(*,G)和(S,G),在轉發組播數據流的時候,是依據(S,G)表項來進行的,能夠理解爲最長匹配原則。

(S,G)表項的計時器是因爲有組播流觸發而生成的。

R7:
show ip rpf 35.1.1.5

觀察graft和prume
---------------------------------------------------------------------------
R8:
int f0/0
no ip igmp join-group 228.1.1.1
exit

R7:
debug ip pim

R8:
int f0/0
ip igmp join-group 228.1.1.1
no ip igmp join-group 228.1.1.1
exit

R7:
ip mroute 35.1.1.5 255.255.255.255 27.1.1.2
end

show ip rpf 35.1.1.5

R8:
int f0/0
ip igmp join-group 228.1.1.1
exit

R2/R7:
show ip mroute

Trouble Shooting commands:
-------------------------------------------------------------------------

show ip pim interface
show ip pim neighbor
mrinfo {hostname | add}
show ip rpf {source-add | name}
show ip route
show ip igmp interface
show ip igmp groups
show ip mroute
show ip mroute summary
show ip mroute count
show ip mroute active
debug ip mrouting [group]
debug ip mpacket [detail][access-list][group]
debug ip pim [group]


3.PIM Sparse-Mode
----------------------------------------------------------------------------------------------------------------

實驗目的:
1.掌握Sparse-Mode的配置方法
2.觀察Sparse-Mode共享樹的生成和維護過程
3.觀察Sparse-Mode源樹的生成和維護過程
4.觀察Sparse-Mode共享樹向源樹的切換過程
5.觀察Sparse-Mode標識
6.掌握測試Sparse-Mode的方法和思路

實驗假設:R5模擬組播源,R3模擬第一跳路由器,R2是RP,R7模擬最後一跳路由器,R8模擬組播接收者。
完成IP地址和IGP的配置,IGP爲全網運行OSPF,均運行在area 0.

配置接口以及IGP(OSPF)

R1:
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.1 255.255.255.0
no shut
exit

router ospf 1
router-id 11.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
exit

R2:
int f0/0
ip add 1.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
no shut
exit
int s2/1
ip add 23.1.1.2 255.255.255.0
no shut
exit

router ospf 1
router-id 22.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 22.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit

R3:
int f0/0
ip add 1.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit
int f0/1
ip add 36.1.1.3 255.255.255.0
no shut
exit
int f1/0
ip add 35.1.1.3 255.255.255.0
no shut
exit
int s2/1
ip add 23.1.1.3 255.255.255.0
no shut
exit

router ospf 1
router-id 33.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 33.1.1.0 0.0.0.255 area 0
network 35.1.1.0 0.0.0.255 area 0
network 36.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
exit

R4:
int f0/0
ip add 1.1.1.4 255.255.255.0
no shut
exit
int l0
ip add 44.1.1.1 255.255.255.0
exit

router ospf 1
router-id 44.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 44.1.1.0 0.0.0.255 area 0
exit

R5:
int f1/0
ip add 35.1.1.5 255.255.255.0
no shut
exit
int l0
ip add 55.1.1.1 255.255.255.0
exit

router ospf 1
router-id 55.1.1.1
network 35.1.1.0 0.0.0.255 area 0
network 55.1.1.0 0.0.0.255 area 0
exit

R6:
int f0/1
ip add 36.1.1.6 255.255.255.0
no shut
exit
int l0
ip add 66.1.1.1 255.255.255.0
exit

router ospf 1
router-id 66.1.1.1
network 36.1.1.0 0.0.0.255 area 0
network 66.1.1.0 0.0.0.255 area 0
exit

R7:
int f0/0
ip add 78.1.1.7 255.255.255.0
no shut
exit
int f1/0
ip add 17.1.1.7 255.255.255.0
no shut
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
no shut
exit
int l0
ip add 77.1.1.1 255.255.255.0
exit

router ospf 1
router-id 77.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
network 77.1.1.0 0.0.0.255 area 0
exit

R8:
int f0/0
ip add 78.1.1.8 255.255.255.0
no shut
exit
int l0
ip add 88.1.1.1 255.255.255.0
exit

router ospf 1
router-id 88.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 88.1.1.0 0.0.0.255 area 0
exit
View Code

配置PIM Sparse-Mode(除組播源及接受者外)

R1:
ip multicast-routing
ip pim rp-address 22.1.1.1
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R2:
ip multicast-routing
ip pim rp-address 22.1.1.1
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
int s2/1
ip pim sparse-mode
exit

R3:
ip multicast-routing
ip pim rp-address 22.1.1.1
int f0/0
ip pim sparse-mode
exit
int f0/1
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit
int s2/1
ip pim sparse-mode
exit

R4:
ip multicast-routing
ip pim rp-address 22.1.1.1
int f0/0
ip pim sparse-mode
exit

R6:
ip multicast-routing
ip pim rp-address 22.1.1.1
int f0/1
ip pim sparse-mode
exit

R7:
ip multicast-routing
ip pim rp-address 22.1.1.1
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
View Code

-------------------------------------------------
R2:
show ip pim int
show ip pim neighbor
show ip pim rp mapping

R8:
int f0/0
ip igmp join-group 228.1.1.1
exit

R7:
show ip mroute
conf t
ip pim spt-threshold infinity
end
show ip mroute

R1/R2:
show ip mroute

R7:
int s2/0
ip ospf cost 1
exit
show ip route ospf

R2:
int f0/0
ip ospf cost 3
exit
int s2/1
ip ospf cost 2
exit
show ip route ospf

R7:
show ip route ospf

R7/R2:
show ip mroute

R5:
ping 228.1.1.1

R3/R2:
show ip mroute

R7:
ip pim spt-threshold 0
clear ip mroute *

R5:(wait until R2/R7 mroute establish again)
ping 228.1.1.1 reapeat 1

R3/R1/R2/R7:
show ip mroute

R5:
ping 228.1.1.1 reapeat 1

R3/R2/R7:
show ip mroute


4.PIM雙向樹和SSM
--------------------------------------------------------------------------------------------------------------------

實驗目的:
1.掌握PIM雙向樹的配置方法
2.觀察PIM雙向樹的組播路由表和標識
3.觀察PIM雙向樹的DF選擇原則
4.掌握PIM SSM的配置方法
5.觀察PIM SSM的組播路由表和標識

實驗假設:R5模擬組播源,R3模擬第一跳路由器,R7是RP,R8是最後一跳路由器,同時模擬接受者。

配置接口以及IGP(OSPF)

R1:
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.1 255.255.255.0
no shut
exit

router ospf 1
router-id 11.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
exit

R2:
int f0/0
ip add 1.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
no shut
exit

router ospf 1
router-id 22.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 22.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit

R3:
int f0/0
ip add 1.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit
int f1/0
ip add 35.1.1.3 255.255.255.0
no shut
exit

router ospf 1
router-id 33.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 33.1.1.0 0.0.0.255 area 0
network 35.1.1.0 0.0.0.255 area 0
exit

R5:
int f1/0
ip add 35.1.1.5 255.255.255.0
no shut
exit
int l0
ip add 55.1.1.1 255.255.255.0
exit

router ospf 1
router-id 55.1.1.1
network 35.1.1.0 0.0.0.255 area 0
network 55.1.1.0 0.0.0.255 area 0
exit

R7:
int f0/0
ip add 78.1.1.7 255.255.255.0
no shut
exit
int f1/0
ip add 17.1.1.7 255.255.255.0
no shut
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
no shut
exit
int l0
ip add 77.1.1.1 255.255.255.0
exit

router ospf 1
router-id 77.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
network 77.1.1.0 0.0.0.255 area 0
exit

R8:
int f0/0
ip add 78.1.1.8 255.255.255.0
no shut
exit
int l0
ip add 88.1.1.1 255.255.255.0
exit

router ospf 1
router-id 88.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 88.1.1.0 0.0.0.255 area 0
exit
View Code

配置PIM Sparse-Mode(除組播源及接受者外)

R1:
ip multicast-routing
ip pim bidir-enable
ip pim rp-address 77.1.1.1 bidir
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R2:
ip multicast-routing
ip pim bidir-enable
ip pim rp-address 77.1.1.1 bidir
int f0/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit

R3:
ip multicast-routing
ip pim bidir-enable
ip pim rp-address 77.1.1.1 bidir
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R7:
ip multicast-routing
ip pim bidir-enable
ip pim rp-address 77.1.1.1 bidir
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
int l0
ip pim sparse-mode
exit

R8:
ip multicast-routing
ip pim bidir-enable
ip pim rp-address 77.1.1.1 bidir
int f0/0
ip pim sparse-mode
exit
int l0
ip pim sparse-mode
exit
View Code

-------------------------------------------------
R2:
show ip pim int
show ip pim neighbor
show ip pim rp mapping

R8:
int l0
ip igmp join-group 228.1.1.1
exit

show ip mroute

R7:
show ip mroute

R5:
ping 228.1.1.1

R3/R1/R7:
show ip mroute

R2:
int s2/0
ip ospf cost 1
exit

debug ip pim df

R5:
ping 228.1.1.1

R3/R1/R7:
show ip mroute

R8:
no ip pim bidir-enable
int f0/0
no ip pim sparse-mode
exit
int l0
no ip pim sparse-mode
no ip igmp join-group 228.1.1.1
exit

SSM配置
--------------------------------------------
R7:
int f0/0
ip igmp version 3
ip pim sparse-mode
exit
ip pim ssm default

R1/R2/R3:
conf t
ip pim ssm default

R8:
int f0/0
ip igmp version 3
ip igmp join-group 232.1.1.1 source 35.1.1.5
exit

R5:
ping 232.1.1.1


5.動態RP之auto-rp
-------------------------------------------------------------------------------------------

配置接口以及IGP(OSPF)

R1:
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.1 255.255.255.0
no shut
exit

router ospf 1
router-id 11.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
exit

R2:
int f0/0
ip add 1.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
no shut
exit

router ospf 1
router-id 22.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 22.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit

R3:
int f0/0
ip add 1.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit
int f1/0
ip add 35.1.1.3 255.255.255.0
no shut
exit

router ospf 1
router-id 33.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 33.1.1.0 0.0.0.255 area 0
network 35.1.1.0 0.0.0.255 area 0
exit

R4:
int f0/0
ip add 1.1.1.4 255.255.255.0
no shut
exit
int l0
ip add 44.1.1.1 255.255.255.0
exit

router ospf 1
router-id 44.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 44.1.1.0 0.0.0.255 area 0
exit

R5:
int f1/0
ip add 35.1.1.5 255.255.255.0
no shut
exit
int l0
ip add 55.1.1.1 255.255.255.0
exit

router ospf 1
router-id 55.1.1.1
network 35.1.1.0 0.0.0.255 area 0
network 55.1.1.0 0.0.0.255 area 0
exit

R7:
int f0/0
ip add 78.1.1.7 255.255.255.0
no shut
exit
int f1/0
ip add 17.1.1.7 255.255.255.0
no shut
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
no shut
exit
int l0
ip add 77.1.1.1 255.255.255.0
exit

router ospf 1
router-id 77.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
network 77.1.1.0 0.0.0.255 area 0
exit

R8:
int f0/0
ip add 78.1.1.8 255.255.255.0
no shut
exit
int l0
ip add 88.1.1.1 255.255.255.0
exit

router ospf 1
router-id 88.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 88.1.1.0 0.0.0.255 area 0
exit
View Code

配置PIM Sparse-Mode(除組播源及接受者外)

R1:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R2:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit

R3:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R4:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit

R7:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
View Code

配置Auto RP
-------------------------------------------------
R2:
show ip pim int
show ip pim neighbor

R2:
ip pim autorp listener
ip pim send-rp-announce 1oopback 0 scope 10 group-list 10
ip access-list 10 permit 224.100.100.100
exit

R3:
ip pim autorp listener
ip pim send-rp-announce 1oopback 0 scope 10 group-list 10
ip access-list 10 permit 224.100.100.100
exit

R1:
ip pim send-rp-discovery loopback 0 scope 10

當使用auto-rp在pim sparse-mode網絡中,這個命令須要配置在全部候選路由器上。緣由是由於auto-rp的兩個組播地址224.0.1.39和224.0.1.40只能夠在dense-mode下傳輸,由於全部端口都配置的是sparse,因此auto-rp的信息會被丟掉。而這個命令就是使得dense-mode的auto-rp traffic能夠經過sparse-mode的端口。

設置了send-rp-announce的路由器充當rp,發送224.0.1.39的組播包告訴rp-map的路由器「我是rp」
設置了send-rp-discovery的路由器充當rp-map,發送224.0.1.40的組播包告訴網絡中的其餘路由器「選誰作rp」。

R7:
show ip pim rp mapping

R8:
int f0/0
ip igmp join-group 224.100.100.100
exit

R5:
ping 224.100.100.100


6.動態RP之BSR
--------------------------------------------------------------------------------------------------

------------------------------------------------------------
R2/R3:
no ip pim autorp listener
no ip pim send-rp-announce 1oopback 0
no ip access-list standard 10

R1:
no ip pim send-rp-discovery

配置BSR
------------------------------------------------------------

全部候選BSR經過bootstrap報文來選舉BSR,優先級最高的BSR最後會通知在組播網中全部路由器它是BSR。這時候RP的候選會發送c-rp-adv報文到獲勝的BSR,報文包括了這個RP的優先級和它對應的組播地址段。BSR將這些信息放入rp-set,而後放在boorstrap報文中發送給組播網中全部的路有器。
在整個過程當中,全部的報文都是unicast發送的。


R2:
show ip pim int
show ip pim neighbor

R1:
ip pim bsr-candidate loopback 0 4 10

R3:
ip pim bsr-candidate loopback 0 5 5

R7/R3:
show ip pim bsr-router

R2:
ip pim rp-candidate loopback 0 group-list 1
access-list 1 permit 224.100.100.100

R7:
ip pim rp-candidate loopback 0 group-list 1 priority 100
access-list 1 permit 224.100.100.100

R8:
int f0/0
ip igmp join-group 224.100.100.100

R3:
show ip pim rp mapping
show ip pim rp

R5:
ping 224.100.100.100

Hash配置
--------------------------------------
R1/R3:
ip pim bsr-candidate loopback 0 30

R2/R7:
ip pim rp-candidate loopback 0

R8:
int f0/0
ip igmp join-group 224.100.100.100
ip igmp join-group 224.100.100.1
ip igmp join-group 224.100.100.2
ip igmp join-group 224.100.100.3
ip igmp join-group 224.100.100.4
ip igmp join-group 224.100.100.5
ip igmp join-group 224.100.100.6
ip igmp join-group 224.100.100.7
ip igmp join-group 224.100.100.8
ip igmp join-group 224.100.100.9
ip igmp join-group 224.100.100.10
ip igmp join-group 224.100.100.11
ip igmp join-group 224.100.100.12
ip igmp join-group 224.100.100.13
ip igmp join-group 224.100.100.14
ip igmp join-group 224.100.100.15
ip igmp join-group 224.100.100.16
ip igmp join-group 224.100.100.17
ip igmp join-group 224.100.100.18
ip igmp join-group 224.100.100.19
ip igmp join-group 224.100.100.20
ip igmp join-group 224.100.100.21
ip igmp join-group 224.100.100.22
ip igmp join-group 224.100.100.23
ip igmp join-group 224.100.100.24
ip igmp join-group 224.100.100.25
ip igmp join-group 224.100.100.26
ip igmp join-group 224.100.100.27
ip igmp join-group 224.100.100.28
ip igmp join-group 224.100.100.29
ip igmp join-group 224.100.100.30
ip igmp join-group 224.100.100.31
ip igmp join-group 224.100.100.32
ip igmp join-group 224.100.100.33
exit

R1:
show ip pim rp


7.Anycast RP
----------------------------------------------------------------------------------------------------

配置接口以及IGP(OSPF)

R1:
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
exit
int l0
ip add 11.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.1 255.255.255.0
no shut
exit

router ospf 1
router-id 11.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 11.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
exit

R2:
int f0/0
ip add 1.1.1.2 255.255.255.0
no shut
exit
int l0
ip add 22.1.1.1 255.255.255.0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
no shut
exit

router ospf 1
router-id 22.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 22.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit

R3:
int f0/0
ip add 1.1.1.3 255.255.255.0
no shut
exit
int l0
ip add 33.1.1.1 255.255.255.0
exit
int f1/0
ip add 35.1.1.3 255.255.255.0
no shut
exit

router ospf 1
router-id 33.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 33.1.1.0 0.0.0.255 area 0
network 35.1.1.0 0.0.0.255 area 0
exit

R4:
int f0/0
ip add 1.1.1.4 255.255.255.0
no shut
exit
int l0
ip add 44.1.1.1 255.255.255.0
exit

router ospf 1
router-id 44.1.1.1
network 1.1.1.0 0.0.0.255 area 0
network 44.1.1.0 0.0.0.255 area 0
exit

R5:
int f1/0
ip add 35.1.1.5 255.255.255.0
no shut
exit
int l0
ip add 55.1.1.1 255.255.255.0
exit

router ospf 1
router-id 55.1.1.1
network 35.1.1.0 0.0.0.255 area 0
network 55.1.1.0 0.0.0.255 area 0
exit

R7:
int f0/0
ip add 78.1.1.7 255.255.255.0
no shut
exit
int f1/0
ip add 17.1.1.7 255.255.255.0
no shut
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
no shut
exit
int l0
ip add 77.1.1.1 255.255.255.0
exit

R8:
int f0/0
ip add 78.1.1.8 255.255.255.0
no shut
exit
int l0
ip add 88.1.1.1 255.255.255.0
exit

router ospf 1
router-id 88.1.1.1
network 78.1.1.0 0.0.0.255 area 0
network 88.1.1.0 0.0.0.255 area 0
exit
View Code

配置PIM Sparse-Mode(除組播源及接受者外)

R1:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R2:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit

R3:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R4:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit

R7:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
View Code

配置Anycast RP
-------------------------------------------------
R2:
show ip pim int
show ip pim neighbor

R3/R7:
int l1
ip add 3.3.3.3 255.255.255.255
exit
router ospf 1
network 3.3.3.3 0.0.0.0 area 0
exit

int l1
ip pim sparse-mode
exit

R2:
ip pim bsr-candidate l0

R3/R7:
ip pim rp-candidate l1

R3:
ip msdp peer 77.1.1.1 connect-source l0

R7:
ip msdp peer 33.1.1.1 connect-source l0

show ip msdp summary

R8:
int f0/0
ip igmp join-group 224.100.100.100
exit

R5:
ping 224.100.100.100 repeat 5

R3/R7:
show ip mroute


8.域間組播
-----------------------------------------------------------------------------------------------------

配置接口以及IGP(OSPF)

R4:
int l0
ip add 44.1.1.1 255.255.255.0
exit
int f1/0
ip add 46.1.1.4 255.255.255.0
no shut
exit
int f0/0
ip add 14.1.1.4 255.255.255.0
no shut
exit

router ospf 1
router-id 44.1.1.1
network 44.1.1.0 0.0.0.255 area 0
network 46.1.1.0 0.0.0.255 area 0
exit

R6:
int l0
ip add 66.1.1.1 255.255.255.0
exit
int f1/0
ip add 46.1.1.6 255.255.255.0
no shut
exit
int f0/1
ip add 36.1.1.6 255.255.255.0
no shut
exit

router ospf 1
router-id 66.1.1.1
network 66.1.1.0 0.0.0.255 area 0
network 46.1.1.0 0.0.0.255 area 0
network 36.1.1.0 0.0.0.255 area 0
exit

R3:
int l0
ip add 33.1.1.1 255.255.255.0
exit
int f0/1
ip add 36.1.1.3 255.255.255.0
no shut
exit

router ospf 1
router-id 33.1.1.1
network 33.1.1.0 0.0.0.255 area 0
network 36.1.1.0 0.0.0.255 area 0
exit
View Code

配置接口以及IGP(OSPF)

R1:
int l0
ip add 11.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.1 255.255.255.0
no shut
exit
int f0/1
ip add 18.1.1.1 255.255.255.0
no shut
exit
int f0/0
ip add 14.1.1.1 255.255.255.0
no shut
exit

router ospf 1
router-id 11.1.1.1
network 11.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
network 18.1.1.0 0.0.0.255 area 0
exit

R8:
int l0
ip add 88.1.1.1 255.255.255.0
exit
int f0/1
ip add 18.1.1.8 255.255.255.0
no shut
exit

router ospf 1
router-id 88.1.1.1
network 88.1.1.0 0.0.0.255 area 0
network 18.1.1.0 0.0.0.255 area 0
exit

R7:
int l0
ip add 77.1.1.1 255.255.255.0
exit
int f1/0
ip add 17.1.1.7 255.255.255.0
no shut
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
no shut
exit

router ospf 1
router-id 77.1.1.1
network 77.1.1.0 0.0.0.255 area 0
network 17.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit

R2:
int l0
ip add 22.1.1.1 255.255.255.0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
no shut
exit

router ospf 1
router-id 22.1.1.1
network 22.1.1.0 0.0.0.255 area 0
network 27.1.1.0 0.0.0.255 area 0
exit
View Code

配置AS 200 Pim Sparse-Mode

R4:
ip multicast-routing
int f1/0
ip pim sparse-mode
exit
int l0
ip pim sparse-mode
exit

R6:
ip multicast-routing
int f1/0
ip pim sparse-dense-mode
exit
int f0/1
ip pim sparse-dense-mode
exit
int l0
ip pim sparse-dense-mode
exit

ip pim send-rp-announce l0 scope 2
ip pim send-rp-discovery l0 scope 2

R3:
ip multicast-routing
int f0/1
ip pim sparse-mode
exit
int l0
ip pim sparse-mode
exit
View Code

R4:

show ip pim rp mapping

R3:
int f0/1
ip igmp join-group 228.1.1.1
exit

R6:
show ip mroute

配置AS 100 Pim Sparse-Mode

R1:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/1
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

R8:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int f0/1
ip pim sparse-mode
exit

R7:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
int f1/0
ip pim sparse-mode
exit

ip pim bsr-candidate l0
ip pim rp-candidate l0

R2:
ip multicast-routing
int l0
ip pim sparse-mode
exit
int s2/0
ip pim sparse-mode
exit
View Code

R1:
show ip pim rp mapping

R2:
int s2/0
ip igmp join-group 228.1.1.1
exit

R7:
show ip mroute

MSDP Peer的配置
----------------------------------------------
R4:
router bgp 200
bgp router-id 44.1.1.1
neighbor 14.1.1.1 remote-as 100
neighbor 66.1.1.1 remote-as 200
neighbor 66.1.1.1 update-source l0
neighbor 66.1.1.1 next-hop-self
exit

R6:
router bgp 200
bgp router-id 66.1.1.1
neighbor 44.1.1.1 remote-as 200
neighbor 44.1.1.1 update-source l0
neighbor 33.1.1.1 remote-as 200
neighbor 33.1.1.1 update-source l0
neighbor 33.1.1.1 route-reflector-client
network 66.1.1.0 mask 255.255.255.0
exit

R3:
router bgp 200
bgp router-id 33.1.1.1
neighbor 66.1.1.1 remote-as 200
neighbor 66.1.1.1 update-source l0
exit


R1:
router bgp 100
bgp router-id 11.1.1.1
neighbor 14.1.1.4 remote-as 200
neighbor 77.1.1.1 remote-as 100
neighbor 77.1.1.1 update-source l0
neighbor 77.1.1.1 next-hop-self
exit

R7:
router bgp 100
bgp router-id 77.1.1.1
neighbor 11.1.1.1 remote-as 100
neighbor 11.1.1.1 update-source l0
network 77.1.1.0 mask 255.255.255.0
exit

R6:
ip msdp peer 77.1.1.1 connect-source l0

R7:
ip msdp peer 66.1.1.1 connect-source l0

R6/R7:
show ip msdp peer
show tcp brief

R3:
debug ip icmp

R8:
ping 228.1.1.1 repeat 3

R1:
int f0/0
ip pim sparse-mode
ip pim bsr-border
exit

R4:
int f0/0
ip pim sparse-mode
ip pim bsr-border
exit

R1:
router bgp 100
network 18.1.1.0 mask 255.255.255.0
exit

R6:
show ip route bgp
show ip msdp sa-cache
show ip mroute

R4:
show ip mroute


---------------------------------------------------------------------------------------
R1:
router bgp 100
no network 18.1.1.0 mask 255.255.255.0
address-family ipv4 multicast
neighbor 14.1.1.4 activate
network 18.1.1.0 mask 255.255.255.0
exit
exit

R4:
router bgp 200
address-family ipv4 multicast
neighbor 14.1.1.1 activate
neighbor 66.1.1.1 activate
exit
exit

R6:
router bgp 200
address-family ipv4 multicast
neighbor 44.1.1.1 activate
exit
exit

show ip bgp ipv4 multicast

R3:
debug ip icmp

R8:
ping 228.1.1.1 repeat 3

R1:
int f0/0
no ip pim sparse-mode
exit

int tunnel 0
ip add 41.1.1.1 255.255.255.0
tunnel source f0/0
tunnel destination 14.1.1.4
ip pim sparse-mode
ip pim bsr-border
exit

R4:
int f0/0
no ip pim sparse-mode
exit

int tunnel 0
ip add 41.1.1.4 255.255.255.0
tunnel source f0/0
tunnel destination 14.1.1.1
ip pim sparse-mode
ip pim bsr-border
exit

ip mroute 18.1.1.0 255.255.255.0 tunnel 0

R4:
show ip mroute

9.IPv6組播-----------------------------------------------------------------------

相關文章
相關標籤/搜索