Let's go.........RANDOM!

The place to hang out and talk about totally anything general.
User avatar
GreenRock
level4
level4
Posts: 512
Joined: Sun May 03, 2009 3:47 pm
Location: Triangulating...

Postby GreenRock » Tue Oct 25, 2011 4:37 am

jelco wrote:Example: 192.168.1.100/16. 16 divided by 8 is two, so the last two octets are the variable components of the address. That makes the base address 192.168.0.0.

Broadcast address: 192.168.255.255
Amount of addresses: 2^16 = 65 536
Next network: 192.169.0.0/16


I thought the broadcast address as such: all the bits in the variable portion of the address resolve to 1 (which is the same thing, of course. I just never thought it to be the last address, for some reason). But now I know I'm finding broadcast correctly.

I do remember something about 2^x.... Now I know! :D

Additionally your subnet mask is 255.255.0.0, and I'd guess your gateway is 192.168.0.1. (Note that the gateway and broadcast address are not standardized and can be different, but a gateway is rarely different from the base address + 1 and the broadcast is even more unlikely to differ from its default of last address.) Subnet masks are nothing more than bitmasks, and have a 1 for a bit that's 'static' within the subnet (always the same for every address) and a 0 for every 'variable' bit. Since the last two octets are variable in /16s, the first two are static. This converts to 255.255.0.0.


I thought the base address +1 would give the first usable host? Is the first usable host, therefore, gateway +1? Anywho, you have confirmed my findings of subnet masks :D

Subnets that use entire octets are easy to work with (/8, /16 and /24); most confusing elements kick in at in-between range sizes. A nice example is the student-range of my Uni's address space. My own PC for example is 130.89.161.14, and I happen to know the network is a /20. With 32-20=12 variable bits there's 1.5 octet we can designate as 'variable'. A bit of binary maths and you end up with these details:

Base address: 130.89.160.0
Broadcast address: 130.89.175.255
Amount of addresses: 2^12 = 4096
Next Network: 130.89.176.0/20
Subnet mask: 255.255.240.0
Gateway: 130.89.160.1
Jelco


I just remember that the the prefix for the last octet is /24. If something like /26 or /22 pops up (which is usually the case), I just add or subtract the corresponding bits. All this 1.5 of an octet is confusing <_>. Again, it's just another way of looking at it.

Next network: increment the last non-variable bit of the network prefix, and use the same amount of bits.


I think this is my only real problem. What if, hypothetically, the network looked something like this:

192.89.224.0/19

what would the next network be? There isn't a last static bit to increment with that prefix and that address. As for the last usable host, it's broadcast address -1, I hope.
I appreciate the help.
User avatar
jelco
level5
level5
Posts: 6018
Joined: Sat Feb 18, 2006 7:45 am
Location: Cygnus X-1
Contact:

Postby jelco » Tue Oct 25, 2011 12:32 pm

GreenRock wrote:I thought the base address +1 would give the first usable host? Is the first usable host, therefore, gateway +1?

Technically, the gateway is a host on the network. All routers (and managed switches) have their own address on the network for the exact purpose of being a gateway. So yes, the gateway address is the first usable address for a host; as far as non-routing equipment goes, the first usable address in use tends to be either gateway + 1 or starting from xxx.xxx.xxx.10 or something like that (with other addresses in the lower numbers reserved for e.g. nameservers and other networking material). There's too many variables in real-life applications to say for sure, but I guess in your case sticking to the base address + 1 is a correct answer for 'first usable host'.

GreenRock wrote:I think this is my only real problem. What if, hypothetically, the network looked something like this:

192.89.224.0/19

what would the next network be? There isn't a last static bit to increment with that prefix and that address. As for the last usable host, it's broadcast address -1, I hope.
I appreciate the help.

There's always a last static bit, it just may not be that obvious if it's in decimal representation. Hence, gogo conversion!

Code: Select all

192.89.224.0 = 11000000 01011001 11100000 00000000

Since it's a /19, you need to increment the 19th bit:

Code: Select all

11000000 01011001 11100000 00000000
00000000 00000000 00100000 00000000
----------------------------------- +
11000000 01011010 00000000 00000000


And then you convert back:

Code: Select all

11000000 01011010 00000000 00000000 = 192.90.0.0


A different way of seeing this is looking at what happens in the third octet. Basically the last 5 bits are variable in a /19.

Code: Select all

00011111 = 31

Note that 224 (the value of the third octet in the base address) + 31 (the maximum increase) = 255 (the maximum value an octet can have). Hence you need to increase the second octet to get to the next base address. Yet another version:

Code: Select all

224 = 11100000

That's the 3 most significant bits in the third octet. Since all other bits in the octet are variable, the increase must be made in the more significant octet, the second one.)

