Cisco Catalyst 4506: Default Gateway doesn't work

Answered Question
Oct 27th, 2011

Hi All

We have a Cisco Catalyst 4506 running:

"Cisco IOS Software, Catalyst 4000 L3 Switch Software (cat4000-I9K91S-M), Version 12.2(25)EWA14, RELEASE SOFTWARE (fc1)"

I have configured the default gateway as:

ip default-gateway X.Y.116.65

However, when I do, "show ip route", it only shows the 3 connected networks and states "Gateway of last resort is not set".

The Command "ip classless" is not set. I read on some blogs that this might explain the issue. However, when I go into config mode (config t), I get the following output:

Switch(config)#ip classless

                                 ^

% Invalid input detected at '^' marker.

Switch(config)#

I can't ping the switch from outside the connected networks and cannot connect via vty onto the switch from outside the connected networks.

Can anybody help?

Many Thanks

John

I have this problem too.
0 votes
Correct Answer by kishore.chennupati about 2 years 5 months ago

Hi John,

I am not sure if they are any commands specifically to check if "ip routing" is enabled. But there are other ways to check if its enabled or not.

Simply put what "ip routing" does it to enable the routing table(RIB). There are other things it does but for now we just want to know how to chck if its enabled or not

++++ With ip routing

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

R1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#no ip routing                         <<< I remove ip routing here

R1(config)#end

R1#sh ip route                                       <<<< No routing table

Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface

ICMP redirect cache is empty

R1#

R1(config)#ip routing                                 <<<< I enable ip routing again

R1(config)#do sh ip route                           <<< shows the routing table

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

HTH

Regards,

Kishore

Correct Answer by Reza Sharifi about 2 years 5 months ago

Hi John,

I don't see ip default-gateway in the command reference guide for the version you are using

http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.2/25sg/command/reference/cr_toc.html#wp883041

One way to test is to turn off ip routing first and then try ip default-gateway.

If no luck, then use ip route command as suggestd by Edison.

HTH

Correct Answer by Edison Ortiz about 2 years 5 months ago

You need the command

ip route 0.0.0.0 0.0.0.0 X.Y.116.65

In addition, the other networks need to know how to reach the L3 interfaces on this switch thus you need static routing on the L3 devices providing connectivity on those other networks.

  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 5 (3 ratings)
Correct Answer
Edison Ortiz Thu, 10/27/2011 - 08:52

You need the command

ip route 0.0.0.0 0.0.0.0 X.Y.116.65

In addition, the other networks need to know how to reach the L3 interfaces on this switch thus you need static routing on the L3 devices providing connectivity on those other networks.

LondonCisco Thu, 10/27/2011 - 09:27

Hi (Hola) Edison

That works perfectly (I will assign correct answer to you once the discussion is finished).

However, do you (or anybody else) know why the "default gateway" doesn't work?

We have a Cisco 3750 switch which works with the default gateway command, giving the following output to show ip route:

Switch#show ip route

Default gateway is X.Y.112.1

Host               Gateway           Last Use    Total Uses  Interface

ICMP redirect cache is empty

Switch#

I can't see what is the difference between the 2 switch configurations.

Thanks

John

LondonCisco Thu, 10/27/2011 - 09:59

Hi Edison/Reza

The ip route that Edison gave most definitely worked.

The switch did allow me to put in the default gateway command though it didn't work. I can't try to put in the "no ip routing" command in now as the switch is live so I'll have to leave this as an unknown at the moment!

Thanks to you both.

John

Edison Ortiz Thu, 10/27/2011 - 10:45

To see the ip default-gateway information, you need to turn off 'ip routing' in the switch.

Once you turn 'ip routing', you must use static route (ip route) or dynamic routing protocols (ospf, eigrp, bgp, etc).

LondonCisco Fri, 10/28/2011 - 02:12

Hi Edison/Reza

Thanks.

Out of interest, do you know a command to show whether "ip routing" is turned off or on?

I have looked in the configuration and there is no entry - possibly because it is set to the default option. However, I would be interested in any "dynamic" show command that would return this information.

Regards

John

Correct Answer
kishore.chennupati Fri, 10/28/2011 - 05:28

Hi John,

I am not sure if they are any commands specifically to check if "ip routing" is enabled. But there are other ways to check if its enabled or not.

Simply put what "ip routing" does it to enable the routing table(RIB). There are other things it does but for now we just want to know how to chck if its enabled or not

++++ With ip routing

R1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

R1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#no ip routing                         <<< I remove ip routing here

R1(config)#end

R1#sh ip route                                       <<<< No routing table

Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface

ICMP redirect cache is empty

R1#

R1(config)#ip routing                                 <<<< I enable ip routing again

R1(config)#do sh ip route                           <<< shows the routing table

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

HTH

Regards,

Kishore

LondonCisco Fri, 10/28/2011 - 07:04

Hi Kishore

That does help alot. I understand what has happend on our two switches.

On the Catalyst 3750, IP Routing is disabled, hence when I do #show ip route, it gives the "Default Gateway" output.

On the Catalyst 4506, IP Routing is enabled, hence when I do #show ip route, it gives the routing table.

Therefore, my error, was that I was trying to set a default gateway when ip routing was enabled.

Thanks to all 3 of you (Edison, Reza & Kishore) as I now understand very well (I believe!) what happened plus I solved the problem!

Thanks

John

Actions

Login or Register to take actions

This Discussion

Posted October 27, 2011 at 8:48 AM
Stats:
Replies:9 Avg. Rating:5
Views:3000 Votes:0
Shares:0

Related Content

Discussions Leaderboard

Rank Username Points
1 14,997
2 8,150
3 7,720
4 7,078
5 6,710
Rank Username Points
200
80
59
57
57