cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
447
Views
5
Helpful
4
Replies

Switch and Ping question

Neuromancer
Level 1
Level 1

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

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

View solution in original post

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.

View solution in original post

4 Replies 4

mohammedmahmoud
Level 11
Level 11

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.

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!

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

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.

Review Cisco Networking products for a $25 gift card