Converting Broadcasts to Multicasts

Converting Broadcasts to Multicasts

Problem

You accept a broadcast-based appliance that you appetite to amusement as multicast so that it can cantankerous the network.

Solution

Cisco has a appropriate affection alleged an IP Multicast Helper, which you can use to catechumen advertisement packets to multicast packets. Again you can use PIM to accelerate these packets throughout the network. At the last-hop routers you can again catechumen the multicast packets aback to broadcast. This is advantageous for earlier broadcast-based applications that do not abutment multicast transmission.

Router1 is the first-hop router, or the one abutting to the advertisement source, which is on the interface FastEthernet0/0. It converts advertisement packets with UDP anchorage 3535 accustomed on this interface into multicast packets in accumulation 239.3.5.35:

Router1#configure terminal

Enter agreement commands, one per line. End with CNTL/Z.

Router1(config)#ip multicast-routing

Router1(config)#access-list 115 admittance any any udp 3535

Router1(config)#access-list 115 abjure any any udp

Router1(config)#interface FastEthernet0/0

Router1(config-if)#ip directed broadcast

Router1(config-if)#ip multicast helper-map advertisement 239.3.5.35 115

Router1(config-if)#exit

Router1(config)#ip pim sparse-dense-mode

Router1(config)#ip forward-protocol udp 3535

Router1(config)#end

Router1#

The last-hop router's agreement is similar, except that it charge be configured to about-face multicast packets for this accumulation aback into broadcasts:

Router2#configure terminal

Enter agreement commands, one per line. End with CNTL/Z.

Router2(config)#ip multicast-routing

Router2(config)#access-list 115 admittance any any udp 3535

Router2(config)#access-list 115 abjure any any udp

Router2(config)#interface Ethernet0

Router2(config-if)#ip abode 192.168.9.1 255.255.255.0

Router2(config-if)#ip directed broadcast

Router2(config-if)#ip multicast helper-map 239.3.5.35 192.168.9.255 115

Router2(config-if)#ip pim sparse-dense-mode

Router2(config-if)#exit

Router2(config)#ip igmp join-group 239.3.5.35

Router2(config)#ip forward-protocol udp 3535

Router2(config)#end

Router2#

Discussion

Before answer this compound in any detail, we would like to accent that the multicast abettor affection should be acclimated alone as a acting admeasurement until a able multicast appliance can be found. It tends to absorb a lot of the router's CPU resources. And it can be difficult to troubleshoot appliance problems if the router is afterlight all of the packets. It is consistently bigger to use a built-in multicast appliance if possible.

The best important curve in this archetype are the ip multicast helper-map commands that are activated on the two routers. The command on Router A converts advertisement to multicasts with a accumulation abode of 239.3.5.35:

Router1(config-if)#ip multicast helper-map advertisement 239.3.5.35 115

Then Router B converts this accumulation to the arrangement advertisement abode 192.168.9.255 of the destination network:

Router2(config-if)#ip multicast helper-map 239.3.5.35 192.168.9.255 115

End accessories on the destination arrangement can now accept the advertisement as if a accessory on this aforementioned articulation had beatific it.

This archetype doesn't catechumen all broadcasts accustomed on the Fast Ethernet anchorage of Router1 to multicasts. It aboriginal applies the access-list cardinal 115 to broadcasts that it receives. This picks out a distinct UDP port, cardinal 3535, for conversion. If you capital to catechumen added broadcasts accustomed on this anchorage as well, it is artlessly a amount of aperture up this access-list.

There are three added commands in these agreement examples that are analytical to the advertisement multicast about-face alive properly. Aboriginal is the ip forward-protocol command. The multicast about-face action is done in the router's CPU, so it cannot be fast switched. By default, the router will avoid all broadcasts except for a few important UDP ports such as NetBIOS. So this command armament the routers to see the advertisement packets so that it can adjudge whether to action them.

Second, and accompanying to this, is the ip directed-broadcast command. A directed advertisement is one that is beatific to a accurate arrangement or accumulation of networks. So, for example, Router2 in the compound turns the multicast packet into the directed advertisement with an abode of 192.168.9.255. By default, a Cisco router will bead all admission directed broadcasts. So this needs to be enabled on both routers. We agenda in passing, however, that this command can be alarming on accessible arrangement segments. There are several acclaimed abnegation of account attacks, best conspicuously the smurf and fraggle attacks, that booty advantage of directed broadcasts.

And, finally, we accept included a changeless IGMP Accompany on the destination interface. Recall that in Compound 23.9 we acclimated this command back the accessories on this interface crave a accumulation but don't apparatus IGMP properly. In this case, the accessories on the articulation don't alike apperceive that there is a multicast accumulation to join. So we can use this command to ensure that this router receives the group. Otherwise, the multicast packets will never ability Router2.

You should be accurate back appliance multicast abettor commands in a arrangement that uses TTL scoping. Cisco doesn't accommodate a way to acclimatize the antecedent TTL ambience on these multicast packets. So you may charge to set up address-based boundaries as in Compound 23.15 to anticipate these bogus multicasts from aperture out of the network.

One aftermost point on the accountable of advertisement to multicast about-face ability be advantageous in some attenuate cases. If you accept an appliance that is able of sending multicasts but end accessories that can alone accept broadcasts, you ability be able to use alone the last-hop (Router2) agreement to get the packets to the accepting devices. Similarly, if you had a server that can alone advertisement but end accessories that accept multicasts, you could conceivably use aloof the first-hop (Router1) configuration. However, it is absurd that you will appointment such aberrant applications in any assembly network.

See also