burningnode.com
Random networking related stuff.

Simple Inter-VLAN multicast routing with PIM-DM


I encountered the following case at work where we need to enable basic multicast connectivity between two subnets in a few branch offices.
This was required for iDevices to work with printers.

The setup in branch offices is quite simple, inter-VLAN routing is achieved on a router or L3-switch.
In that case, it was a router on-a-stick topology.

In order to enable multicast connectivity without extensive configuration I activated multicast routing and PIM-DM.

ip multicast-routing
!
!
interface Ethernet0/0.10
 encapsulation dot1Q 10
 ip address 10.10.1.1 255.255.255.0
 ip pim dense-mode
!
interface Ethernet0/0.20
 encapsulation dot1Q 20
 ip address 10.10.2.1 255.255.255.0
 ip pim dense-mode

The advantage with PIM dense mode is that it floods the network and does not require any RP (rendezvous point).
This simplifies the setup without having any important impact on small network like this.

In my lab, I simulated a recipient with the command:

ip multicast-routing
!
!
interface Ethernet0/2
 ip address 10.10.2.3 255.255.255.0
 ip igmp join-group 239.1.1.1
R1#sh ip igmp groups
IGMP Connected Group Membership
Group Address    Interface                Uptime    Expires   Last Reporter   Group Accounted
239.1.1.1        Ethernet0/0.20           00:02:23  00:02:28  10.10.2.3
224.0.1.40       Ethernet0/0.10           00:03:33  00:02:30  10.10.1.1

The results of show ip mroute indicates

R1#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, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 239.1.1.1), 00:03:10/00:02:48, RP 0.0.0.0, flags: DC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Ethernet0/0.20, Forward/Dense, 00:03:10/stopped

(*, 224.0.1.40), 00:04:20/00:02:43, RP 0.0.0.0, flags: DCL
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Ethernet0/0.10, Forward/Dense, 00:04:20/stopped

The 224.0.1.40 is the Cisco Auto-RP multicast address. Auto-RP basically use dense mode to distribute the PIM-SM rendezvous point throughout a network. This behavior can be changed!

We can check with a ping from a client in another VLAN (vlan 10)

R2#ping 239.1.1.1 repeat 10
Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:
.
Reply to request 1 from 10.10.2.3, 1 ms
Reply to request 2 from 10.10.2.3, 1 ms
Reply to request 3 from 10.10.2.3, 1 ms
Reply to request 4 from 10.10.2.3, 1 ms
Reply to request 5 from 10.10.2.3, 1 ms
Reply to request 6 from 10.10.2.3, 1 ms
Reply to request 7 from 10.10.2.3, 1 ms
Reply to request 8 from 10.10.2.3, 1 ms
Reply to request 9 from 10.10.2.3, 2 ms

On R1 we now see the source tree (S,G)

R1#sh ip mroute 239.1.1.1
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, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 239.1.1.1), 00:12:29/stopped, RP 0.0.0.0, flags: DC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Ethernet0/0.20, Forward/Dense, 00:12:29/stopped

(10.10.1.2, 239.1.1.1), 00:02:37/00:00:22, flags: T
  Incoming interface: Ethernet0/0.10, RPF nbr 0.0.0.0
  Outgoing interface list:
    Ethernet0/0.20, Forward/Dense, 00:02:37/stopped

All good.