Advanced Multicast: PIM-SM Experimental Configuration

experimental topology

Experimental requirements

  • The network topology and IP address planning are shown in the figure above;
  • R1, R2, R3, and R4 run the OSPF protocol to open up the unicast routing of the network;
  • R1, R2, R3, and R4 are also multicast routers running PIM-SM;
  • R3 is the RP, configure Loopback0, and the IP address is 3.3.3.3, which is used as the address of the RP;
  • The receiver joins the multicast group 224.1.1.1; observe the construction of RPT;
  • Set the RPT-SPT switchover on R4 to never switch, and at the same time start sending multicast data from the source, and observe the registration process of the source, the establishment process of the SPT from the RP to the source, and the process of the multicast traffic going down the RPT.
  • On R4, restore the RPT-SPT switchover to the default value, and at the same time slightly increase the OSPF Cost value of GE0/0/1 port of R4, and observe the switchover process from RPT to SPT.
  • This experiment can be completed using Huawei's self-developed simulator eNSP.

Experimental steps and configuration

R1, R2, R3 and R4 complete the interface IP address configuration and run OSPF.

The basic configuration of R1 is as follows:

[R1] interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0] ip address 10.1.12.1 24
[R1] interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1] ip address 10.1.14.1 24
[R1] ospf 1 router-id 1.1.1.1
[R1-ospf-1] area 0
[R1-ospf-1-area-0.0.0.0] network 10.1.12.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0] network 10.1.14.1 0.0.0.0

The basic configuration of R2 is as follows:

[R2] interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0] ip address 10.1.12.2 24
[R2] interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1] ip address 10.1.23.2 24
[R2] interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2] ip address 10.10.10 24
[R2] ospf 1 router-id 2.2.2.2
[R2-ospf-1] area 0
[R2-ospf-1-area-0.0.0.0] network 10.1.12.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0] network 10.1.23.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0] network 10.10.10.254 0.0.0.0
[R2-ospf-1-area-0.0.0.0] quit
[R2-ospf-1] silent-interface GigabitEthernet0/0/2

The basic configuration of R3 is as follows:

[R3] interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0] ip address 10.1.23.3 24
[R3] interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1] ip address 10.1.34.3 24
[R3] interface loopback 0
[R3-loopback0] ip address 3.3.3.3 255.255.255.255  #该地址作为RP的地址
[R3] ospf 1 router-id 3.3.3.3
[R3-ospf-1] area 0
[R3-ospf-1-area-0.0.0.0] network 10.1.23.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0] network 10.1.34.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

The basic configuration of R4 is as follows:

[R4] interface GigabitEthernet0/0/0
[R4-GigabitEthernet0/0/0] ip address 10.1.14.4 255.255.255.0
[R4] interface GigabitEthernet0/0/1
[R4-GigabitEthernet0/0/1] ip address 10.1.34.4 255.255.255.0
[R4] interface GigabitEthernet0/0/2
[R4-GigabitEthernet0/0/2] ip address 10.1.1.254 255.255.255.0
[R4] ospf 1 router-id 4.4.4.4
[R4-ospf-1] area 0
[R4-ospf-1-area-0.0.0.0] network 10.1.14.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0] network 10.1.34.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0] network 1.1.1.254 0.0.0.0
[R4-ospf-1-area-0.0.0.0] quit
[R4-ospf-1] silent-interface GigabitEthernet0/0/2

R1, R2, R3, and R4 deploy PIM-SM

The configuration of R1 is as follows:

[R1] multicast routing-enable
[R1] interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0] pim sm  #在接口上激活PIM-SM
[R1] interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1] pim sm  #在接口上激活PIM-SM
[R1] pim
[R1-pim] static-rp 3.3.3.3 #设置静态RP地址3.3.3.3

The configuration of R2 is as follows:

[R2] multicast routing-enable
[R2] interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0] pim sm 
[R2] interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1] pim sm
[R2] interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2] pim sm 
[R2] pim
[R2-pim] static-rp 3.3.3.3

The configuration of R3 is as follows:

[R3] multicast routing-enable
[R3] interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0] pim sm
[R3] interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1] pim sm 
[R3] interface loopback0
[R3-loopback0] pim sm
[R3] pim
[R3-pim] static-rp 3.3.3.3

The configuration of R4 is as follows:

