PING between 2 different subnets

sw
I have H1 and H2 in 2 different subnets (10.1.1.1/24 and 10.1.1.2/8)
on the Switch I put all its interfaces in Vlan1

I can ping from 10.1.1.1 to 10.1.1.2 even though they are in different subnets

Can someone explain this. I thought I will need a router to be able to ping between 2 different subnets
jskfanAsked:
Who is Participating?
 
Kyle AbrahamsConnect With a Mentor Senior .Net DeveloperCommented:
I don't believe they are different subnets per se.

10.1.1.1/24 means it can talk to anything on 10.1.1.*
10.1.1.2/8 means it can talk to anything on 10.*.*.*

They see each other as being on the same network.

If it was 10.1.2.2 / 8 then it would definitely be on the different subnet, 10.1.1. couldn't talk to 10.1.2 but 10.1.2/8 could talk to 10.1.1
3
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
Expanding on what Kyle wrote:

10.1.1.1/24 is a subnet of 10.1.1.2/8, therefore traffic from 10.1.1.2/24 will work fine on 10.1.1.2/8.

A host on 10.1.1.1/24 can talk to anything on 10.1.1.* and so it sees 10.1.1.2 as belonging to its network.
A host on 10.1.1.2/8 can talk to anything on 10.*.*.* and can send traffic to 10.1.1.1/24, but any response from 10.1.1.1/24 would not be received by the host on 10.1.1.2/8 unless there was a router in between the two networks.
0
 
buckethead34Connect With a Mentor Commented:
Expanding a bit more...

10.1.1.2/8 includes ip addresses 10.0.0.1 through 10.255.255.255 so you have overlap. In order for them to be on different subnets you would need to have something like 10.1.2.1/24 and 10.1.1.1/24.

Those two subnets would include the following 10.1.2.1 - 255 (255 being broadcast) and 10.1.1.1 - 255 (again 255 being broadcast)
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Kyle AbrahamsSenior .Net DeveloperCommented:
A slight correction:
2 PC's in the same VLAN on different Subnets CAN IN FACT ping each other. They are in the same Layer 2 broadcast domain.
EG: You only need a switch, not a router.

Explination and Source:
https://learningnetwork.cisco.com/thread/28157
0
 
Paul MacDonaldDirector, Information SystemsCommented:
They're in the same broadcast domain, true, but they're on different networks (potentially), so they won't see each other unless there's a router in between.
0
 
jskfanAuthor Commented:
2 PC's in the same VLAN on different Subnets CAN IN FACT ping each other. They are in the same Layer 2 broadcast domain.

I verified this...not true. if they are in different subnets the same VLAN , they cannot ping each other.
0
 
jskfanAuthor Commented:
Kyle Abrahams
Thanks for clarifying that
10.1.1.1/24 means it can talk to anything on 10.1.1.*
10.1.1.2/8 means it can talk to anything on 10.*.*.*
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
If the PC is setup with a route (Eg: put in the routing table) you can have them talk thru the L2 switch without a router.
0
 
jskfanAuthor Commented:
Thank you Guys
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.