To implement multicast NAT, you must configure traffic policies to match input multicast streams.
Context
In multicast NAT, input and output multicast streams are associated through a multicast NAT instance. To associate input multicast streams with a multicast NAT instance, traffic policies need to be applied on the inbound interface of multicast streams. You can configure a single-level or two-level traffic policy as required.
- Single-level traffic policy: matches the IP address and UDP port number of input multicast streams.
- Two-level traffic policy: The level-1 traffic policy matches the MAC address of input multicast streams, and the level-2 traffic policy matches the IP address and UDP port number of input multicast streams.
Procedure
- Configure a single-level traffic policy.
- Configure a traffic classification rule.
- Run system-view
The system view is displayed.
- Run acl { name advance-acl-name [ advance | [ advance ] number advance-acl-number ] | [ number ] advance-acl-number } [ match-order { config | auto } ]
An advanced ACL is created, and the ACL view is displayed.
- Run rule [ rule-id ] [ name rule-name ] { deny | permit } { protocol | udp } [ [ dscp dscp | [ precedence precedence | tos tos ] * ] | { destination { destination-ip-address { destination-wildcard | 0 | des-netmask } | any } | destination-pool destination-pool-name } | { destination-port operator port-number | destination-port-pool destination-port-pool-name } | fragment-type fragment | { source { source-ip-address { source-wildcard | 0 | src-netmask } | any } | source-pool source-pool-name } | { source-port operator port-number | source-port-pool source-port-pool-name } | time-range time-name | vpn-instance vpn-instance-name ] *
A rule is configured for the advanced ACL to match the IP address and UDP port number of input multicast streams.
- Run quit
Return to the system view.
- Configure a traffic classifier.
- Run traffic classifier classifier-name
A traffic classifier is configured, and the traffic classifier view is displayed.
- Run if-match acl acl-number
An ACL-based matching rule for MF traffic classification is configured.
- Run quit
Return to the system view.
- Configure a traffic behavior.
- Run traffic behavior behavior-name
A traffic behavior is configured, and its view is displayed.
- Run multicast-nat bind instance id instance-id [ name instance-name ]
The traffic behavior is bound to the multicast NAT instance.
- Run quit
Return to the system view.
- Configure a traffic policy.
- Run traffic policy policy-name
A traffic policy is configured and its view is displayed.
- Run classifier classifier-name behavior behavior-name
The traffic behavior is specified for the traffic classifier in the traffic policy.
- Run quit
Return to the system view.
- Run commit
The configuration is committed.
- Configure a two-level traffic policy.
- Configure a level-1 traffic classification rule.
- Run system-view
The system view is displayed.
- Run acl { name link-acl-name { link | [ link ] number link-acl-number } | [ number ] link-acl-number } [ match-order { config | auto } ]
A Layer 2 ACL is created, and the Layer 2 ACL view is displayed.
- Run rule [ rule-id ] permit source-mac source-mac sourcemac-mask
An ACL rule is configured to match a specified MAC address of input multicast streams.
- Run quit
Return to the system view.
- Configure a level-1 traffic classifier.
- Run traffic classifier classifier-name
A traffic classifier is configured, and the traffic classifier view is displayed.
- Run if-match acl acl-number
An ACL-based matching rule for MF traffic classification is configured.
- Run quit
Return to the system view.
- Configure a level-2 traffic classification rule.
- Run acl { name advance-acl-name [ advance | [ advance ] number advance-acl-number ] | [ number ] advance-acl-number } [ match-order { config | auto } ]
An advanced ACL is created, and the ACL view is displayed.
- Run rule [ rule-id ] [ name rule-name ] { deny | permit } { protocol | udp } [ [ dscp dscp | [ precedence precedence | tos tos ] * ] | { destination { destination-ip-address { destination-wildcard | 0 | des-netmask } | any } | destination-pool destination-pool-name } | { destination-port operator port-number | destination-port-pool destination-port-pool-name } | fragment-type fragment | { source { source-ip-address { source-wildcard | 0 | src-netmask } | any } | source-pool source-pool-name } | { source-port operator port-number | source-port-pool source-port-pool-name } | time-range time-name | vpn-instance vpn-instance-name ] *
A rule is configured for the advanced ACL to match the IP address and UDP port number of input multicast streams.
- Run quit
Return to the system view.
- Configure a level-2 traffic classifier.
- Run traffic classifier classifier-name
A traffic classifier is configured, and the traffic classifier view is displayed.
- Run if-match acl acl-number
An ACL-based matching rule for MF traffic classification is configured.
- Run quit
Return to the system view.
- Configure a level-2 traffic behavior.
- Run traffic behavior behavior-name
A traffic behavior is configured, and its view is displayed.
- Run multicast-nat bind instance id instance-id [ name instance-name ]
The traffic behavior is bound to the multicast NAT instance.
- Run quit
Return to the system view.
- Configure a level-2 traffic policy.
- Run traffic policy policy-name
A traffic policy is configured and its view is displayed.
- Run classifier classifier-name behavior behavior-name
The traffic behavior is specified for the traffic classifier in the traffic policy.
- Run quit
Return to the system view.
- Configure a level-1 traffic behavior.
- Run traffic behavior behavior-name
A traffic behavior is configured, and its view is displayed.
- Run traffic-policy policy-name [ ip-layer ]
The traffic behavior is associated with the level-2 traffic policy.
- Run quit
Return to the system view.
- Configure a level-1 traffic policy.
- Run traffic policy policy-name
A traffic policy is configured and its view is displayed.
- Run classifier classifier-name behavior behavior-name
The traffic behavior is specified for the traffic classifier in the traffic policy.
- Run quit
Return to the system view.
- Run commit
The configuration is committed.