Configuring NAT

Disabling NAT

Typically, outbound link load balancing networking requires disabling NAT for a link group.

To disable NAT:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter link group view.

loadbalance link-group link-group-name

N/A

3. Disable NAT for the link group.

transparent enable

By default, NAT is enabled for a link group.

Configuring SNAT

After a link group references the SNAT address pool, the LB device replaces the source address of the packets it receives with an SNAT address before forwarding the packets.

An SNAT address pool can have a maximum of 256 IPv4 addresses and 65536 IPv6 addresses. No overlapping IPv4 or IPv6 addresses are allowed in different SNAT address pools.

As a best practice, do not use SNAT because its application scope is limited for outbound link load balancing.

To configure SNAT:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create an SNAT address pool and enter SNAT address pool view.

loadbalance snat-pool pool-name

By default, no SNAT address pools exist.

3. (Optional.) Set a description for the SNAT address pool.

description text

By default, no description is set for an SNAT address pool.

4. Specify an address range for the SNAT address pool.

  • Specify an IPv4 address range: ip range start start-ipv4-address end end-ipv4-address

  • Specify an IPv6 address range: ipv6 range start start-ipv6-address end end-ipv6-address

By default, no address range is specified for an SNAT address pool.

5. Return to system view.

quit

N/A

6. Enter link group view.

loadbalance link-group link-group-name

N/A

7. Specify the SNAT address pool to be referenced by the link group.

snat-pool pool-name

By default, no SNAT address pool is referenced by a link group.