Multicast Over MPLS

Multicast Over MPLS

Problem

You want to pass customer multicast traffic through an MPLS network.

Solution

For this recipe, we must configure Multicast capabilities on all of the different types of routers: C, CE, P, and PE. First, the C and CE routers, which we configure for multicast using exactly the same techniques that we used in Chapter 23:

Router-C-An#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-C-An(config)#ip multicast-routing
Router-C-An(config)#interface FastEthernet0/0
Router-C-An(config-if)#ip address 192.168.5.12 255.255.255.0
Router-C-An(config-if)#ip pim sparse-dense-mode
Router-C-An(config-if)#exit
Router-C-An(config)#end
Router-C-An#

For the CE routers, we need to configure the interfaces that point to both the C and PE routers:

Router-CE-A1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-CE-A1(config)#ip multicast-routing
Router-CE-A1(config)#interface FastEthernet0/0.1
Router-CE-A1(config-subif)#encapsulation dot1Q 101
Router-CE-A1(config-subif)#ip address 192.168.1.5 255.255.255.0
Router-CE-A1(config-subif)#ip pim sparse-dense-mode
Router-CE-A1(config-subif)#exit
Router-CE-A1(config)#interface FastEthernet0/0.2
Router-CE-A1(config-subif)#encapsulation dot1Q 111
Router-CE-A1(config-subif)#ip address 192.168.5.1 255.255.255.0
Router-CE-A1(config-subif)#ip pim sparse-dense-mode
Router-CE-A1(config-subif)#exit
Router-CE-A1(config)#end
Router-CE-A1#

We will configure a static IGMP join-group statement on the Loopback interface of the other CE router to allow us to do a simple multicast connectivity demonstration later:

Router-CE-A2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-CE-A2(config)#ip multicast-routing
Router-CE-A2(config)#interface Loopback0
Router-CE-A2(config-if)#ip address 10.8.8.8 255.255.255.255
Router-CE-A2(config-if)#ip pim sparse-dense-mode
Router-CE-A2(config-if)#ip igmp join-group 239.1.1.1
Router-CE-A2(config-if)#exit
Router-CE-A2(config)#interface Ethernet0
Router-CE-A2(config-if)#ip address 192.168.3.8 255.255.255.0
Router-CE-A2(config-if)#ip pim sparse-dense-mode
Router-CE-A2(config-if)#exit
Router-CE-A2(config)#end
Router-CE-A2#

On the PE routers, we have to configure multicast routing globally for the internal MPLS cloud as well as on each VRF that must support multicasting on the client side. We also need to configure all of the interfaces, including the Loopback interfaces that support MP-BGP, and those that exist within the VRF. Also, we are configuring this particular PE router to be the RP for this VRF. You could just as easily use any of the customer routers for this function, but we do it here to demonstrate the different syntax required:

Router-PE1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-PE1(config)#ip multicast-routing
Router-PE1(config)#interface Loopback0
Router-PE1(config-if)#ip address 10.0.0.2 255.255.255.255
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#exit
Router-PE1(config)#interface Serial0/0
Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#tag-switching ip
Router-PE1(config-if)#exit
Router-PE1(config)#ip multicast-routing vrf NetworkA
Router-PE1(config)#ip vrf NetworkA
Router-PE1(config-vrf)#rd 100:1
Router-PE1(config-vrf)#route-target export 100:1
Router-PE1(config-vrf)#route-target import 100:1
Router-PE1(config-vrf)#mdt default 239.100.100.1
Router-PE1(config-vrf)#exit
Router-PE1(config)#interface Loopback155
Router-PE1(config-if)#ip vrf forwarding NetworkA
Router-PE1(config-if)#ip address 192.168.155.1 255.255.255.255
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#exit
Router-PE1(config)#interface Ethernet0/0
Router-PE1(config-if)#description connection to customer A, site 1
Router-PE1(config-if)#ip vrf forwarding NetworkA
Router-PE1(config-if)#ip address 192.168.1.1 255.255.255.0
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#exit
Router-PE1(config)#ip pim vrf NetworkA send-rp-announce Loopback155 scope 15
Router-PE1(config)#ip pim vrf NetworkA send-rp-discovery Loopback155 scope 15
Router-PE1(config)#end
Router-PE1#

