ProSoundWeb Community

Please login or register.

Login with username, password and session length
Advanced search  

Pages: [1] 2  All   Go Down

Author Topic: question about IP address range  (Read 5347 times)

Keith Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3667
  • Toronto
question about IP address range
« on: November 16, 2016, 07:03:45 AM »

When creating a LAN, I understand that the devices need to be in the same IP address rangeto be available to the network.
I thought that meant something like 192.168.1.x. First 3 positions the same and the last is variable.
However, when I see the IP addresses that are handed out in a DHCP network of Sennheiser wireless receivers, or devices on a Dante network,the addresses are something like 192.168.x.x where the last 2 positions are different.

So, the question is, does a LAN common IP address require the first 3 positions to be the same or just the first 2?
Logged
I don't care enough to be apathetic

Johannes Halvorsen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 150
Re: question about IP address range
« Reply #1 on: November 16, 2016, 07:07:49 AM »

It depends on the network mask:

If the network mask is set to 255.255.0.0 192.168.1.1 and 192.168.2.1 is on the same net. If it is set to 255.255.255.0 they are on different nets.
Logged

Johannes Halvorsen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 150
Re: question about IP address range
« Reply #2 on: November 16, 2016, 07:16:03 AM »

The logic behind this is that the mask is bitwise or'ed with the address:
192.168.1.1 =11000000.10101000.00000001.00000001

255.255.255.0 = 11111111.11111111.11111111.00000000


11000000.10101000.00000001.00000001 | 11111111.11111111.11111111.00000000 = 11111111.11111111.11111111.00000001

The first 3 bytes all become 255.
Logged

Erik Jerde

  • Classic LAB
  • Hero Member
  • *
  • Offline Offline
  • Posts: 1400
Re: question about IP address range
« Reply #3 on: November 16, 2016, 10:48:28 AM »

Netmask indicates which part of the address is network and which is host (aka a device).  Net masks are commonly seen as 255 in the octets but can be other numbers too.  Mask is important because that's how a host knows if the address it's trying to communicate with is local.  If it isn't local then it sends that traffic to the network gateway.  The gateway is a router that then knows where the next best hop
Is for the traffic.  Repeat till you reach the destination.
Logged

Keith Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3667
  • Toronto
Re: question about IP address range
« Reply #4 on: November 16, 2016, 11:10:05 AM »

It depends on the network mask:

If the network mask is set to 255.255.0.0 192.168.1.1 and 192.168.2.1 is on the same net. If it is set to 255.255.255.0 they are on different nets.
Of course! DOH!
Sometimes I just don't think.... :-[
Logged
I don't care enough to be apathetic

Keith Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3667
  • Toronto
Re: question about IP address range
« Reply #5 on: November 16, 2016, 11:10:46 AM »

The logic behind this is that the mask is bitwise or'ed with the address:
192.168.1.1 =11000000.10101000.00000001.00000001

255.255.255.0 = 11111111.11111111.11111111.00000000


11000000.10101000.00000001.00000001 | 11111111.11111111.11111111.00000000 = 11111111.11111111.11111111.00000001

The first 3 bytes all become 255.
Thanks but TMI  :o
Logged
I don't care enough to be apathetic

David Buckley

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 565
Re: question about IP address range
« Reply #6 on: November 20, 2016, 04:23:32 PM »

Thanks but TMI

You might find this tool a bit more helpful, or perhaps, even more confuzzling!  If you set the IP address to 192.168.1.0, and the subnet mask to 25.255.255.0, then the address ranges and the like will all seem very familiar.  You can then change the subnet mask and see how the ranges alter.
Logged

Keith Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3667
  • Toronto
Re: question about IP address range
« Reply #7 on: November 21, 2016, 07:00:39 AM »

You might find this tool a bit more helpful, or perhaps, even more confuzzling!  If you set the IP address to 192.168.1.0, and the subnet mask to 25.255.255.0, then the address ranges and the like will all seem very familiar.  You can then change the subnet mask and see how the ranges alter.
Handy!
Thanks :)
I have been so stuck in the 192.168.1.x networks that I completely forgot about the effect of changing the subnet mask.
Shows what a little knowledge can lead to when trying to do something that requires more knowledge  :-[
Logged
I don't care enough to be apathetic

Scott Holtzman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 7567
  • Ghost AV - Avon Lake, OH
    • Ghost Audio Visual Systems, LLC
Re: question about IP address range
« Reply #8 on: November 22, 2016, 03:02:46 AM »

The logic behind this is that the mask is bitwise or'ed with the address:
192.168.1.1 =11000000.10101000.00000001.00000001

255.255.255.0 = 11111111.11111111.11111111.00000000


11000000.10101000.00000001.00000001 | 11111111.11111111.11111111.00000000 = 11111111.11111111.11111111.00000001

The first 3 bytes all become 255.


Johannes, I have been meaning to comment on this.  The subnet mask and destination IP are logically ANDed together not OR. 


The Boolean's of comparison:


AND (conjunction)- True if both bits are true (this and that)
OR - (disjunction) - True if either or both bits are true
XOR - (exclusionary disjunction) True if one or the other is true (this or that but not both)


I know that Keith said TMI and I am sure it seems that way but microprocessors are not floating point devices.  They are switches.  Stateful machines for a lack of a better word.  These groups of bits are called registers.  Back before silicon was cheap a 16 bit register was a very valuable resource.  The microprocessor machine language only speaks in these boolean primitives.  Returning a single bit based on the comparison of two registers. 


So when Mr. Metcalfe and his brilliant team designed IP addressing they used 4 octets.  Each was loaded from a stack and pop'd and pushed through the registers.  Pushing 4 - 16 bit integers through the registers was very quick.  This allowed super efficient address decoding in the driver stack.


Hexadecimal notation is just a simple way to represent these base 16 numbers (how people with 16 fingers count).  16 bits was a very common register size for the 8 bit microprocessors of the day when Ethernet was invented. 


The technology lasted a long time and we are only slowly moving to IPV6's vastly larger address space.











Logged
Scott AKA "Skyking" Holtzman

Ghost Audio Visual Solutions, LLC
Cleveland OH
www.ghostav.rocks

Johannes Halvorsen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 150
Re: question about IP address range
« Reply #9 on: November 22, 2016, 04:09:24 AM »

Hm. Does that make any sense..? It's been many years since I studied this, so I'll not claim I know this better than you, but could you take your time explaining why they are ANDed?

Looking at the last 8 bits with a mask of e.g. 255.255.255.0 and adresses ...1 and ...2:

00000001&00000000 = 00000000
00000010&00000000 = 00000000

Thus all addresses resolves to 0, don't they? That doesn't make any sense?

I thought I understood this...
Logged

ProSoundWeb Community

Re: question about IP address range
« Reply #9 on: November 22, 2016, 04:09:24 AM »


Pages: [1] 2  All   Go Up
 



Site Hosted By Ashdown Technologies, Inc.

Page created in 0.04 seconds with 24 queries.