cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
570
Views
30
Helpful
14
Replies

Can't ping switches over routers.

YazeedAshrafi
Beginner
Beginner

I did all configuration right.

no default gateway in the switches

 

 

1 Accepted Solution

Accepted Solutions

Ah, although your diagram uses symbols for L2 switches, I did wonder if they were L3 switches when you mentioned routing on them.

As @MHM Cisco World notes, you likely need to enable IP routing so you can route.  (BTW, "likely" because on small Cisco L3 switches, often IP routing is off by default, but on large Cisco L3 switches, often IP routing is on by default.)

As @MHM Cisco World also notes, your default static route statement, on sw9 is incorrect.  It should be:

ip route 0.0.0.0 0.0.0.0 12.0.0.105

I.e. the next hop for all your switches should be the directly connected router interface's IP.

Additionally, if R2 is representative of all your routers, they all will need the correct static route statements.

Basically, you need a static route statement for any network that's not on a directly connected router interface.  In some situations, a default route statement can be used (as it can be used on the switches).  For example, R1 and R3 only need a default static route statement using R2's interface IP that connects to them.  R2, though, needs either a static route statement for each network on the "far side" of R1 and R3, or it could also use a default route statement in lieu of one or more of those individual route statements, e.g. a default route statement directly toward R1 would replace the two route statements needed for the two "far side" networks.

Making these noted changes should get your pings to work, but there are other "improvements" that might be made to your configs.  Also, rather than using static route statements, you could use a dynamic routing protocol.

View solution in original post

14 Replies 14

Georg Pauwen
VIP Master VIP Master
VIP Master

Hello,

what is the context of your question ? Do you have a network topology, configurations ?

Joseph W. Doherty
Hall of Fame Master Hall of Fame Master
Hall of Fame Master

"Can't ping switches over routers." and "I did all configuration right."

Laugh, well when things don't work, often the most common causes is something (or somethings) isn't (aren't) configured correctly.

"no default gateway in the switches"

That may, or may not, be relevant.  Without (much) more information, cannot suggest why you "Can't ping switches over routers."

in the switches I create vlan and trunk , ip route.

in the routers I create ip in between the routers and, routers and switches sub interfaces. 

Capture1.PNG

 

Ah, that diagram is helpful.

Could you provide attachments of vIOS2's and Switch9's configs?

Could you also clarify, an example, of a ping that doesn't work?   I.e. being done on/from what device, and what address is being pinged?  (Ideally using devices vIOS2 and Switch9.)

Please find the attached file.

 

add only ip routing to switch and it will work 

also you config next-hop in static route that out range of VLAN30 subnet ? this must be correct 

12.0.0.97 - 12.0.0.126

I have write the ip routing, and change the VLAN 30 IP's subnet ... still the same no ping to the VLAN 30 IP and no default gateway.

 

Show me config of sw

Ah, although your diagram uses symbols for L2 switches, I did wonder if they were L3 switches when you mentioned routing on them.

As @MHM Cisco World notes, you likely need to enable IP routing so you can route.  (BTW, "likely" because on small Cisco L3 switches, often IP routing is off by default, but on large Cisco L3 switches, often IP routing is on by default.)

As @MHM Cisco World also notes, your default static route statement, on sw9 is incorrect.  It should be:

ip route 0.0.0.0 0.0.0.0 12.0.0.105

I.e. the next hop for all your switches should be the directly connected router interface's IP.

Additionally, if R2 is representative of all your routers, they all will need the correct static route statements.

Basically, you need a static route statement for any network that's not on a directly connected router interface.  In some situations, a default route statement can be used (as it can be used on the switches).  For example, R1 and R3 only need a default static route statement using R2's interface IP that connects to them.  R2, though, needs either a static route statement for each network on the "far side" of R1 and R3, or it could also use a default route statement in lieu of one or more of those individual route statements, e.g. a default route statement directly toward R1 would replace the two route statements needed for the two "far side" networks.

Making these noted changes should get your pings to work, but there are other "improvements" that might be made to your configs.  Also, rather than using static route statements, you could use a dynamic routing protocol.

I want to clarify my self, now the Switch9 having default gateway but if I ping from vIOS2 to switch9 on VLAN 30, ip 12.0.0.107 not working.

and for vIOS2 how I put the ip route?

last thing... I have to create the same ip route as for all the switches  ip route 0.0.0.0 0.0.0.0 12.0.0.0.5 or everyone for it's next hop ?