cisco Switch question

when i do ip routing on my switch

ip route 0.0.0.0 0.0.0.0 to GW it doesnt work
but
when i do ip deafult gateway...it works and i can ping the GW

thoughts ?
c_hocklandAsked:
Who is Participating?
 
amprantiConnect With a Mentor Commented:
You have a layer 2 switch; you should use "ip deafult gateway X.X.X.X"

Which cisco switch you have ?
0
 
SergConnect With a Mentor system administratorCommented:
The "ip default-gateway" command is used to specify the default gateway when routing is not enabled. If routing is enabled ((config)#ip routing), the ip default-gateway command is unnecessary.
0
 
Nayyar HH (CCIE RS)Connect With a Mentor Network ArchitectCommented:
On a switch not capable of routing such as 2960, 2950 etc the "ip default-gateway" is required if you need to remotely manage the switch. On these type of switches the "ip routing" command has no bearing ( unsupported)
0
 
eeRootConnect With a Mentor Commented:
A layer 3 switch will use the "ip route" command while a layer 2 switch will need the "ip default gateway"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.