The other PE router is similar to the first one, except that we will omit the RP configuration here. This PE configuration is more typical of situations where some other router, particularly one of the C routers, takes on the RP role. In general, that is the preferred arrangement, as it allows the customers greater control over their internal multicast configurations:

Router-PE2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-PE2(config)#ip multicast-routing
Router-PE2(config)#interface Loopback0
Router-PE2(config-if)#ip address 10.0.0.4 255.255.255.255
Router-PE2(config-if)#ip pim sparse-dense-mode
Router-PE2(config-if)#exit
Router-PE2(config)#interface FastEthernet0/0.1
Router-PE2(config-subif)#encapsulation dot1Q 10
Router-PE2(config-subif)#ip address 10.1.2.4 255.255.255.0
Router-PE2(config-subif)#ip pim sparse-dense-mode
Router-PE2(config-subif)#tag-switching ip
Router-PE2(config-subif)#exit
Router-PE2(config)#ip multicast-routing vrf NetworkA
Router-PE2(config)#ip vrf NetworkA
Router-PE2(config-vrf)#rd 100:1
Router-PE2(config-vrf)#route-target export 100:1
Router-PE2(config-vrf)#route-target import 100:1
Router-PE2(config-vrf)#mdt default 239.100.100.1
Router-PE2(config-vrf)#exit
Router-PE2(config)#interface Loopback155
Router-PE2(config-if)#ip vrf forwarding NetworkA
Router-PE2(config-if)#ip address 192.168.155.2 255.255.255.255
Router-PE2(config-if)#ip pim sparse-dense-mode
Router-PE2(config-if)#exit
Router-PE2(config)#interface FastEthernet0/0.2
Router-PE2(config-subif)#encapsulation dot1Q 102
Router-PE2(config-subif)#ip vrf forwarding NetworkA
Router-PE2(config-subif)#ip address 192.168.3.1 255.255.255.0
Router-PE2(config-subif)#ip pim sparse-dense-mode
Router-PE2(config-subif)#exit
Router-PE2(config)#end
Router-PE2#

The P router's configuration is somewhat simpler because it doesn't need to know about what goes on inside the VRFs:

Router-P1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-P1(config)#ip multicast-routing
Router-P1(config)#interface FastEthernet0/0
Router-P1(config-if)#ip address 10.1.2.11 255.255.255.0
Router-P1(config-if)#ip pim sparse-dense-mode
Router-P1(config-if)#tag-switching ip
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/0
Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252
Router-P1(config-if)#ip pim sparse-dense-mode
Router-P1(config-if)#tag-switching ip
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/1
Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252
Router-P1(config-if)#ip pim sparse-dense-mode
Router-P1(config-if)#tag-switching ip
Router-P1(config-if)#exit
Router-P1(config)#end
Router-P1#

Discussion

For this example, we have configured all of the routers for sparse-dense mode PIM because it is the easiest to configure. We could also have used sparse-mode or bidirectional PIM. Please refer to Chapter 23 for more information on multicast configurations.

In the example, we configured Router-CE-A2 to be a member of the multicast group 239.1.1.1. Chapter 23 shows several more sophisticated methods for monitoring multicast networks, but for our purposes here a simple ping is sufficient to demonstrate basic multicast functionality:

Router-C-An#ping 239.1.1.1

Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 192.168.3.8, 8 ms
Router-C-An#

It is worthwhile examining one of the PE router configurations in more detail, as there are several distinct components.

