A WAN (Wide Area Network) port connects your local network to the internet and Alibaba Cloud. This topic explains how to configure the WAN port for a Smart Access Gateway (SAG) device in the SAG console.
WAN port features
- SNAT (Source Network Address Translation)
When SNAT is enabled for a WAN port, the private source IP address of a data packet is automatically translated to a public IP address. This enables internet access. By default, SNAT is disabled.
In inline mode, you must enable SNAT on the WAN port to connect your local network to the internet. In one-arm mode, disabling SNAT is recommended.
- Custom DNS servers
By default, a WAN port uses Alibaba Cloud DNS servers. You can specify custom DNS servers for the WAN port.
- Bandwidth throttling
The Bandwidth property of a WAN port allows you to set its peak bandwidth. By combining QoS policies and WAN port bandwidth throttling, you can guarantee bandwidth for critical services and improve bandwidth utilization.
- High-availability links with multiple WAN portsYou can configure multiple WAN ports for an SAG device. These ports can form a high-availability link, provide load balancing, and improve network availability.
- By default, port 5 of an SAG-1000 device is a WAN port. You can manually assign other ports as WAN ports.
- The number of WAN ports supported by an SAG-100WM device varies by model. Type 2 devices support multiple WAN ports, whereas Type 1 devices support only one. You can distinguish between Type 1 and Type 2 devices by their appearance.
Three properties control the precedence of WAN ports: Priority, ISP, and Weight. The order of precedence is Priority > ISP > Weight.
Property Description Use cases Priority When you have multiple WAN ports, you can assign a priority to each port. The SAG device treats the port with the highest priority (the lowest value) as the active port and other ports as standby ports. The device preferentially uses the active port to forward traffic. If the active port fails, traffic automatically fails over to a standby port.
- If WAN ports have different priorities, the SAG device uses the active and standby ports to form a high-availability link.
- If WAN ports have the same priority, the SAG device uses the ISP and Weight properties to perform load balancing across the ports.
ISP If multiple WAN ports have the same priority, the SAG device routes traffic to the appropriate ISP link based on the destination IP address of each data packet, achieving load balancing. Weight If multiple WAN ports have the same ISP configuration, or if the traffic cannot be matched to a specific ISP, the SAG device distributes traffic based on the weight of each port. Note- The ISP property can be configured only in the Chinese mainland.
- WAN ports support load balancing only for public traffic.
Configure a WAN port
Log on to the SAG console.
In the top navigation bar, select the region.
- On the Smart Access Gateway page, use one of the following methods to open the Device Management tab.
- Click the ID of the target SAG instance to go to its details page, and then click the Device Settings tab.
- Find the SAG instance that you want to manage. In the Operation column, choose .
- On the Device Management tab, if the instance has both an active and a standby device, click the serial number of the device that you want to manage.
- Device SettingsIn the left-side navigation pane, click Manage WAN Ports.
- To enable SNAT for the WAN port, find the SNAT Information section and click Edit. In the Edit SNAT dialog box, enable Public SNAT and click OK.
- To configure custom DNS servers for the WAN port, find the DNS information section and click Edit. In the Modify DNS Settings dialog box, enter the custom DNS server addresses and click OK.
The dialog box contains the Primary DNS and Secondary DNS fields. Enter the IP addresses of the primary and secondary DNS servers.
- In the WAN-Wired section, find the port that you want to configure and click Edit.
- In the Configure WAN Port dialog box, configure the WAN port and click OK.
Parameter Description Connection Type Select a connection type for the WAN port. SAG devices support the following connection types:
- Static IP: Select this option if the peer port is configured with a static IP address.If you select Static IP, you must configure the following parameters:
- IP Address: The IP address of the WAN port.
- Mask: The subnet mask for the IP address.
- Gateway: The gateway IP address for the SAG device. Note
- Make sure the IP address of the WAN port and its peer port are in the same subnet.
- After configuring the Gateway, the SAG device automatically generates a default route.
- Dynamic IP: Select this option if the peer port uses DHCP to assign IP addresses. The WAN port will obtain a dynamic IP address through DHCP.
- PPPoE: Select this option if the WAN port needs to connect to the internet through a dial-up connection provided by your ISP.Enter the PPPoE account and password from your ISP:
- Account: The PPPoE account name.
The account name must be 6 to 30 characters in length and can contain digits and letters.
- Password: The PPPoE password.
The password must be 6 to 30 characters in length and can contain digits and letters.
- Account: The PPPoE account name.
Priority Set a priority for the WAN port. Valid values: -1 and 1 to 50. Default value: 1. A smaller value indicates a higher priority. A value of -1 indicates that the port does not forward traffic.
ISP Select the ISP for the WAN port. The SAG device supports the following ISPs:- China Telecom
- China Mobile
- China Unicom
- Others
Bandwidth The bandwidth limit for the WAN port, in Mbps. - If you configure a bandwidth limit for a WAN port, you can no longer configure WAN Upstream Bandwidth or Upstream Bandwidth of Cellular Port for the SAG device.
- In a multi-WAN scenario, if you configure a bandwidth limit and apply a QoS policy, the policy behaves as follows:
- If the WAN ports have different priorities, the QoS policy uses the bandwidth of the active port as the baseline for rate limiting.
- If the WAN ports have the same priority, the QoS policy uses the bandwidth of the port with the lowest bandwidth limit as the baseline.
- A value of 0 Mbps means no bandwidth limit is applied.
Weight Set a weight for the WAN port. Valid values: 1 to 100. Default value: 100.
The weight determines the traffic distribution ratio for each port. For example, if one WAN port has a weight of 50 and another has a weight of 100, the traffic ratio is 1:2. If the SAG device receives three data packets, one is forwarded through the port with a weight of 50, and two are forwarded through the port with a weight of 100.
- Static IP: Select this option if the peer port is configured with a static IP address.
References
- What is a QoS policy?
- Deployment modes of Smart Access Gateway
- SAG-100WM device specifications
- ModifySagWan: Modify the WAN port configuration of a SAG device.
- ModifySagWanSnat: Modify the SNAT configuration for the WAN port of a SAG device.
- ModifySagUserDns: Modify the DNS server for the WAN port of a SAG device.