This section provides an example for translating one input multicast stream into two output streams, and a level-2 traffic policy is used to describe the configuration procedure.
On the network shown in Figure 1, after passing through the router, input multicast stream 1 is translated into output multicast streams 1 and 2. The characteristics of output multicast stream 1 remain the same as those of input multicast stream 1, and those of output multicast stream 2 are translated.
Characteristics of Multicast Streams |
Input Multicast Stream 1 |
Output Multicast Stream 1 |
Output Multicast Stream 2 |
---|---|---|---|
Source MAC address |
00e0-fc00-0001 |
00e0-fc00-0001 |
00e0-fc00-0002 NOTE:
By default, the post-translation MAC address is the MAC address of an outbound interface, for example, 00e0-fc00-0002. |
Source IP address |
10.10.10.10 |
10.10.10.10 |
12.12.12.12 |
Destination IP address |
239.0.0.1 |
239.0.0.1 |
239.1.0.2 |
UDP destination port number |
10000 |
10000 |
10002 |
The configuration roadmap is as follows:
Enable multicast NAT globally.
Create a multicast NAT instance.
Configure traffic policies.
Apply the level-1 traffic policy on the inbound interface of multicast streams.
Configure multicast NAT on the outbound interfaces of multicast streams.
Bind the output multicast streams to the multicast NAT instance
<HUAWEI> system-view [~HUAWEI] multicast-nat enable
[~HUAWEI] multicast-nat instance id 1 name stream1 [*HUAWEI-multicast-nat-instance-1] commit [~HUAWEI-multicast-nat-instance-1] quit
[~HUAWEI] interface GigabitEthernet0/1/0 [*HUAWEI-GigabitEthernet0/1/0] traffic-policy match1_mac_list inbound link-layer [*HUAWEI-GigabitEthernet0/1/0] multicast-nat inbound enable [*HUAWEI-GigabitEthernet0/1/0] commit [~HUAWEI-GigabitEthernet0/1/0] quit
[~HUAWEI] interface GigabitEthernet0/1/1 [*HUAWEI-GigabitEthernet0/1/1] multicast-nat outbound id 1 name out1_1 [*HUAWEI-GigabitEthernet0/1/1] commit [~HUAWEI-GigabitEthernet0/1/1] quit [~HUAWEI] interface GigabitEthernet0/1/8 [*HUAWEI-GigabitEthernet0/1/8] multicast-nat outbound id 2 name out1_2 src-mac auto-translate src-ip 12.12.12.12 dst-ip 239.1.0.2 dst-udp-port 10002 [*HUAWEI-GigabitEthernet0/1/8] commit [~HUAWEI-GigabitEthernet0/1/8] quit
[~HUAWEI] multicast-nat bind-list [~HUAWEI-multicast-nat-bind-list] multicast-nat outbound id 1 name out1_1 bind instance id 1 name stream1 [*HUAWEI-multicast-nat-bind-list] multicast-nat outbound id 2 name out1_2 bind instance id 1 name stream1 [*HUAWEI-multicast-nat-bind-list] commit [~HUAWEI-multicast-nat-bind-list] quit
# sysname huawei # multicast-nat enable # multicast-nat instance id 1 name stream1 # multicast-nat bind-list multicast-nat outbound id 1 name out1_1 bind instance id 1 name stream1 multicast-nat outbound id 2 name out1_2 bind instance id 1 name stream1 # igmp-snooping enable mld-snooping enable # undo telnet ipv6 server enable # diffserv domain default # diffserv domain 5p3d # undo soc # acl number 3001 rule 1 permit udp source 10.10.10.10 0 destination 239.0.0.1 0 destination-port eq 10000 # acl number 4001 rule 1 permit source-mac 00e0-fc00-0001 # traffic classifier rule_ip1 operator or if-match acl 3001 # traffic classifier rule_mac1 operator or if-match acl 4001 # traffic behavior rule_ip1 multicast-nat bind instance id 1 name stream1 # traffic behavior rule_mac1 traffic-policy match1_ip_list1 ip-layer # traffic policy match1_ip_list1 share-mode classifier rule_ip1 behavior rule_ip1 precedence 1 # traffic policy match1_mac_list share-mode classifier rule_mac1 behavior rule_mac1 precedence 1 # license # interface GigabitEthernet0/1/0 undo negotiation auto undo shutdown traffic-policy match1_mac_list inbound link-layer multicast-nat inbound enable # interface GigabitEthernet0/1/1 undo shutdown multicast-nat outbound id 1 name out1_1 # interface GigabitEthernet0/1/8 undo shutdown multicast-nat outbound id 2 name out1_2 src-mac auto-translate src-ip 12.12.12.12 dst-ip 239.1.0.2 dst-udp-port 10002 # return