Pages

Friday, March 1, 2013

Converting Multicast to Unicast

In my previous blogtorial "Converting unicast to multicast" we discussed how to convert unicast to multicast and what the benefits are. Suppose that for one reason or another we had to convert from multicast to unicast -- how would we go about doing that? Well in this blogtorial we'll do just that.

Let's get started.


In this scenario, R2 will convert multicast coming in on Fast1/0 and convert it to unicast on Fast1/1.

Complete configs can be found here.

First, let's get all the interfaces configured, pim enabled, and routing.

 !  
 hostname R1  
 !  
 ip multicast-routing   
 !  
 interface FastEthernet1/0  
  description Connected to R2  
  ip address 1.1.1.1 255.255.255.0  
  ip pim sparse-mode  
  duplex auto  
  speed auto  
 !  
 ip route 0.0.0.0 0.0.0.0 1.1.1.2  

 !  
 hostname R2  
 !  
 ip multicast-routing   
 !  
 interface Vif1  
  ip address 10.1.1.1 255.255.255.0   
  ip service reflect FastEthernet1/0 destination 239.1.1.1 to 22.22.22.3 mask-len 24 source 10.1.1.2  
  ip pim sparse-mode  
  ip igmp static-group 239.1.1.1  
 !  
 interface FastEthernet1/0  
  description Connected to R1  
  ip address 1.1.1.2 255.255.255.0  
  ip pim sparse-mode  
  duplex auto  
  speed auto  
 !  
 interface FastEthernet1/1  
  description Connected to R3  
  ip address 2.2.2.2 255.255.255.0    
  duplex auto  
  speed auto  
 !  
 ip route 22.22.22.0 255.255.255.0 2.2.2.3  
 !  
 ip pim rp-address 2.2.2.2 multi-to-uni-group override  
 !  
 ip access-list standard multi-to-uni-group  
  permit 239.1.1.1  
 !  

Once the reflection is configured on Vif1, any traffic destined to the multicast group 239.1.1.1 will be translated as unicast to 22.22.22.3 with a source address of 10.1.1.2.

Let's ping 239.1.1.1 from R1 so we can mimic some multicast traffic and watch debug on R2 and wireshark from R2 Fast1/0 perspective.

 R2#debug ip packet  
 IP packet debugging is on  
 R2#  
 *Feb 27 08:15:29.643: CEF: Try to CEF switch 239.1.1.1 from FastEthernet1/0  
 *Feb 27 08:15:29.651: IP: tableid=0, s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), routed via RIB  
 *Feb 27 08:15:29.655: IP: s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), g=2.2.2.3, len 100, forward  
 *Feb 27 08:15:29.663: IP: tableid=0, s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), routed via RIB  
 *Feb 27 08:15:29.667: IP: s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), g=2.2.2.3, len 100, forward  
 R2#  
 *Feb 27 08:15:31.663: CEF: Try to CEF switch 239.1.1.1 from FastEthernet1/0  
 *Feb 27 08:15:31.667: IP: tableid=0, s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), routed via RIB  
 *Feb 27 08:15:31.671: IP: s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), g=2.2.2.3, len 100, forward  
 *Feb 27 08:15:31.679: IP: tableid=0, s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), routed via RIB  
 *Feb 27 08:15:31.683: IP: s=10.1.1.2 (Vif1), d=22.22.22.1 (FastEthernet1/1), g=2.2.2.3, len 100, forward  


As you can see the ping to 239.1.1.1 are getting sent to 22.22.22.3 from 10.1.1.2.

Many more articles to come so stay tuned.

Please subscribe/comment/+1 if you like my posts as it keeps me motivated to write more and spread the knowledge.

Have you ever deployed this feature before? Are you plan on deploying it somewhere? If so, where?

8 comments:

  1. i will tray it in packet and say if it's work *****thanks for the information******

    ReplyDelete
  2. I cannot remember if packet tracer allows these advanced features, but your best simulation tool is going to be GNS3. Please let me know if you need any help setting up GNS3 or any information about it.

    ReplyDelete
  3. looking at your capture, why is the destination 22.22.22.1? you say the ping to 239.1.1.1 are getting sent to 22.22.22.3 from 10.1.1.2. can you clarify?

    ReplyDelete
    Replies
    1. Good catch .. this is because i mistyped 22.22.22.3 in the blog ... the actual command was set to 22.22.22.1 ..

      This is what I have on the router.

      ip service reflect FastEthernet1/0 destination 239.1.1.1 to 22.22.22.1 mask-len 24 source 10.1.1.2

      Delete
    2. Thanks, but could you retry on your end with .3 again? we are conducting the same same test and are getting the same result.

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Ok iam trying it again. Update shortly.

    ReplyDelete