Está en la página 1de 13

Configuration PIM Sparse-Mode with static RP:

1. Topology :

Trc khi cu hnh Multicast, chng ta phi cu hnh unicast trc, v Multicast (PIM) s dng RPF kim tra xem multicast packet m Router nhn c c hp l hay khng. Trong RPF da vo unicast routing table kim tra. Trong bi ny chng ta chn OSPF cu hnh unicast: Sau y l cc bc chi tit hon thnh cu hnh PIM Sparse-Mode: Bc 1. Cu hnh IP cho cc Interface trn tt c Router:
o o

m bo cc Router phi ping thy IP Router lng ging V d: R1 phi ping thy IP 192.168.1.2 ca R2

Bc 2. Cu hnh unicast routing OSPF trn tt c Router:

o o o o

Vo Global Configuration Mode. V d : R1(config)# Vo Router OSPF Mode. V d: R1(config-router)# Enable OSPF trn tt c cc Interface ca Router. V d : R1(configrouter)#network 0.0.0.0 255.255.255.255 area 0 Kim tra li bng nh tuyn (routing table), v m bo cc router phi ping c tt c cc subnet khc.

Bc 3. Cu hnh PIM Sparse-Mode v static RP:


o

Enable Multicast Routing trn tt c Router: Router(config)#ip multicast-routing (Notes: theo mc nh Multicast Routing b disable trn Router) Enable PIM Sparse-Mode trn tt c Interface ca tt c Router : Router(config-if)#ip pim sparse-mode Hoc Router(config-if)#ip pim sparse-dense-mode (recommend) Chn Loopback 0 ca R2 l RP cho tt c Multicast Group (224.0.0.0 -> 239.255.255.255): Router(config)#ip pim rp-address 2.2.2.2 (Notes: phi cu hnh static RP trn tt c Router) Ch im khc nhau gia 2 cu lnh: ip pim sparse-mode v ip pim sparsedense-mode l: ip pim sparse-mode: ch nh cho Router ch hot ng ch PIM Sparse-Mode cho tt c Group Multicast (t 224.0.0.0 -> 239.255.255.255) nu c RP ip pim sparse-dense-mode: ch nh cho Router hot ng ch PIM Dense-Mode cho nhng Group Multicast khng c RP v hot ng ch PIM Sparse-Mode cho nhng Group Multicast c RP. V d: trong m hnh trn Nu Group Multicast 224.0.0.0 -> 231.255.255.255 c RP l R2 th cc Router s hot ng ch PIM Sparse-Mode cho Group Multicast ny. Group Multicast 232.0.0.0 -> 239.255.255.255 khng c RP th cc Router s hot ng ch PIM Dense-Mode cho Group Multicast ny. Nh vy ty vo cu hnh c hay khng c RP m Router s hot ng theo kiu PIM Sparse-Mode hay PIM Dense-Mode.

Bc 4. Test s hot ng ca PIM Sparse-Mode:


o

Enable IGMP trn Interface Loopback 0 ca R3 Join vo Group 224.4.4.4, Interface Loopback 0 ca R4 Join vo Group 225.5.5.5: R3(config-if)#ip igmp join-group 224.4.4.4 R4(config-if)#ip igmp join-group 225.5.5.5

ng R1 ping n 2 IP ny, phi c reply

Cu hnh y : Router 1: enable config t ! hostname R1 ! ip multicast-routing !Enable Multicast Routing ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ip pim sparse-dense-mode !Enable PIM Sparse-Dense-Mode ! interface Serial0/0 ip address 192.168.1.1 255.255.255.0 ip pim sparse-dense-mode !Enable PIM Sparse-Dense-Mode clockrate 64000 ! router ospf 1 router-id 1.1.1.1 network 0.0.0.0 255.255.255.255 area 0

! ip pim rp-address 2.2.2.2 !RP l IP address Loopback0 ca R2 ! End

