This section provides an example for configuring clean switching for two input multicast streams.
On the network shown in Figure 1, multicast streams 1 and 2 are input from sources 1 and 2 to Device B, respectively. Device B outputs only multicast stream 1, and the characteristics of multicast stream 1 remain unchanged. If clean switching is required, the controller delivers a clean switching instruction to Device B so that Device B outputs multicast stream 2. The characteristics of multicast stream 2 remain unchanged.
Multicast Stream Characteristics |
Input Multicast Stream 1 |
Input Multicast Stream 2 |
Output Multicast Stream 1 |
Output Multicast Stream 2 |
---|---|---|---|---|
Source MAC address |
00e0-fc12-3456 |
00e0-fc22-3456 |
00e0-fc12-3456 |
00e0-fc22-3456 |
Source IP address |
10.10.10.10 |
12.12.12.12 |
10.10.10.10 |
12.12.12.12 |
Destination IP address |
239.0.0.1 |
239.1.0.2 |
239.0.0.1 |
239.1.0.2 |
Destination UDP port number |
10000 |
10002 |
10000 |
10002 |
The configuration roadmap is as follows:
Enable multicast NAT globally.
Create multicast NAT instances.
Configure traffic policies.
Apply the level-1 traffic policies on the inbound interfaces of multicast streams.
Configure multicast NAT on the outbound interface of multicast streams.
Bind output multicast streams to multicast NAT instances.
Configure clean switching of multicast streams.
<HUAWEI> system-view [~HUAWEI] multicast-nat enable
[~HUAWEI] multicast-nat instance id 1 name stream1 [~HUAWEI] multicast-nat instance id 2 name stream2 [*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] traffic-policy match2_mac_list inbound link-layer [*HUAWEI-GigabitEthernet0/1/1] multicast-nat inbound enable [*HUAWEI-GigabitEthernet0/1/1] commit [~HUAWEI-GigabitEthernet0/1/1] quit
[~HUAWEI] interface GigabitEthernet0/1/8 [*HUAWEI-GigabitEthernet0/1/8] multicast-nat outbound id 1 name out1_1 [*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] commit [~HUAWEI-multicast-nat-bind-list] quit
[~HUAWEI] multicast-nat bind-list [~HUAWEI-multicast-nat-bind-list] multicast-nat outbound id 1 name out1_1 bind instance id 2 name stream2 switch-mode clean-switch [*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 instance id 2 name stream2 # multicast-nat bind-list multicast-nat outbound id 1 name out1_1 bind instance id 2 name stream2 switch-mode clean-switch # 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 3002 rule 1 permit udp source 12.12.12.12 0 destination 239.1.0.2 0 destination-port eq 10002 # acl number 4001 rule 1 permit source-mac 00e0-fc12-3456 acl number 4002 rule 1 permit source-mac 00e0-fc22-3456 # traffic classifier rule_ip1 operator or if-match acl 3001 traffic classifier rule_ip2 operator or if-match acl 3002 # traffic classifier rule_mac1 operator or if-match acl 4001 traffic classifier rule_mac2 operator or if-match acl 4002 # traffic behavior rule_ip1 multicast-nat bind instance id 1 name stream1 traffic behavior rule_ip2 multicast-nat bind instance id 2 name stream2 # traffic behavior rule_mac1 traffic-policy match1_ip_list1 ip-layer traffic behavior rule_mac2 traffic-policy match1_ip_list2 ip-layer # traffic policy match1_ip_list1 share-mode classifier rule_ip1 behavior rule_ip1 precedence 1 traffic policy match1_ip_list2 share-mode classifier rule_ip2 behavior rule_ip2 precedence 1 # traffic policy match1_mac_list share-mode classifier rule_mac1 behavior rule_mac1 precedence 1 traffic policy match2_mac_list share-mode classifier rule_mac2 behavior rule_mac2 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 negotiation auto undo shutdown traffic-policy match2_mac_list inbound link-layer multicast-nat inbound enable # interface GigabitEthernet0/1/8 undo shutdown multicast-nat outbound id 1 name out1_1 # return