Security and Technology Ramblings…

Under the “there is a first time for everything” theory, the other day I needed to convert a unicast UDP MPEG2 video stream to multicast. Here’s a quick sample on how to do it on a Cisco Router.

In the below example, I’ve got an inbound UDP unicast stream hitting 10.1.4.14 and use a static NAT to convert it to a multicast destination of 233.0.0.1.

Let me know if you have any thoughts or comments….


!
hostname samplerouterconfig
ip multicast-routing 
!
interface FastEthernet0/0
 description External Interface Receiving Unicast 
 ip address 10.1.4.12 255.255.254.0
 ip pim dense-mode
 ip nat outside
!
interface FastEthernet0/1
 description Internal Interface Replicating Multicast
 ip address 10.1.200.1 255.255.255.0
 ip pim dense-mode
 ip nat inside
 ip igmp static-group 233.0.0.1
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 10.1.4.1
!
!
ip nat inside source static 233.0.0.1 10.1.4.14
!
end

One Response to Converting a UDP unicast video stream to multicast…

  • Came across this while trying to get DNAT rule working in iptables for similar purpose. That was after trying to use multicast helper with Cisco and several other things like TTL rewriting, etc. Each thing had some gotcha or other and I thought I would have to admit to defeat. I needed something that would allow several multicast streams to hit the clients across a non-multicast routed area I had no control over. This works like a champ. Thanks very much for sharing. Not sure why it didn’t occur to me when I was trying every other Cisco thing I could think of, but that’s why it’s such a neat idea. Still not sure why iptables isn’t working, but this allows for one less device in my path. All good! Multicast helper works fine also for one stream, but this appeals to me more as it is simpler and you can look at your ip nat translations easier than you can figure out what’s going on with looking at hits on a ACL for the other way. Also, once the NAT is up, you don’t have to keep traversing the ACL, so I’d bet this is more efficient/faster/less processor intensive, too. JunOS looks to handle it better also and you can write C to do the configurations. Just thinking out loud. I was stressing over this issue for many hours, so again, my deepest thanks.

Leave a Reply