Router 2: enable config t ! hostname R2 ! ip multicast-routing ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 ip pim sparse-dense-mode ! interface Ethernet0/0 ip address 192.168.3.2 255.255.255.0 ip pim sparse-dense-mode ! interface Serial0/0 ip address 192.168.1.2 255.255.255.0

ip pim sparse-dense-mode clockrate 64000 ! interface Serial0/1 ip address 192.168.2.2 255.255.255.0 ip pim sparse-dense-mode clockrate 64000 ! router ospf 1 router-id 2.2.2.2 network 0.0.0.0 255.255.255.255 area 0 ! ip pim rp-address 2.2.2.2 !RP l IP address Loopback0 ca R2

! End

Router 3: enable config t ! hostname R3

! ip multicast-routing ! interface Loopback0 ip address 3.3.3.3 255.255.255.0 ip pim sparse-dense-mode ip igmp join-group 224.4.4.4 ! interface Serial0/0 ip address 192.168.2.3 255.255.255.0 ip pim sparse-dense-mode clockrate 64000 ! interface Serial0/1 ip address 192.168.4.3 255.255.255.0 ip pim sparse-dense-mode clockrate 64000 ! router ospf 1 router-id 3.3.3.3 network 0.0.0.0 255.255.255.255 area 0 ! ip pim rp-address 2.2.2.2 !RP l IP address Loopback0 ca R2

! End

Router 4: enable config t ! hostname R4 ! ip multicast-routing ! interface Loopback0 ip address 4.4.4.4 255.255.255.0 ip pim sparse-dense-mode ip igmp join-group 225.5.5.5 ! interface Ethernet0/0 ip address 192.168.3.4 255.255.255.0 ip pim sparse-dense-mode ! interface Serial0/0 ip address 192.168.4.4 255.255.255.0 ip pim sparse-dense-mode

clockrate 64000 ! router ospf 1 router-id 4.4.4.4 network 0.0.0.0 255.255.255.255 area 0 ! ip pim rp-address 2.2.2.2 !RP l IP address Loopback0 ca R2 ! End

Kim tra PIM: R1#sh ip pim neighbor PIM Neighbor Table Neighbor Interface Uptime/Expires Ver DR Address Priority/Mode 192.168.1.2 Serial0/0 01:42:57/00:01:28 v2 1 / B S (R1 c 1 neighbor l R2)

R2#sh ip pim neighbor PIM Neighbor Table Neighbor Interface Uptime/Expires Ver DR Address Priority/Mode 192.168.3.4 Ethernet0/0 01:41:41/00:01:43 v2 N / DR

192.168.1.1 Serial0/0 01:43:12/00:01:43 v2 1 / B S 192.168.2.3 Serial0/1 01:42:15/00:01:32 v2 1 / S (R2 c 3 neighbor l R1, R3, R4)

R3#sh ip pim neighbor PIM Neighbor Table Neighbor Interface Uptime/Expires Ver DR Address Prio/Mode 192.168.2.2 Serial0/0 01:42:52/00:01:33 v2 1 / S 192.168.4.4 Serial0/1 01:42:21/00:01:34 v2 N / (R3 c 2 neighbor l R2, R4)

R4#sh ip pim neighbor PIM Neighbor Table Neighbor Address Interface Uptime Expires Ver Mode 192.168.3.2 Ethernet0/0 01:43:28 00:01:27 v2 192.168.4.3 Serial0/0 01:43:31 00:01:34 v2 (R4 c 2 neighbor l R2, R3)

Kim Tra RP Mapping trn Router 1: R1#sh ip pim rp mapping PIM Group-to-RP Mappings Group(s): 224.0.0.0/4, Static Static RP, RP l Loopback0 ca R2

RP: 2.2.2.2 (?)

Kim Tra RP Mapping trn Router 2: R2#sh ip pim rp mapping PIM Group-to-RP Mappings Group(s): 224.0.0.0/4, Static Static RP, RP l Loopback0 ca R2 RP: 2.2.2.2 (?)

