[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1093
  • Last Modified:

Subnets and VLANs

I'm don't understand subnets and VLANs 100%, so I need a little bit of help. In the example below, the only thing that changed is the subnet mask on my WIN 7 PC.

My computer had the static IP settings below:
IP address: 10.0.64.4
Subnet: 255.255.255.0
Gateway: 10.0.64.1
DNS: 10.0.32.3

CAN ping anything in my own subnet/VLAN: DHCP scope=10.0.64.0, VLAN 640, range=10.0.64.3-14, router 10.0.64.1, subnet=255.255.255.240

CAN ping anything in: DHCP scope=10.0.24.0, VLAN 240, range=10.0.24.3 - 30, router = 10.0.24.1, subnet=255.255.255.224

CANNOT ping anything in: DHCP scope= 10.0.64.16, VLAN 642, range=10.0.64.19 - 30, router=10.0.64.17, subnet=255.255.255.240

CANNOT ping anything in: DHCP scope=10.0.64.32, VLAN 644, range=10.0.64.35-38, router=10.0.64.33, subnet=255.255.255.248

HOWEVER, when I changed my settings to allow DHCP to automatically get an IP, I had the settings below:

IP: 10.0.64.4
Subnet: 255.255.255.240
Gateway: 10.0.64.1
DNS: 10.0.32.3

With these settings I was able to ping ALL subnets/VLANs. The only thing that changed is the subnet mask. Why am I now able to (all of  sudden) ping all IPs.
0
pzozulka
Asked:
pzozulka
  • 3
  • 3
1 Solution
 
Don JohnstonInstructorCommented:
My computer had the static IP settings below:
IP address: 10.0.64.4
Subnet: 255.255.255.0
Gateway: 10.0.64.1

This means your computer thinks that it is on the 10.0.64.0/24 network. Which means that it expects that it is on the same network/broadcast domain/VLAN with devices that have IP addresses 10.0.64.1-254.

CAN ping anything in my own subnet/VLAN: DHCP scope=10.0.64.0, VLAN 640, range=10.0.64.3-14, router 10.0.64.1, subnet=255.255.255.240

Yep. Those device are within the range of addresses that your computer expects to see on it's network.

CAN ping anything in: DHCP scope=10.0.24.0, VLAN 240, range=10.0.24.3 - 30, router = 10.0.24.1, subnet=255.255.255.224

That's expected too. Those devices are seen as being on different networks so your PC will forward that traffic to the default-gateway which then routes the packets to the correct network.

CANNOT ping anything in: DHCP scope= 10.0.64.16, VLAN 642, range=10.0.64.19 - 30, router=10.0.64.17, subnet=255.255.255.240

That's expected too. You PC thinks those addresses are local. The problem is they're actually on different networks.

CANNOT ping anything in: DHCP scope=10.0.64.32, VLAN 644, range=10.0.64.35-38, router=10.0.64.33, subnet=255.255.255.248

Same as previous.

HOWEVER, when I changed my settings to allow DHCP to automatically get an IP, I had the settings below:

IP: 10.0.64.4
Subnet: 255.255.255.240
Gateway: 10.0.64.1

With these settings I was able to ping ALL subnets/VLANs. The only thing that changed is the subnet mask. Why am I now able to (all of  sudden) ping all IPs.

Now you are on the 10.0.64.0/28 network. Your PC thinks the only thing that's local is 10.0.64.1-14. Because it knows the 10.0.64.17 and higher addresses aren't local, it forwards those packets to the default-gateway.

Basically, when you had an address of 10.0.64.4/24, you had the incorrect mask.
0
 
pzozulkaAuthor Commented:
CANNOT ping anything in: DHCP scope= 10.0.64.16, VLAN 642, range=10.0.64.19 - 30, router=10.0.64.17, subnet=255.255.255.240


That's expected too. You PC thinks those addresses are local. The problem is they're actually on different networks.

OK so I understand that when i'm on a different network than another PC, it forwards packets to the default gateway, and the routers work things out.

However, when i'm on 10.0.64.0/24 network, I should be able to communicate with all PCs in the range of 10.0.64.1 - 254. So when a PC comes along with IP 10.0.64.25, it does fall into my IP range, and I should be able to ping it. I still don't understand why I am not able to.
0
 
Don JohnstonInstructorCommented:
However, when i'm on 10.0.64.0/24 network, I should be able to communicate with all PCs in the range of 10.0.64.1 - 254.  So when a PC comes along with IP 10.0.64.25, it does fall into my IP range, and I should be able to ping it.

ONLY if you are physically on the same network. In this case you have an IP address that says you're on the same network, but in reality, to get to those other addresses, you would have to go through a router to get there.  

An analogy would be
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
pzozulkaAuthor Commented:
I think your last post was cut off.
0
 
Don JohnstonInstructorCommented:
No. I was thinking of an analogy but it didn't jell. :-(
0
 
pzozulkaAuthor Commented:
:) sounds good. It made sense either way.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now