What is a Default Gateway?
Short answer
Default Gateway is the next-hop router to which all the traffic that has no more specific route for its destination is sent; in the route table, it is kept as the route whose destination is 0.0.0.0/0 (::/0 in IPv6) (RFC 1122 §3.3.1). In TR7, each route table has its own default gateway, and one can be defined per IP version: a route table can carry both an IPv4 and an IPv6 Default Gateway, and a second one in the same version is rejected with the Route destinations collide error. The Default Gateway is defined from two places: by checking the Default Gateway box in the Add Route form (the interface is selected, and the Gateway Monitoring profile is assigned here) or in the form opened with the pencil icon of the Default Gateway column on the Route Tables screen (the interface is selected automatically as the interface that has an IP in the same subnet as the gateway). If the Default Gateway is deleted, access from the addresses in that route table to external networks that do not have a more specific route is cut off.
Where It Is Used in TR7
| Where | Field / label | What for |
|---|---|---|
| Network → Interfaces → Actions → Add Route | Default Gateway (unchecked by default), Gateway, Route Interface, Gateway Monitoring (default No check) | Defining the default gateway over the selected interface and monitoring it with ping |
| Network → Route Tables | The Default Gateway column (IPv4: …, IPv6: …), the Gateway Health column | Seeing the gateways of the route table and the IPv4 gateway monitoring result |
| Route Tables → Default Gateway pencil icon → Edit Default Gateway tab | Default Gateway(IPv4), Default Gateway(IPv6), the Match row, the Set Default Gateway button | Setting the gateways of the two versions in a single form; if a field is left empty, the gateway of that version is deleted |
| Network → Interfaces list | The route row Default gateway -> <address> (in IPv6, Default gateway(IPv6) -> <address>); if Gateway monitoring is assigned, a per-device monitoring indicator next to it | The route and the monitoring result being visible on the interface |
| WEB-CLI | network route add (network route), sys-cmd netstat (netstat) | Adding a route; with the -rn parameter, seeing the running routing table of the selected route table (the line with the 0.0.0.0 destination is the default route) |
The Difference Between the Two Forms
| Add Route → Default Gateway | Route Tables → Edit Default Gateway | |
|---|---|---|
| Interface | Selected by hand (Route Interface) | The first interface that has an IP in the same subnet as the gateway is selected automatically |
| Same-subnet check | Not performed; the route is added by being treated as directly connected (onlink) | Performed; if there is no match, the No network matches default gateway error |
| Gateway monitoring | Assigned and saved in this form | Seen in the form, but the selection is not written to the route record; the profile is assigned from the Add route / Edit Route form |
| Version | From the version of the gateway address entered (IPv4 → 0.0.0.0/0, IPv6 → ::/0) | A separate field for IPv4 and IPv6 |
In a cluster, the route definition is common to the two devices and, with the default auto-sync, is also applied to the peer device; a different gateway cannot be defined per device. Gateway Monitoring, however, runs separately on each device, and its result is shown per device.
Common Misconceptions
- "Each interface has its own default gateway." There is a single default gateway per route table and per IP version. For different exits, separate route tables are created (What is a Route Table; when do I need to change it for a vService or Backend Service?).
- "When gateway monitoring fails, the route is taken out of service." Gateway monitoring only monitors the reachability of the gateway and shows it in the Gateway Health column; the route stays in place. In a cluster, if the VIP Transition Method includes GW check, the result takes part in VIP failover (What is Gateway Monitoring; how does it affect VIP failover?).
- "vServices work even if the default gateway is deleted." Responses from the IPs in the route table to networks that do not have a more specific route cannot be sent; in the deletion confirmation, the
Route table '…' will lose its IPv4 default gatewaywarning appears.
How it is done in the documentation