To be honest, this is the kind of thinking I do subconsciously with this kind of calculations, since it's a lot easier to do without a piece of paper or a calculator. It's also what you actually do when calculating with full octets: in a /24 there's no static bit in the fourth octet left to increase (since there's no static bits at all), so the increase must be made in the third. Don't use this kind of explanation too much in networking classes though, since not every professor approves of it (real-life experience isn't good enough or something).

Jelco
User avatar
Feud
level5
level5
Posts: 5149
Joined: Sun Oct 08, 2006 8:40 pm
Location: Blackacre, VA

Postby Feud » Wed Oct 26, 2011 10:51 pm

Yay! The company that I've been on long term assignment to offered me a permanent job. Same work, but big raise and full benefits. This makes me happy.
User avatar
GreenRock
level4
level4
Posts: 512
Joined: Sun May 03, 2009 3:47 pm
Location: Triangulating...

Postby GreenRock » Fri Oct 28, 2011 6:50 am

Well Jelco, I took the damned test and scored a 67. My average came out to a solid 82 for the 9 week grading period. S'alright, if you ask me.
Jordy...
level5
level5
Posts: 2367
Joined: Tue Jun 30, 2009 7:57 pm

Postby Jordy... » Fri Oct 28, 2011 2:29 pm

Feud wrote:Yay! The company that I've been on long term assignment to offered me a permanent job. Same work, but big raise and full benefits. This makes me happy.


I'm happy for you, keep up the good work!
User avatar
Feud
level5
level5
Posts: 5149
Joined: Sun Oct 08, 2006 8:40 pm
Location: Blackacre, VA

Postby Feud » Fri Oct 28, 2011 10:38 pm

Thank you!
Jordy...
level5
level5
Posts: 2367
Joined: Tue Jun 30, 2009 7:57 pm

Postby Jordy... » Sat Oct 29, 2011 3:21 pm

User avatar
jelco
level5
level5
Posts: 6018
Joined: Sat Feb 18, 2006 7:45 am
Location: Cygnus X-1
Contact:

Postby jelco » Thu Nov 03, 2011 11:27 am

Jezus, one spammer can do quite a bit of damage it seems.

* swipes the forum with a flamethrower *

Jelco
"The ships hung in the sky much the same way that bricks don't."
- Douglas Adams
Jordy...
level5
level5
Posts: 2367
Joined: Tue Jun 30, 2009 7:57 pm

Postby Jordy... » Thu Nov 03, 2011 11:57 am

How nice of you to leave my nercomancy topic! But now it doesn't make no sense anymore, so you might as well remove it..
User avatar
Xarlaxas
level5
level5
Posts: 1525
Joined: Sat Apr 15, 2006 4:48 pm
Location: Edinburgh
Contact:

Postby Xarlaxas » Thu Nov 03, 2011 2:21 pm

How about new poster moderation? That should stop most of the spammers before anyone sees them.
Jordy...
level5
level5
Posts: 2367
Joined: Tue Jun 30, 2009 7:57 pm

Postby Jordy... » Thu Nov 03, 2011 8:18 pm

But I like spammers, they bring live to these forums!
User avatar
Feud
level5
level5
Posts: 5149
Joined: Sun Oct 08, 2006 8:40 pm
Location: Blackacre, VA

Postby Feud » Fri Nov 04, 2011 5:37 am

With November upon us, the most wonderful time of the year is quickly approaching... when I decide which gun to buy with my tax return.

The next several months will be filled with research, questions, pondering, and debate. Long guns or pistols, calibers and capacities, bells vs. whistles, so much to consider! Let the season commence!
Jordy...
level5
level5
Posts: 2367
Joined: Tue Jun 30, 2009 7:57 pm

Postby Jordy... » Fri Nov 04, 2011 9:39 am

I saw this gun on mythbusters, is was a revolver for hunting purposes and that gun was just a sheer hand-cannon, it blew someones thumb of because gasses escaped from the chamber and he was apperently holding the gun the wrong way. Otherwise good gun though, good stopping power I imagine might someone come into your home
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Fri Nov 04, 2011 6:36 pm

Feud wrote:With November upon us, the most wonderful time of the year is quickly approaching... when I decide which gun to buy with my tax return.

The next several months will be filled with research, questions, pondering, and debate. Long guns or pistols, calibers and capacities, bells vs. whistles, so much to consider! Let the season commence!

Nobody cares about your peni---gun.

xander
User avatar
Feud
level5
level5
Posts: 5149
Joined: Sun Oct 08, 2006 8:40 pm
Location: Blackacre, VA

Postby Feud » Sat Nov 05, 2011 4:10 am

That's what makes it random.

And don't project your inferiority complex on me. I'm comfortable with how I am, I encourage you to be as well. :wink:

Return to “Introversion Lounge”

Who is online

Users browsing this forum: No registered users and 8 guests