Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Subneting Tricks
post Mar 3 2005, 10:13 AM
Post #1

I Eat C Code for Breakfast

Group: Members
Posts: 276
Joined: 9-November 04
From: Canada Ontario
Member No.: 4,136

Hi I need a trick to figuring out subnets.

Gentoo ROCKS!!!!! Go and emerge the world
Go to the top of the page
+Quote Post
post Mar 3 2005, 12:15 PM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165

I normally just pick one, but apprently that is the rong way to go about it...

Both and can be used on private networks using weither the 10.0.x.x or the 192.168.x.x ip ranges


Fixed your problem? Let us know! Online Event Management
Go to the top of the page
+Quote Post
post Mar 3 2005, 12:31 PM
Post #3

RMS is my Hero

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404

I think what he is asking is: Is there a way to look at an IP address, and figure out it's subnet mask?

*Points finger at the author above him* They're a witch! Burn them!
Vist my website!
Join me in IRC! Server: Channel: #UnhandledExceptions
Go to the top of the page
+Quote Post
post Mar 3 2005, 10:09 PM
Post #4

Whats this Lie-nix Thing?

Group: Members
Posts: 10
Joined: 23-February 05
Member No.: 4,691

This is quite a complicated subject, but i happen to know about it so i will try to explain.. ive been using linux for about 2 years now seriously and i love it, so anything i can do to help i feel great about smile.gif

OK.. When we look at a subnet mask like, what we are looking at is really the "mask" which seperates the NETWORK addresses from the HOST addresses.. so say my IP is and i have a "24 bit" subnet mask ( then i am the first host (1), on the network.

If we take apart the subnet mask and look at the binary equivalent, we will see it looking like this:

11111111.11111111.11111111.00000000 because is all on, on the first 3 octets and all off on the last.. so here it is easy to see the network side and the host side because they are clearly seperated not only by 1's and 0's but also by the octed they are contained within. If you are on a different network say which is separated by a router you wont be able to communicate with it unless you use static routes or a dynamic routing protocol like RIP.

When you "subnet" you look to take a portion of either the network addresses or the host addresses and turn them into host or network addresses respectivly... in pracitce what this means is this:

if i have a subnet mask of we have to look at the binary to work out where the network addresses end and the host addresses start.. lets look at that now: is equal to 11111111.11111111.11000000.00000000
notice where the 1's end is where the network addresses stop and host addresses start.

Basically we have pinched an extra 6 bits for our host addresses from the subnet mask.. which is equated to 6 to the power of 2 extra host addresses smile.gif yippie so we can have more hosts on our new subnet of ,,

Thats basically it, you have to watch out tho becase you wont be able to have a host called 192.168.63.*** because the second from last octet on the subnet mask would then be 255 and it wouldnt work see here: is 11000000.10101000.00111111.00001100
and your subnet mask is 11111111.11111111.11000000.00000000

see how the 1's join up in the second from last octet and will confuse it and think its doing something else.. which i cant remember right now.. too much beer probably but i think it will be trying to broadcast

OH in response to the real question which i just realised, yes you can work out the subnet mask for some addresses.. these are typically private and go like this..

Class A addresses have subnet mask of and first byte value from 1-127 so any address starting with say will be class A

Class B addresses have subnet mask of and first byte(octet) value 128-191

and Class C which have subnet mask of and range from 192 - 223 so the ones you'll recognise are or summut and that would be class C

As far as the internet goes, your ISP will sort out all the subnetting for you.. it can get QUITE complicated... look for more in depth guides from M$ or try some TCP/IP books

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 23rd March 2018 - 07:34 PM