cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
700
Views
0
Helpful
2
Replies

Subnetmask concept

sakthicisco
Level 1
Level 1

Hi evybdy,

I hav small confusion regarding subnetmask usage to allow access to particular range and to other range no access.Below here is an example...Iam confused that control device with a mask of 255.255.248.0,IP address range 10.5.0.1 to 10.5.3.253 and a pc with mask 255.255.252.0 ,IP address range 10.5.0.1 to 10.5.3.253.why cant they speak between them?as they r in the same IP range but diffrent subnet mask?can anybody detail this...

"Any device with a subnet mask of 255.255.248.0 can communicate with any IP address anywhere in the range 10.5.0.1 through to 10.5.7.254, however, the devices with a subnet mask of 255.255.252.0 can only communicate with devices with an IP address that is in the same half of the smaller subnet range. In this way, a server with a 255.255.248.0 mask and IP address in the range 10.5.4.1 through to 10.5.7.253 can communicate with a control device with a mask of 255.255.248.0 mask and IP address in the range 10.5.0.1 through to 10.5.3.253, but a Station with a mask of 255.255.252.0 and IP address in the range 10.5.0.1 through to 10.5.3.253 cannot."

I wud appreciate if i get a response as early as possible...

Thankyou in advance...

2 Replies 2

Jon Marshall
Hall of Fame
Hall of Fame

Hi

A control device with an IP address between 10.5.0.1 and 10.5.3.253 with a subnet mask of 255.255.248.0 CAN talk to a PC with an IP address between the range 10.5.0.1 and 10.5.3.253 with a subnet mask of 255.255.252.0.

Where the machines cannot talk is, using the same subnet masks as above, the control machine has an IP address in the range 10.5.4.1 through 10.5.7.253. This is because when the PC tries to reply to the Control machine it compares the Control machine IP address with it's own subnet mask ie.

Control machine = 10.5.6.1 255.255.248.0

Pc = 10.5.2.1 255.255.252.0

The PC compares 10.5.6.1 against it's subnet mask and realises that Control machine is not on the same network so it has to send it to it's default gateway. This is why it would not work.

Hope this makes sense

Jon

paul.matthews
Level 5
Level 5

Right, the mask detrmines how much of the address indicates the network. I suspect a phrase like "without the use of a router" is potentially missing off the "cannot access" statements.

One of my little shortcuts with mashs is to subtract the mask from 256 to look at the increments.

In this case the intesting octet is 248 or 252. They give 8 and 4 respectively. With a natwork 10.5.0.0 that means:

10.5.0.0 255.255.248.0 -> 10.5.0.0 through 10.5.7.255

10.5.0.0 255.255.252.0 -> 10.5.0.0 through 10.3.7.255

That that means is that a host configured as 10.5.0.56 255.255.252.0 sees as local. It can talk to that address range (note I am including all the range including zero (network ID) and all ones (broadcast)) directly. Anything outside that range and it needs a router to get to them.

If you have another device 10.5.2.63 255.255.248.0 They can both talk to each other, as both devices think they are local.

Add a third on 10.5.5.42 255.255.252.0 and it can talk to the second device OK, it thinks the first is local, but the first thinks the third device is remote and needs a router to send traffic back.

HTH,

Paul.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card