cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10606
Views
10
Helpful
9
Replies

Cisco Catalyst 4506: Default Gateway doesn't work

LondonCisco
Level 1
Level 1

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

3 Accepted Solutions

Accepted Solutions

Edison Ortiz
Hall of Fame
Hall of Fame

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.

View solution in original post

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

View solution in original post

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

View solution in original post

9 Replies 9

Edison Ortiz
Hall of Fame
Hall of Fame

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.

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

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

LondonCisco
Level 1
Level 1

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

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

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

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

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

Hi John

Glad I could be of help

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: