Wired Networks

What takes prescedence in ip-profile, "ip route" or "default-gateway"?
Q:

We can set gateway of last resort in a MAS using two methods in "ip-profile":

 

1. default-gateway <next hop>

2. ip route 0.0.0.0 0.0.0.0 <next hop> <metric>

 

To specify multiple gateways of last resort, we must use ip route command specifying different next hops and different metrics. The next hop with lower metric will be used.

However what will be used when both default gateway and ip routes to default network are set?

 



A:

 

Default-gateway takes precedence in the ip-profile.

 

Let us configure an ip-profile with default gateway:

(ArubaS3500-24P-US) (config) #ip-profile
(ArubaS3500-24P-US) (ip-profile) #default-gateway 10.150.3.3

 

Now let us configure multiple routes to default network one with the priority of 0:

(ArubaS3500-24P-US) (ip-profile) #route 0.0.0.0 0.0.0.0 10.17.171.100 0

(ArubaS3500-24P-US) (ip-profile) #route 0.0.0.0 0.0.0.0 10.17.171.10 1000000

 

Now let us see the IP profile:

 

(ArubaS3500-24P-US) (config) #show ip-profile

ip-profile "default"
--------------------
Parameter            Value
---------            -----
Default Gateway      10.150.3.3
Import DHCP Gateway  Disabled
controller-ip        N/A
route                0.0.0.0 0.0.0.0 10.17.171.10 1000000
route                0.0.0.0 0.0.0.0 10.17.171.100 0

 

Now let us see the routing table:

 

(ArubaS3500-24P-US) (config) #show ip route

Gateway of last resort is 10.150.3.3 to network 0.0.0.0 at cost 0
S       * 0.0.0.0  /0 [0] via 10.150.3.3
C        10.17.171.0/27 is directly connected: vlan1
C        10.17.171.2/32 is directly connected: vlan1
C        10.150.2.0/24 is directly connected: vlan2
C        10.150.2.2/32 is directly connected: vlan2
C        10.150.3.0/24 is directly connected: vlan3
C        10.150.3.2/32 is directly connected: vlan3

 

We can see above that the default-gateway takes precedence over ip route statements even if the cost is set to 0.

 

Version history
Revision #:
2 of 2
Last update:
‎03-29-2017 11:55 AM
Updated by:
 
Labels (1)
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.