First, we have to enable basic multicast functionality within the MPLS cloud. This means that we must globally enable multicast routing with the ip multicast-routing command, and then enable PIM on each of the tag-switching interfaces. We have also enabled PIM on the Loopback interface that supports our MP-BGP peer for this router. This is necessary because MP-BGP is used as a transport mechanism for the Multicast Distribution Tree (MDT) protocol:

Router-PE1(config)#ip multicast-routing
Router-PE1(config)#interface Loopback0
Router-PE1(config-if)#ip address 10.0.0.2 255.255.255.255
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#exit
Router-PE1(config)#interface Serial0/0
Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#tag-switching ip
Router-PE1(config-if)#exit

In this case, we have used sparse-dense mode PIM. We could have used sparse mode or bidirectional mode PIM as well, however pure dense mode PIM is not supported within the MPLS cloud. We note in passing, though, that you can use dense-mode PIM on the client side of the network as long as you gateway to one of the supported modes on the CE router.

The next part of the PE configuration enables multicast capabilities for the VRF. Note that we have only enabled multicast routing for NetworkA. The other VRF in this network, NetworkB, is still a pure unicast network:

Router-PE1(config)#ip multicast-routing vrf NetworkA
Router-PE1(config)#interface Loopback155
Router-PE1(config-if)#ip vrf forwarding NetworkA
Router-PE1(config-if)#ip address 192.168.155.1 255.255.255.255
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#exit
Router-PE1(config)#interface Ethernet0/0
Router-PE1(config-if)#description connection to customer A, site 1
Router-PE1(config-if)#ip vrf forwarding NetworkA
Router-PE1(config-if)#ip address 192.168.1.1 255.255.255.0
Router-PE1(config-if)#ip pim sparse-dense-mode
Router-PE1(config-if)#exit

Here we have enabled PIM on every interface that takes part in this VRF, and we have also globally enabled multicast routing for this VRF by using the ip multicast-routing vrf command. Then we have to configure MDT for this VRF:

Router-PE1(config)#ip vrf NetworkA
Router-PE1(config-vrf)#rd 100:1
Router-PE1(config-vrf)#route-target export 100:1
Router-PE1(config-vrf)#route-target import 100:1
Router-PE1(config-vrf)#mdt default 239.100.100.1

This configures MDT to use the multicast group 239.100.100.1 to carry multicast traffic through the MPLS cloud for this particular VRF. This default MDT multicast group is also the group that will be used to carry MDT signaling information for this VRF. All PE routers supporting this VRF are members of this group. And, as we have left the MDT configuration at a single default group like this, all user data will be transmitted through the same group. If there are a lot of different multicast groups in the customer network, and not all PE routers are interested in all groups, you can improve the efficiency by defining a list of Data Multicast Distribution Trees, as follows:

Router-PE1(config)#ip vrf NetworkA
Router-PE1(config-vrf)#rd 100:1
Router-PE1(config-vrf)#route-target export 100:1
Router-PE1(config-vrf)#route-target import 100:1
Router-PE1(config-vrf)#mdt default 239.100.100.1
Router-PE1(config-vrf)#mdt data 239.200.1.0 0.0.0.255 threshold 28

This tells the routers to dynamically spawn new multicast groups from the specified range whenever the amount of multicast traffic on any existing MDT group exceeds the specified threshold. In this example, we have specified the range from 239.200.1.0 tHRough 239.200.1.255, and the threshold for creating new groups is 28 kbps.

Finally, we need an RP somewhere in this VRF. We would usually prefer to configure this functionality on a C router somewhere because it would provide the client with greater control over internal multicast traffic. However, in this example we have configured one of the PE routers as the RP, mostly to show how it can be done:

Router-PE1(config)#ip pim vrf NetworkA send-rp-announce Loopback155 scope 15
Router-PE1(config)#ip pim vrf NetworkA send-rp-discovery Loopback155 scope 15

We show several RP configuration examples in Chapter 23.

See Also