[R4] multicast routing-enable
[R4] interface GigabitEthernet0/0/0
[R4-GigabitEthernet0/0/0] pim sm 
[R4] interface GigabitEthernet0/0/1
[R4-GigabitEthernet0/0/1] pim sm
[R4] interface GigabitEthernet0/0/2
[R4-GigabitEthernet0/0/2] igmp enable #连接组播接收者的接口激活IGMP
[R4] pim
[R4-pim] static-rp 3.3.3.3

After completing the configuration, do a preliminary verification first:

<R4>display pim neighbor
VPN-Instance: public net
Total Number of Neighbors = 2
Neighbor Interface Uptime Expires Dr-Priority BFD-Session
10.1.14.1 GE0/0/0 00:53:40 00:01:24 1 N
10.1.34.3 GE0/0/1 00:53:39 00:01:37 1 N

The output above is the PIM neighbor table of R4. You can see that R4 has discovered two PIM neighbors. Do corresponding checks on other routers to ensure that PIM neighbors are completely discovered.

<R4>display pim rp-info
VPN-Instance: public net
PIM SM static RP Number:1
Static RP: 3.3.3.3

The above output checks the PIM RP information of R4. We manually informed R4 of the RP address, 3.3.3.3, which is actually R3.

Multicast users join the group 224.1.1.1, and view the RPT establishment process

Now the multicast receiver PC joins the group 224.1.1.1 (for the specific operation method, please refer to the PIM-DM experiment section of this manual, which is described in detail), which will trigger the PC to send an IGMP membership report, and R4 will be the last hop router from When GE0/0/2 receives this report, it knows that there are members of the multicast group 224.1.1.1 under this interface, and it will create a (*, 224.1.1.1) multicast routing table entry:

<R4>display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 0 (S, G) entry
(*, 224.1.1.1)
RP: 3.3.3.3
Protocol: pim-sm, Flag: WC EXT
UpTime: 00:00:04
Upstream interface: GigabitEthernet0/0/1
Upstream neighbor: 10.1.34.3
RPF prime neighbor: 10.1.34.3
Downstream interface(s) information: None

Then R4 sends a (*,G) PIM Join message to the RPF uplink interface, requesting to join the shared tree RPT. How does R4 determine which interface is the RPF uplink interface? R4 judges through the unicast routing table. For RPT, the PIM router is facing the RP when doing the RPF check. Therefore, R4 looks up the route to RP3.3.3.3 in the unicast routing table, and selects the outgoing interface of the route as the RPF Interface, but here because the interface COST of the entire network is the default value, so the OSPF route on R4 about 3.3.3.3 has an equivalent load balance on R1 and R3. At this time, R4 will choose the one with the larger interface IP among R1 and R3 as the The primary neighbor of RPF is R3, so GE0/0/1 of R4 becomes the RPF interface. This matches the output above.

After R3 receives the PIM Join message sent by R4, it will create a (*, 224.1.1.1) entry and add the interface GE0/0/1 that received the message to the list of downlink interfaces. RP, so a branch of the shared tree is established.

<R3>display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 0 (S, G) entry
(*, 224.1.1.1)
RP: 3.3.3.3 (local)
Protocol: pim-sm, Flag: WC
UpTime: 00:00:09
Upstream interface: Register
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1  #下行接口列表
1: GigabitEthernet0/0/1
Protocol: pim-sm, UpTime: 00:00:09, Expires: 00:03:21

Source registration, SPT establishment process from RP to source, multicast packet transmission process

Next, let's observe the source registration, the establishment process of the SPT from the RP to the source, and the transmission process of the multicast message. First, set the switch of RPT-SPT on R4 to never switch, because we will pay attention to this feature in the next step, and ignore it here for the time being.

[R4] pim
[R4-pim] spt-switch-threshold infinity

Use the above configuration to set the PIM SPT switchover feature of R4 to never switchover.

Now the multicast source starts to send multicast data to the multicast group 224.1.1.1 (this can be simulated by ping 224.1.1.1). After the multicast data reaches the first-hop router R2, R2 will encapsulate the multicast data in a unicast PIM Register message and send it to the RP, which is R3.

By capturing packets on the GE0/0/1 port of R2, you can see the Register packet, which is a unicast packet, and the destination address is 3.3.3.3. After receiving this packet, R3 decapsulates and finds that it is a multicast data packet of (10.10.10.10, 224.1.1.1), so it creates a (10.10.10.10, 224.1.1.1) entry locally, and at the same time sends the multicast data The packet is transmitted along the RPT first (sent out from the GE0/0/1 port). On the other hand, R3 immediately sends a PIM Join message of (10.10.10.10, 224.1.1.1) to the source (it also uses the unicast routing table to find the route of 10.10.10.10 to obtain the RPF interface), trying to connect itself with A source tree SPT is established between the sources.

