Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I new to Cisco networking. I am trying out a simple Network. I connected 3 PCs to a Switch.

PC A --> VLAN 10  ip address of PC A
PC B --> VLAN 20  ip address of PC B
PC C --> VLAN 30  ip address of PC C

Now, i am hoping to telnet to the switch from PC C.

I opened the Switches CLI and typed;

>conf t
> int vlan 30
>ip address

WHen i tried to ping from PC c (which is ip I get the following message (Which i believe is wrong)

Pinging with 32 bytes of data:

Reply from Destination host unreachable.
Reply from Destination host unreachable.
Reply from Destination host unreachable.

But, when i change the ip address on the switch to, and ping from PC C it works.

1.) Why is this ? (So is it because, we need to have it in the same network)

2.) I wan to be able to PING from all the PCs (PC A, PC B and PC C). How can i do it ?

share|improve this question
up vote 4 down vote accepted

Each PC and corresponding VLAN interface must be in the same subnet. The PC will also need to have a default gateway set to point to the IP address of the switch.

You need to think about this from the perspective of routing tables. Nodes consult their routing table to figure out where to transmit data. Here's an example using /24 masks since you didn't specify the subnet masks above.

PC A: (/24 means without a default gateway set will have only a few entries in it's routing table. The first will be since its on the machine itself, the other will The PC interprets this to mean it doesn't have to go anywhere else to reach it can reach those addresses on the interface you set the IP on. Now... once you add a default gateway (which must be on a network you are CONNECTED to), then you'll have an entry for to

To make your entire network function, this is how you'd do it:


PC A: default gateway

PC B: default gateway

PC C: default gateway





The switch should not need a default gateway or any other routes set. If it's a Cisco switch, do not forget the command "ip routing" or the switch will not perform inter-vlan routing.

EDIT: Also, if it helps you comprehend a little better, someone once summed this up in a way that made everything click for me when I kept asking "why do we we need subnets". His simple answer was "So the damn routers know what to do!"

As a homework assignment, you should read and digest this information: How does IPv4 Subnetting Work?

share|improve this answer
thanks joe... not enough coffee :) – SpacemanSpiff Nov 23 '12 at 20:24
Thank you for the explanation. I'll also try the homework assignment. – sharon Hwk Nov 23 '12 at 20:32
Spaceman - Glad to help... – joeqwerty Nov 23 '12 at 20:50

In order to remotely manage a switch you will need the following configured.

Within the same subnet: (1) an Ip address (2) login and password on the vty lines

Outside the local subnet: (1) an Ip address (2) default GW (3) login and password on the vty lines

Now, when you attempt to login to the switch, what do you receive? If possible post the ping/trace and telnet login captures. Are you trying to connect from the router? From a PC within the same subnet or outside this subnet?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.