Kim Tra RP Mapping trn Router 3: R3#sh ip pim rp mapping PIM Group-to-RP Mappings Group(s): 224.0.0.0/4, Static Static RP, RP l Loopback0 ca R2 RP: 2.2.2.2 (?)

Kim Tra RP Mapping trn Router 4: R4#sh ip pim rp mapping PIM Group-to-RP Mappings Group(s): 224.0.0.0/4, Static Static RP, RP l Loopback0 ca R2 RP: 2.2.2.2 (?)

Kim Tra Multicast Routing Table ca R2 (Rendezvous Point): R2#sh ip mroute

IP Multicast Routing Table Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, L - Local, P - Pruned, R - RP-bit set, F - Register flag, T - SPT-bit set, J - Join SPT, M - MSDP created entry, X - Proxy Join Timer Running, A - Advertised via MSDP, U - URD, I - Received Source Specific Host Report Outgoing interface flags: H - Hardware switched Timers: Uptime/Expires Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 224.0.1.40), 01:54:53/00:00:00, RP 2.2.2.2, flags: SJCL Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: Ethernet0/0, Forward/Sparse-Dense, 00:24:09/00:02:53 Serial0/1, Forward/Sparse-Dense, 00:30:01/00:03:03 Serial0/0, Forward/Sparse-Dense, 00:30:13/00:02:45 Loopback0, Forward/Sparse-Dense, 01:54:53/00:02:36

(*, 225.5.5.5), 00:26:35/00:02:32, RP 2.2.2.2, flags: S tt c Group hot ng theo PIM Sparse-Mode Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: Ethernet0/0, Forward/Sparse-Dense, 00:24:09/00:02:32

(*, 224.4.4.4), 00:30:02/00:03:05, RP 2.2.2.2, flags: S tt c Group hot ng theo PIM Sparse-Mode Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: Serial0/1, Forward/Sparse-Dense, 00:30:02/00:03:05

Ping t R1 n 2 Group: 224.4.4.4 v 225.5.5.5 v debug ip pim: R1#debug ip pim R1#ping 224.4.4.4 Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 224.4.4.4, timeout is 2 seconds: 02:42:46: PIM: Check RP 2.2.2.2 into the (*, 224.4.4.4) entry Kim tra RP cho group 224.4.4.4 02:42:46: PIM: Send v2 Register to 2.2.2.2 for 1.1.1.1, group 224.4.4.4 gi Register message ng k vi RP source s send multicast l 1.1.1.1 v send n group 224.4.4.4 02:42:46: PIM: Received v2 Register-Stop on Serial0/0 from 2.2.2.2

02:42:46: PIM: for source 1.1.1.1, group 224.4.4.4 R2 join vo group 224.4.4.4 nn send ngc li Register-stop message cho R1 02:42:46: PIM: Clear register flag to 2.2.2.2 for (1.1.1.1/32, 224.4.4.4) Reply to request 0 from 192.168.2.3, 81 ms nhn c ping reply 02:42:48: PIM: Received v2 Hello on Serial0/0 from 192.168.1.2 nhn c PIM Hello message t R2 02:42:48: PIM: Send v2 Hello on Serial0/0 gi PIM hello message cho R2 02:43:05: PIM: Send v2 Hello on Loopback0 02:43:05: PIM: Received v2 Hello on Loopback0 from 1.1.1.1 02:43:10: PIM: Received v2 Join/Prune on Serial0/0 from 192.168.1.2, to us R1 nhn c t R2 PIM join message Group 224.4.4.4 02:43:10: PIM: Join-list: (1.1.1.1/32, 224.4.4.4), S-bit set 02:43:10: PIM: Add Serial0/0/192.168.1.2 to (1.1.1.1/32, 224.4.4.4), Forward state R1 thm Interface Serial0/0 vo outgoing interface list, vi source send multicast l 1.1.1.1 destination l group 224.4.4.4 02:43:10: PIM: Join-list: (192.168.1.1/32, 224.4.4.4), S-bit set

También podría gustarte