<R3>display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 224.1.1.1)
RP: 3.3.3.3 (local)
Protocol: pim-sm, Flag: WC
UpTime: 00:02:57
Upstream interface: Register
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet0/0/1
Protocol: pim-sm, UpTime: 00:02:57, Expires: 00:02:33

(10.10.10.10, 224.1.1.1)
RP: 3.3.3.3 (local)
Protocol: pim-sm, Flag: SPT 2MSDP ACT
UpTime: 00:00:22
Upstream interface: GigabitEthernet0/0/0
Upstream neighbor: 10.1.23.2
RPF prime neighbor: 10.1.23.2
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet0/0/1
Protocol: pim-sm, UpTime: 00:00:22, Expires: -

After receiving the Join message, R2 adds GE0/0/1 to the downlink interface list of the (10.10.10.10, 224.1.1.1) multicast entry, and then forwards the multicast traffic to the RP along the established SPT , instead of encapsulating multicast traffic into Register packets.

<R2>dis pim routing-table
VPN-Instance: public net
Total 0 (*, G) entry; 1 (S, G) entry
(10.10.10.10, 224.1.1.1)
RP: 3.3.3.3
Protocol: pim-sm, Flag: SPT LOC ACT
UpTime: 00:00:41
Upstream interface: GigabitEthernet0/0/2
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 2
1: GigabitEthernet0/0/1
Protocol: pim-sm, UpTime: 00:00:41, Expires: 00:02:49
2: Register
Protocol: pim-sm, UpTime: 00:00:41, Expires: -

SPT switching process

Now, remove the previously configured SPT switching configuration on R4 (undo spt-switch-threshold). By default, R4 acts as the last hop router, as soon as it receives a multicast data packet from 224.1.1.1, it will immediately switch over the SPT. Then slightly increase the OSPF Cost of the GE0/0/1 port of R4 to 2 (the default is 1). We use this action to simulate the fact that "R4 is closer to the source from R1 than to the source from R3." ".

Now, when R4 receives the first 224.1.1.1 multicast packet from GE0/0/1, it will start the SPT switching mechanism and send (10.10.10.10, 224.1. 1.1) PIM Join message, requesting to join SPT.

After receiving the Join message, R1 creates an entry (10.10.10.10, 224.1.1.1), adds GE0/0/1 to the downlink interface list, and sends a Join message to R2. After receiving the Join message, R2 adds its GE0/0/0 interface to the downlink interface list of the (10.10.10.10, 224.1.1.1) entry, and starts to transmit multicast data to GE0/0/0.

<R2>display multicast routing-table
Multicast routing table of VPN-Instance: public net
Total 1 entry
00001. (10.10.10.10, 224.1.1.1)
Uptime: 00:00:05
Upstream Interface: GigabitEthernet0/0/2
List of 3 downstream interfaces
1: GigabitEthernet0/0/0
2: GigabitEthernet0/0/1
3: Register

After this step is completed, the multicast path tree in the network is as follows:

Now R4 will receive two copies of the multicast data from R1 and R3, which is obviously meaningless, so it sends a Prune message to R3 to remove itself from the RPT. After receiving this message, R3 deletes the interface GE0/0/1 from the downlink interface list of the (*, 224.1.1.1) entry, and no longer sends multicast traffic to the GE0/0/1 interface, and then finds that The downstream interface list is empty, so a Prune message is sent to R2, requesting to prune itself from the SPT, since it no longer needs multicast traffic. After receiving the Prune message, R2 deletes GE0/0/1 from the downlink interface list of the entry.

The final multicast entry of R2 is as follows:

<R2>display pim routing-table
VPN-Instance: public net
Total 0 (*, G) entry; 1 (S, G) entry
(10.10.10.10, 224.1.1.1)
RP: 3.3.3.3
Protocol: pim-sm, Flag: SPT LOC ACT
UpTime: 00:00:19
Upstream interface: GigabitEthernet0/0/2
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 2
1: GigabitEthernet0/0/0
Protocol: pim-sm, UpTime: 00:00:19, Expires: 00:03:11
2: Register
Protocol: pim-sm, UpTime: 00:00:19, Expires: -

The multicast path tree is as follows:

Guess you like

Origin blog.csdn.net/weixin_43025343/article/details/132215377