Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Cisco Catalyst 4506: Default Gateway doesn't work

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

Everyone's tags (2)
3 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Bronze

Re: Cisco Catalyst 4506: Default Gateway doesn't work

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.

VIP Super Bronze

Cisco Catalyst 4506: Default Gateway doesn't work

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

Re: Cisco Catalyst 4506: Default Gateway doesn't work

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

9 REPLIES
Hall of Fame Super Bronze

Re: Cisco Catalyst 4506: Default Gateway doesn't work

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.

New Member

Cisco Catalyst 4506: Default Gateway doesn't work

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

VIP Super Bronze

Cisco Catalyst 4506: Default Gateway doesn't work

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

New Member

Cisco Catalyst 4506: Default Gateway doesn't work

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

Hall of Fame Super Bronze

Cisco Catalyst 4506: Default Gateway doesn't work

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).

New Member

Cisco Catalyst 4506: Default Gateway doesn't work

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

Re: Cisco Catalyst 4506: Default Gateway doesn't work

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

New Member

Re: Cisco Catalyst 4506: Default Gateway doesn't work

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

Re: Cisco Catalyst 4506: Default Gateway doesn't work

Hi John

Glad I could be of help

5990
Views
5
Helpful
9
Replies