Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Switch and Ping question

Say you have one layer 2 switch that has 3 vlans configured on it. You have two PCs connected to the switch on access ports, each in a different VLAN. Without a layer 3 device, the pc's cannot ping each other (obviously). However, the switch has an IP configured in the 3rd vlan (management vlan.) Can you successfully ping the PC's from the switch? Why?

You input is appreciated!

-Chris

2 ACCEPTED SOLUTIONS

Accepted Solutions
Green

Re: Switch and Ping question

With no layer three process (router or L3 switch), you would not be able to ping a PC or other device in any VLAN other than the management VLAN.

If the switch has no IP address info configured, you wouldn not be able to IP ping anything anywhere ... with no IP address, you have no identity on the network.

A layer two switch doesn't need or use an IP address for anything other than management.

Good Luck

Scott

Re: Switch and Ping question

Hi,

You got it right, but the switch must have a management IP to be used as the source of the ICMP echo packet without it, the switch won't ping.

To prevent any confusion what i meant with this paragraph:

"but if you are using "ip default-gateway x.x.x.x" on the switch then your router (default-gateway) can do the routing for you between the different subnets and thus the switch will be able to ping all the PCs."

I didn't mean that this will do inter-VLAN routing i meant that if an external router is doing inter-VLAN routing, the switch management can now ping PCs in another VLAN using the default-gateway.

HTH, please do rate all helpful replies using the scroll box on the right,

Mohammed Mahmoud.

4 REPLIES

Re: Switch and Ping question

Hi,

Ordinary you shouldn't be able to ping except the PCs in the same management VLAN, but if you are using "ip default-gateway x.x.x.x" on the switch then your router (default-gateway) can do the routing for you between the different subnets and thus the switch will be able to ping all the PCs.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

New Member

Re: Switch and Ping question

Thanks for your reply!

OK, so without a layer 3 device you cannot ping from the switch (via console or telnet) to a pc coming directly off the switch in a different vlan?

What about if you have a layer 2 switch with only one vlan configured on it. You have a pc connected via an access port. The switch does not have an IP address. If you are consoled into the switch, can you ping the pc? (My confusion behind this is the source IP in the ICMP echo request packet.)

Thanks!

Green

Re: Switch and Ping question

With no layer three process (router or L3 switch), you would not be able to ping a PC or other device in any VLAN other than the management VLAN.

If the switch has no IP address info configured, you wouldn not be able to IP ping anything anywhere ... with no IP address, you have no identity on the network.

A layer two switch doesn't need or use an IP address for anything other than management.

Good Luck

Scott

Re: Switch and Ping question

Hi,

You got it right, but the switch must have a management IP to be used as the source of the ICMP echo packet without it, the switch won't ping.

To prevent any confusion what i meant with this paragraph:

"but if you are using "ip default-gateway x.x.x.x" on the switch then your router (default-gateway) can do the routing for you between the different subnets and thus the switch will be able to ping all the PCs."

I didn't mean that this will do inter-VLAN routing i meant that if an external router is doing inter-VLAN routing, the switch management can now ping PCs in another VLAN using the default-gateway.

HTH, please do rate all helpful replies using the scroll box on the right,

Mohammed Mahmoud.

216
Views
5
Helpful
4
Replies