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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Paul MacDonaldDirector, 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
buckethead34Commented:
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
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switch

From novice to tech pro — start learning today.