cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
80137
Views
20
Helpful
10
Replies

Cant Ping a switch

jrhamilton1990
Level 1
Level 1

Hello, I am currently in school for Cisco so forgive me if I use the wrong terms or lingo. I am currently working on a "Case Study" for my final and I do not have anymore classes or I would asked the teacher. My problem is that I have 2 networks connected via a WAN Link. PC A can ping everything on the opposite network EXCEPT the Switches. I have configured the Vlan 1 port with an IP address/Subnet Mask and used the no shutdown command to make sure it is up. I can ping computers connected to the switch as well as a public web server connected to the switch, but I cannot ping the switch itself. Any ideas?

 

Thanks

1 Accepted Solution

Accepted Solutions

Hi,

Okay. A few questions though:

  1. From the switch, can you ping either 10.80.0.1, 10.80.0.2, or 10.83.255.254? This all should be possible.
  2. Did you configure a default gateway on your switch using the ip default-gateway 10.80.0.1 global level configuration command?

Best regards,
Peter

View solution in original post

10 Replies 10

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

A few questions and ideas to ponder over :)

  • You say you can ping the computers attached to the switch but you cannot ping the switch itself. You say you have assigned an IP address to the switch interface Vlan1. Are the computers also in VLAN 1, or are they in a different VLAN?
  • If the computers are in a different VLAN than VLAN1, is your routing configured so that it knows the IP network used in VLAN1 and how to reach it?
  • Did you configure the default gateway in VLAN 1 on the switch?
  • Can you ping the default gateway in VLAN 1 from the switch?

Feel welcome to ask further.

Best regards,
Peter

I would assume everything is in the same VLAN, we haven't covered Vlan's yet so I really do not know. I can say that I configured the VLAN port because it said to configure the Management Interface. The default gateway is configured on the attached router port and the attached PC NIC. Basically, I have the router interface of Fa0/0 10.80.0.1 and the Switch Vlan of 10.80.0.25. The computer attached to the switch has 10.80.0.2 all have the mask of 255.252.0.0. From the second network, I set static routes to go from Network 1 to Network 2 and vice versa. A PC in Network 1 can ping the PC in Network 2 with the 10.80.0.2 IP address and the attached web server with IP address 10.83.255.254 but the Switch can be pinged. I know the routes are correct because the ping to the PC works no problem. Just the switch is giving an issue.

Hi,

Okay. A few questions though:

  1. From the switch, can you ping either 10.80.0.1, 10.80.0.2, or 10.83.255.254? This all should be possible.
  2. Did you configure a default gateway on your switch using the ip default-gateway 10.80.0.1 global level configuration command?

Best regards,
Peter

I did not configure the ip default gateway on the switch. I didn't realize that I needed to since it was connected I thought it would just send it out to the router. That makes sense though. I will add the default gateway ip address and see what I get!

 

Thanks for the info!

Hi,

I didn't realize that I needed to since it was connected I thought it would just send it out to the router.

Why should it? The switch doesn't know who the router is unless you tell it :-)

Best regards,
Peter

Ha, that makes sense no that I think about it. Should I be able to ping from the switch without the default gateway set? So if I got this right (in my head), in theory I am hitting the switch with the Ping from the PC but since the switch does not know the default gateway it does not know how to send the ICMP Echo back to the PC therefore timing out on the ping?

Hi,

Should I be able to ping from the switch without the default gateway set?

Like with every host using the IP protocol, without the default gateway, your switch should be able to ping anyone in its own IP subnet but won't be able to ping anyone outside its own subnet.

So if I got this right (in my head), in theory I am hitting the switch with the Ping from the PC but since the switch does not know the default gateway it does not know how to send the ICMP Echo back to the PC therefore timing out on the ping?

Yes, that is correct.

Best regards,
Peter

Awesome that worked! Thank you I dont know why I couldnt figure it out but I think I was thinking that since it was directly connected to the router it didnt need the default gateway. Thanks again!!

Hi,

You are welcome! :)

Best regards,
Peter

That's odd. I would try to add a 'default static route' to the the switch & see if that works. Run the following command in Global-Configuration Mode: [ip route 0.0.0.0 0.0.0.0 10.80.0.1] - I would bet, the frames in the Native VLAN either don't know how to reach the other switch (within the same VLAN) or there is more than one vlan configured and the switch doesn't have the native vlan tagged and doesn't know what to do with those frames. (If the later is the case, you could add (under interface-config mode [switchport trunk native vlan x]. I would also ensure your running 802.1q trunking and not ISL trunking (which some switches might default to, if trunking between 2 x Cisco Switches). Let me know how you make out. Best Regards! 

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:

Review Cisco Networking products for a $25 gift card