Multiple Default Gateway

Summary : How to configure Multiple Default Gateway on Mobility Access Switch

 

Introduction :

 

 

Default gateway is a special case of static route where the destination mask and prefix is 0/0. The next hop in a default gateway can be any valid IP address which can be reached through a routable or the management interface.

Multiple Default Gateway Support:
 
Mobility Access Switch allows you to configure multiple default gateways using the metrics option. Lower metric takes precedence when both routes co-exist. The second gateway with higher mertrics takes over when the first route is down.

 

 

Feature Notes :

 

 

Default gateway is the route configured on the Mobility Access Switch to reach the upstream network. Starting from ArubaOS 7.4, Mobility Access Switch allows you to configure multiple default gateways using the metric option introduced in the CLI. Gateway with lower metric takes precedence when more than one gateways exist to a given upstream network. The second gateway with higher mertric takes over when the first route is down.
 
The multiple default gateways can be configured in two different ways:
 
  • When DHCP import is not configured for the default gateway, you can configure multiple routes with metrics under the IP profile to support multiple default gateways.
  • When DHCP import is configured for the default gateway, you can configure the metrics value under the VLAN interface used for the uplinks to support multiple default gateways. This can be configured only from the CLI.

Environment : In the Environment where we need to route the traffic to different gateway based upon the VLAN traffic.

 

 

Configuration Steps :

 

 

Configuring Multiple Default Gateways and Static Routes:
 

 

We can configure the static routes and default gateways within the global IP-profile. Each static route needs a destination, netmask and nexthop addresses.
 

 

We can configure the static routes using the WebUI or CLI.
 

 

Using the WebUI:
 

 

1. Navigate to the Configuration > Routing page.

 

2. Click New under the static routes list.

 

3. Click on the Destination IP column and enter the destination IP address. For default gateway configuration, specify the destination IP as 0.0.0.0

 

4. Click on the Destination Mask column and enter the destination netmask address. For default gateway configuration, specify the destination mask as 0.0.0.0.

 

5. Click on the Next Hop column and enter the nexthop IP address.

 

6. Click on the Metric column and enter the metric.

 

7. Press Enter.


Using the CLI:
 
You can use the following command to configure the static routes with metrics (optional):
 
(host)(config) #ip-profile
(host)(ip-profile) #route <dest-ip> <dest-mask> <next-hop>
(host)(ip-profile) #route 20.20.32.0 255.255.255.0 10.10.10.32

Use the following command to configure multiple default gateways with different nexthop IP addresses when DHCP import is not configured:
 
(host) (config) #ip-profile
(host) (ip-profile) #route 0.0.0.0 0.0.0.0 <next-hop> <metrics>
 
Use the following commands to support multiple default gateways when DHCP import is configured for the default gateway:
 
(host) (ip-profile) #default-gateway import dhcp
(host) (ip-profile) #exit
(host) (config) #interface vlan <id>
(host) (vlan "<id>") #metric <cost>
 
Sample Configuration:
 
The following samples configure static routes with multiple next hops and multiple default gateways:
 
IP Route Configuration:
 
(host)(config) #ip-profile
(host)(ip-profile) #default-gateway 2.2.2.2
(host)(ip-profile) #no default gateway
(host)(ip-profile) #default-gateway import dhcp
(host)(ip-profile) #route 20.20.31.0 255.255.255.0 10.10.10.31
(host)(ip-profile) #route 20.20.32.0 255.255.255.0 10.10.10.32
(host)(ip-profile) #route 20.20.33.0 255.255.255.0 10.10.10.33
(host)(ip-profile) #no route 20.20.34.0 255.255.255.0 10.10.10.20
 
Verifying the IP Routes:
 
(host) #show ip route
Codes: C - connected, O - OSPF, R - RIP, S - static
M - mgmt, U - route usable, * - candidate default
Gateway of last resort is 10.18.7.254 to network 0.0.0.0 at cost 39
S 0.0.0.0/0 [39/0] via 10.18.7.254
C 10.10.10.0 is directly connected: vlan1
C 10.10.10.1 is directly connected: vlan1
C 10.10.10.20 is directly connected: vlan1
C 10.10.10.31 is directly connected: vlan1
C 10.10.10.32 is directly connected: vlan1
C 10.10.10.33 is directly connected: vlan1
M 10.18.7.0 is connected mgmt-intf: 10.18.7.125
M 10.18.7.125 is connected mgmt-intf: 10.18.7.125
M 10.18.7.254 is connected mgmt-intf: 10.18.7.125
S 20.20.31.0 [0] via 10.10.10.31
S 20.20.32.0 [0] via 10.10.10.32
S 20.20.33.0 [0] via 10.10.10.33
 
(host) #show ip route summary
Route Source Total
------------ -----
connected 6
static 5
ospf-intra 0
ospf-inter 0
ospf-ext1 0
ospf-ext2 0
ospf-nssa 0
 
(host) #show arp
IPV4 ARP Table
--------------
Protocol IP Address Hardware Address Interface
-------- ---------- ---------------- ---------
Internet 40.40.40.252 00:0b:86:64:a8:c0 vlan40
 
Troubleshooting :
 
Default Gateway Configuration:
 
The following example configures multiple default gateways under the IP profile as static routes:
 
(host) (config) #ip-profile
(host) (ip-profile) #route 0.0.0.0 0.0.0.0 200.36.36.36 10
(host) (ip-profile) #route 0.0.0.0 0.0.0.0 142.42.42.42 20
 
The following example configures multiple default gateways under the VLAN interface when the default gateway is obtained from DHCP:
 
(host) (config) #ip-profile
(host) (ip-profile) #default-gateway import dhcp
(host) (ip-profile) #exit
(host) (config) #interface vlan 10
(host) (vlan "10") #metric 10
(host) (config) #interface vlan 20
(host) (vlan "20") #metric 20

Verifying Multiple Default Gateway Configuration:
 
Use the following command to view the configuration under the IP profile:
 
(host) #show ip-profile
ip-profile "default"
--------------------
Parameter Value
--------- -----
Default Gateway N/A
Import DHCP Gateway Disabled controller-ip loopback1
route 0.0.0.0 0.0.0.0 192.168.1.1 10
route 0.0.0.0 0.0.0.0 172.168.1.1 20
Use the following command to verify the VLAN interface configuration:
(host) #show running-config | begin ip-profile
Building Configuration...
ip-profile
default-gateway import dhcp
controller-ip loopback 1
! interface vlan "
10"
metric 10
ip address dhcp-client
! interface vlan "
20"
metric 20
ip address dhcp-client
!

 

Version History
Revision #:
1 of 1
Last update:
‎11-10-2014 04:17 AM
Updated by:
 
Contributors
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.