組播中如何把廣播流量轉爲組播流量

ip multicast helper-map
To allow IP multicast routing in a multicast-capable internetwork between two broadcast-only internetworks, use the ip multicast helper-map command in interface configuration mode. To disable this function, use the no form of this command.
ip multicast helper-map {group-address broadcast-address | broadcast multicast-address} access-list [ttl remapping-value]
no ip multicast helper-map {group-address broadcast-address | broadcast multicast-address} access-list [ttl remapping-value]
Usage Guidelines
When a multicast-capable internetwork is between two broadcast-only internetworks, you can convert broadcast traffic to multicast at the first hop router, and convert it back to broadcast at the last hop router before delivering the packets to the broadcast clients. However, broadcast packets with the IP source address of 0.0.0.0 (such as a Dynamic Host Configuration Protocol [DHCP] request) will not be translated to any multicast group. Thus, you can take advantage of the multicast capability of the intermediate multicast internetwork. This feature prevents unnecessary replication at the intermediate routers and allows multicast fast switching in the multicast internetwork.
If you need to send a directed broadcast to the subnet, the outgoing interface of the last hop router can be configured with an IP broadcast address of x.x.x.255, where x.x.x.0 is the subnet that you are trying to reach; otherwise, the packet will be converted to 255.255.255.255.
By default, many broadcast applications use a default TTL value of 1. Because the helper-map applies the decremented TTL value of the incoming broadcast packet for the generated multicast packet, and most broadcast applications use a TTL value of 1 hop, broadcast packets may not be translated to multicast packets, and thus, may be dropped rather than forwarded. To circumvent this potential issue, you can manually configure the TTL value for broadcast packets being translated into multicast packets using the ttl keyword and remapping-value argument. For the remapping-value argument, specify a value that will enable the translated packets to reach multicast receivers.
Examples
The following example shows how to allow IP multicast routing in a multicast-capable internetwork between two broadcast-only internetworks.
In this example, assume that a server on the LAN connected to the Ethernet interface 0 of the first hop router is sending a UDP broadcast stream with a source address of 126.1.22.199 and a destination address of 126.1.22.255:4000. Based on that scenario, the configuration on the first hop router converts the broadcast stream arriving at incoming Ethernet interface 0 destined for UDP port 4000 to a multicast stream. The access list permits traffic being sent from the server at 126.1.22.199 being sent to 126.1.22.255:4000. The traffic is sent to group address 239.254.2.5. The ip forward-protocol command specifies the forwarding of broadcast messages destined for UDP port 4000.
The second configuration on the last hop router converts the multicast stream arriving at incoming Ethernet interface 1 back to broadcast at outgoing Ethernet interface 2. Again, not all multicast traffic emerging from the multicast cloud should be converted from multicast to broadcast, only the traffic destined for 126.1.22.255:4000.
The configurations for the first and last hop routers are as follows:
First Hop Router Configuration
interface ethernet 0
ip address 126.1.22.1 255.255.255.0
ip pim sparse-mode
ip multicast helper-map broadcast 239.254.2.5 105
access-list 105 permit udp host 126.1.22.199 host 126.1.22.255 eq 4000
ip forward-protocol udp 4000
Last Hop Router Configuration
interface ethernet 1
ip address 126.1.26.1 255.255.255.0
ip pim sparse-mode
ip multicast helper-map 239.254.2.5 126.1.28.255 105
interface ethernet 2
ip address 126.1.28.1 255.255.255.0
ip directed-broadcast
access-list 105 permit udp host 126.1.22.199 any eq 4000
ip forward-protocol udp 4000
Related Commands

Command
Description
ip directed-broadcast
Enables the translation of directed broadcast to physical broadcasts.
ip forward-protocol
Specifies which protocols and ports the router forwards when forwarding broadcast packets.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章