3.2.20. nat¶
Note
requires a Product License.
NAT configuration.
vsr running config# vrf <vrf> nat
source-rule¶
A rule to change the source address/port of outgoing packets.
vsr running config# vrf <vrf> nat
vsr running nat# source-rule <uint64> description <string> \
... protocol [not] VALUE \
... destination \
... address [not] VALUE \
... port [not] VALUE \
... port-range [not] VALUE \
... group [not] <string> \
... source \
... address [not] VALUE \
... port [not] VALUE \
... port-range [not] VALUE \
... group [not] <string> \
... mark [not] <0x0-0xffffffff> mask <0x0-0xffffffff> \
... outbound-interface [not] <string> \
... translate-to map MAP output-address \
... address VALUE port PORT \
... port-range START END \
... address-range START END port PORT \
... port-range START END
<uint64> |
Priority of the rule. High number means lower priority. |
destination¶
Match a destination attribute.
destination \
address [not] VALUE \
port [not] VALUE \
port-range [not] VALUE \
group [not] <string>
port¶
Match this destination port.
port [not] VALUE
VALUE (mandatory)¶
The port to match.
VALUE
VALUE |
A 16-bit port number used by a transport protocol such as TCP or UDP. |
source¶
Match a source attribute.
source \
address [not] VALUE \
port [not] VALUE \
port-range [not] VALUE \
group [not] <string>
port¶
Match this source port.
port [not] VALUE
VALUE (mandatory)¶
The port to match.
VALUE
VALUE |
A 16-bit port number used by a transport protocol such as TCP or UDP. |
mark¶
Matches the mark field associated with a packet.
mark [not] <0x0-0xffffffff> mask <0x0-0xffffffff>
<0x0-0xffffffff> (mandatory)¶
The mark value. Packets in connections are matched against this value.
<0x0-0xffffffff>
outbound-interface¶
Name of an interface via which a packet is going to be sent. Only for forward, output and postrouting.
outbound-interface [not] <string>
translate-to¶
Translate to.
translate-to map MAP output-address \
address VALUE port PORT \
port-range START END \
address-range START END port PORT \
port-range START END
map¶
Translate a whole network of addresses onto another network of addresses. All ‘one’ bits in the mask are filled in from the new address. All bits that are zero in the mask are filled in from the original address.
map MAP
MAP |
An IPv4 prefix: address and CIDR mask. |
address¶
Translate to an address and port/port range.
address VALUE port PORT \
port-range START END
port¶
Translate to a port.
port PORT
PORT |
A 16-bit port number used by a transport protocol such as TCP or UDP. |
destination-rule¶
A rule to change the destination address/port of incoming packets.
vsr running config# vrf <vrf> nat
vsr running nat# destination-rule <uint64> description <string> \
... protocol [not] VALUE \
... destination \
... address [not] VALUE \
... port [not] VALUE \
... port-range [not] VALUE \
... group [not] <string> \
... source \
... address [not] VALUE \
... port [not] VALUE \
... port-range [not] VALUE \
... group [not] <string> \
... mark [not] <0x0-0xffffffff> mask <0x0-0xffffffff> \
... inbound-interface [not] <string> \
... translate-to map MAP \
... address VALUE port PORT \
... port-range START END \
... address-range START END port PORT \
... port-range START END
<uint64> |
Priority of the rule. High number means lower priority. |
destination¶
Match a destination attribute.
destination \
address [not] VALUE \
port [not] VALUE \
port-range [not] VALUE \
group [not] <string>
port¶
Match this destination port.
port [not] VALUE
VALUE (mandatory)¶
The port to match.
VALUE
VALUE |
A 16-bit port number used by a transport protocol such as TCP or UDP. |
source¶
Match a source attribute.
source \
address [not] VALUE \
port [not] VALUE \
port-range [not] VALUE \
group [not] <string>
port¶
Match this source port.
port [not] VALUE
VALUE (mandatory)¶
The port to match.
VALUE
VALUE |
A 16-bit port number used by a transport protocol such as TCP or UDP. |
mark¶
Matches the mark field associated with a packet.
mark [not] <0x0-0xffffffff> mask <0x0-0xffffffff>
<0x0-0xffffffff> (mandatory)¶
The mark value. Packets in connections are matched against this value.
<0x0-0xffffffff>
inbound-interface¶
Name of an interface via which a packet was received. Only for input, forward and prerouting.
inbound-interface [not] <string>
translate-to¶
Translate to.
translate-to map MAP \
address VALUE port PORT \
port-range START END \
address-range START END port PORT \
port-range START END
map¶
Translate a whole network of addresses onto another network of addresses. All ‘one’ bits in the mask are filled in from the new address. All bits that are zero in the mask are filled in from the original address.
map MAP
MAP |
An IPv4 prefix: address and CIDR mask. |
address¶
Translate to an address and port/port range.
address VALUE port PORT \
port-range START END
port¶
Translate to a port.
port PORT
PORT |
A 16-bit port number used by a transport protocol such as TCP or UDP. |