service nat source rule <rule-number> translation <address>
Specifies a translated address or port address for a NAT rule.
- rule-number
- The numeric identifier of a NAT rule. The identifier ranges from 1 through 9999.
- address address
- An IP address or an IP address/prefix to substitute for the original address or addresses. Address formats are as follows:
ip-address: An IP address.
ip-address/prefix: A network. This argument is typically used in bidirectional NAT to translate one network of addresses to another.
ip-address-range: A range of network IP address.
ip-address-group: The name of a resource address-group.
masquerade: A format that is available only when rule type is set to source. It specifies that the source IP address is to be set to the primary IP address on the outbound interface.
- port port
- An IP port to substitute for the original port. It cannot be used when the source address or destination address and the translation address are IPv4 subnets. Port formats are as follows:
port-number: A port number. The number ranges from 1 through 65535.
start-end: A range of contiguous ports; for example, 1001-1005.
Configuration mode
service {
nat {
source {
rule rule-number {
translation {
address address
port port
}
}
}
}
}
Use this command to specify a translated address or port address for a NAT rule. A translated address or a port address must be specified for each rule.
Use the set form of this command to configure a translated address or port address for a NAT rule.
Use the delete form of this command to remove a translated address or port address from a NAT rule.
Use the show form of this command to view a translated address or port address for a NAT rule.