10-27-2011 08:48 AM - edited 03-07-2019 03:05 AM
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
Solved! Go to Solution.
10-27-2011 08:52 AM
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.
10-27-2011 09:49 AM
Hi John,
I don't see ip default-gateway in the command reference guide for the version you are using
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
10-28-2011 05:28 AM
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
10-27-2011 08:52 AM
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.
10-27-2011 09:27 AM
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
10-27-2011 09:49 AM
Hi John,
I don't see ip default-gateway in the command reference guide for the version you are using
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
10-27-2011 09:59 AM
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
10-27-2011 10:45 AM
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).
10-28-2011 02:12 AM
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
10-28-2011 05:28 AM
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
10-28-2011 07:04 AM
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
10-28-2011 07:29 AM
Hi John
Glad I could be of help
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide