cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2801
Views
5
Helpful
8
Replies

Where does gateway of last resort come from?

rakuten02
Level 1
Level 1

There's a Cisco 9200 switch, when I do show ip route,

It states "Gateway of last resort is 134.101.60.11 to network 0.0.0.0".   134.101.60.11 is a HSRP address.

 

However, there is no static default route in the configuration. There is a ip-default gateway 134.101.60.11, but as far as I am aware it is different from setting a static default route. ip routing is disabled for this switch.

 

This also brings about another question. 

This switch is able to ping to another subnet 134.101.70.66, which I assume is because of the default gateway. 

 

The strange thing is, when I tried simulating it on another switch virtually by copying the entire config, the Gateway of last resort is not present, the default gateway is present. Ping to another subnet fails to work until I manually add 0.0.0.0 0.0.0.0 134.101.60.11. Why is this so? 

 

The switch ip route table has only 2 entries:

C 134.101.60.0/27 is directly connected, Vlan55
L 134.101.60.4/32 is directly connected, Vlan55

8 Replies 8

balaji.bandi
Hall of Fame
Hall of Fame
ip-default gateway 134.101.60.11

means switch acting as Layer 2 only

0.0.0.0 0.0.0.0 134.101.60.11

means this enables the routing and learning route from the parent device and allows other VLANs able to communicate with each other.

 

Gateway of last resort is 134.101.60.11 to network 0.0.0.0".

this is learning from the default gateway config.

 

is this device acting as a Layer 3 device or Layer 2, so based on that you need to make configuration as part of the deployment.

 

 

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

The original post tells us " ip routing is disabled for this switch" which means, as BB has said, that this switch is acting as a layer 2 switch. As such it needs the ip default-gateway statement to be able to forward traffic for its management interface to remote subnets.

 

We do not know much detail about the second switch but the behavior clearly indicates that ip routing is enabled on this switch. So the switch is operating as a layer 3 switch. On a layer 3 switch if ip default-gateway is configured it is ignored. A layer 3 switch needs some type of default route to be able to forward traffic to remote destinations. That default route might be a static default route or might be learned by a dynamic routing protocol.

 

HTH

Rick

Hello


@rakuten02 wrote:

There's a Cisco 9200 switch, when I do show ip route,

It states "Gateway of last resort is 134.101.60.11 to network 0.0.0.0".   134.101.60.11 is a HSRP address.

This switch is able to ping to another subnet 134.101.70.66, which I assume is because of the default gateway. 


If ip routing is disabled you shouldn't really see any gateway of last resort which suggest ip routing IS enabled. however you state it isnt so then the switch would act as a host switch just like a pc with it own ip address/subnet mask/default gateway as such its going to forward any traffic via its DG for networks that isn't locally known.

 

 


@rakuten02 wrote:
The strange thing is, when I tried simulating it on another switch virtually by copying the entire config, the Gateway of last resort is not present, the default gateway is present. Ping to another subnet fails to work until I manually add 0.0.0.0 0.0.0.0 134.101.60.11. Why is this so? 

As noted by rick this is because ip routing is enabled on that switch, so any specified DG is ignored, thus no gateway of last resort is shown until that is you specify a default route with an active next hop interface


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi all, 

I double checked the Cisco 9200 config again and there is no ip routing command and no static route in the config.

However, the default static route appears when I do a show ip route:

 

Gateway of last resort is 134.101.60.11 to network 0.0.0.0

S*      0.0.0.0/0 [0/0] via 134.101.60.11

 

Config of the interface connecting to the router:

switchport access vlan 55

 

Config of vlan 55:

ip address 134.101.60.4 255.255.255.224
no ip redirects
no ip unreachables
no ip proxy-arp
no ip route-cache

 

The other device is a Cisco router which has an interface configured with the HSRP address 134.101.60.11 . 

ip address 134.101.60.12 255.255.255.224
no ip redirects
no ip unreachables
no ip proxy-arp
standby 10 ip 134.101.60.11
...

 

 

post-show run full config to understand better - with the given information we do not know what is configured on the device.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

We are told "there is no ip routing command and no static route in the config."  

The fact that "ip routing" does not show in the running config is not necessarily proof that ip routing is not enabled. I do not have a 9200 to check it out but I know that for some of the high end switches ip routing is enabled by default and most default commands do not show up in running config. Perhaps the output of show ip protocol might shed some light on this?

 

We are told that there is no static route in the config, but the output clearly shows a static route

S*      0.0.0.0/0 [0/0] via 134.101.60.11

I am not clear how to resolve this and a complete output of show run would be a good place to start. It might also be helpful to have information about the licensing of the first switch and the second switch and what features are activated on each of the switches.

HTH

Rick

Hi,

I did a show ip protocols and the only output is *** IP Routing is NSF aware ***. This means that ip routing is not enabled?

 

I will try to obtain the config and upload it here soon.

 

Thanks for the additional information. The output of show ip protocol is not as helpful as I had hoped it might be. If you execute this command on the first switch what output do you get? I continue to believe that ip routing is enabled on this switch. In addition to the complete running config it might be helpful to see the output of these commands

show ip route

show ip interface brief

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: