cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
724
Views
0
Helpful
5
Replies

vlan

nizamshaikh2504
Level 1
Level 1

i have connected 3 pc to a switch without creating a vlan.

two pc having ip address 198.162.20.2 and 198.162.20.3 are pinging with each other but 3rd pc having ip address 125.25.30.2 is not pinging with anyone, why?

5 Replies 5

lespejel
Level 3
Level 3

Your switch by default has all ports assigned to same VLAN, then when your PC sends an ICMP echo request (ping) it will send firts an ARP request complete IP and MAC addresses pair information.

When PC a pings to PC B, the L2 broadcast is received by PB and then it replies adn PC A will know what's the IP address and MAC and it will send the echo request with complete MAC and IP information.

 

for PC C, PC A will match the IP address against its own and because it does not belong to same segment, PC A will send the request to its default gateway, which is not present in your example, so traffic is discarded from beggining because it's not a a local communication.

 

Even when they are directly connected, the logical addressing makes impossible to reach that host.

CCIE 52804

Francesco Molino
VIP Alumni
VIP Alumni

Hi

 

Based on your post, you assigned an IP address to 3 PCs and no gateway configured. and I bet you used /24 as subnet mask.

 

When PC1 (198.162.20.2) send a ping to PC3 (125.25.30.2), the PC will do some tests:

1. Does IP 125.25.30.2/24 is in the same network as me compary the first 3 bytes : Compare [125.25.30] to [198.162.20] (comparing only the 3 first bytes because the last one is for hosts for a /24). As the network is different, it has to send it to its gateway but it don't have any then the icmp is dropped by the switch because it don't know what do.

 

This is a small explanaition that I hope it helps.

 

PS: Please don't forget to rate and select as validated answer if this answered your question

 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

i have given the default gateway to all the pc still they are not pinging.

and it won't work until you correct teh ip addressing and all they belong to same network, or you configure secondary ip addresses in the default gateway to male communication possible from all 3 PC to the default gateway.

 

CCIE 52804

You have the solution of secondary IP that will work.
For a test (not recommended in production), just for learning how arp and this stuff works.
If you setup on your machines the gateway with its own IP address it will works (should be physical not virtual machines)

 

PS: Please don't forget to rate and select as validated answer if this answered your question


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question