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.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Subneting Tricks
docmur
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
DS2K3
post Mar 3 2005, 12:15 PM
Post #2


Its GNU/Linuxhelp.net
*******

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 255.0.0.0 and 255.255.255.0 can be used on private networks using weither the 10.0.x.x or the 192.168.x.x ip ranges

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post
Termina
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?

http://www.j51.com/~sshay/tcpip/ip/ip.htm


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
crazydark
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 255.255.255.0, what we are looking at is really the "mask" which seperates the NETWORK addresses from the HOST addresses.. so say my IP is 192.168.0.1.. and i have a "24 bit" subnet mask (255.255.255.0) then i am the first host (1), on the 192.168.0.0 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 255.255.255.0 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 192.168.1.0 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 255.255.192.0 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:

255.255.192.0 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 255.255.255.0 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 255.255.192.0 ,,

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:

192.168.63.12 is 11000000.10101000.00111111.00001100
and your subnet mask is 255.255.192.0 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 255.0.0.0 and first byte value from 1-127 so any address starting with say 128.24.12.12 will be class A

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

and Class C which have subnet mask of 255.255.255.0 and range from 192 - 223 so the ones you'll recognise are 192.168.0.2 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

smile.gif
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: 16th December 2017 - 03:49 PM