LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-02-2013, 09:47 PM   #1
keepStriving
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Rep: Reputation: Disabled
Subnetting practice


I find the topic of networking really interesting so have recently been trying to learn as much as I can about TCP/IP. I am now on the topic of subletting and am taking a lot in though was wondering are there any projects I can try to practice all that I have learnt about the topic?
Hopefully after being reasonably comfortable with subletting I can learn some application layer protocols.
 
Old 07-03-2013, 02:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Subnetting is just about basic maths really. What kind of project would you anticipate? learn to convert a netmask like 255.255.255.0 into the CIDR notation of /24 etc, learn the standard ranges for Class A, B, C, D etc. It's really just textbook stuff, not project.
 
Old 07-03-2013, 07:05 AM   #3
keepStriving
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
I wanted some practice in implementing it on a computer in some way.
 
Old 07-03-2013, 07:06 AM   #4
keepStriving
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
I've learnt all that you mentioned so far.
 
Old 07-03-2013, 07:06 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can always just create some virtual machines and some routing bridges and cut them up in funky ways I guess.
 
Old 07-04-2013, 05:59 PM   #6
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by keepStriving View Post
I wanted some practice in implementing it on a computer in some way.
Here is something that you might play with.

Most products ship with an IP address 192.168.1.N, where 'N' is some number.
You connect the product and then interact with it from workstation ...
(grin) because so many folks run their private networks in that same subnet.

You don't want to risk folks using this knowledge against you, so you move your private network to somewhere else, say 192.168.66.0. Once configured, all of your network parts work just find and DHCP delivers addresses in your now unique subnet.

Your challenge: Create the route table entries and firewall rules such that you might safely interact with a new product that uses 192.168.1.N without the need to tinker router, gateway, firewall or similar configuration.
Your product interaction should enable you to set it such that it will live on your different and unique subnet instead of its from-the-store subnet.

Cordialement,
~~~ 0;-Dan
 
Old 07-04-2013, 09:53 PM   #7
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Rep: Reputation: 5
Do you have an iPhone? There is an interesting game I liked playing (if you like math games) called the Binary Game by Cisco. It forces you to learn how to learn binary math quickly (y'know:1, 2, 4, 8, 16, 32, 64, 128, 256?). As you may have already learned, binary conversions are the long way of subnetting. Using this, and practicing what you've learned, you will find your own way of doing quick math on subnetting problems.

Let's see if you can wrap your brain around this:

192.168.1.98/30, what is the size of the subnet?

32 is the max, that is 1 address... 31 has 2 addresses... so 30 has 4 addresses... (1,2,4,8,etc...)

so, the possible subnets are in multiples of 4.

4 goes into 98 24 times, right? (with 2 left over)

Your address range is 192.168.1.95-99/30 [it is 95 and NOT 96 because 0 counts as well, as in 192.168.1.0]

How do you find the netmask using the same math? /30 is equal to 4 addresses, right?

Subtract 4 from 256 and that's your answer.

192.168.1.95-99/32
255.255.255.252

I couldn't tell you why you don't subtract 4 from 255 instead of 256... but if you do your answer'll be wrong.

Hope that helps.

Feel free to improve the answer if I have mistyped anything.
 
Old 07-05-2013, 03:15 PM   #8
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
The possible range of addresses is inclusive of 0. 0-255 = 256 possible values, hence dotted mask always equals 256 - block size.

e.g. For a block of 64 ~ 256 - 64 = 192 so .192.
 
Old 07-06-2013, 05:18 PM   #9
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Rep: Reputation: 5
Was that a post to mine, Pete, about not knowing why the subnet is an even number? If so: what I don't understand is, if the CIDR mask (/30) is equal to 4 addresses and the correct netmask is 252, but we are using an included 0 and 255 as the highest, why would I subtract from 256 and not 255. Funny thing is, I understand how to do the math on it, regardless of the understanding as to why!

Anyways, to the poster of this thread: were you saying you'd like to practice this on a test environment? I have a couple ideas on things I was trying when I was learning subnetting if yer interesting in hearing 'em.

Also, "keepstriving", even people who have spent the time to learn subnetting still have a tough time w/ IPv6 addressing... just a thought.
- Steve

Last edited by RootMason; 07-06-2013 at 05:20 PM.
 
Old 07-06-2013, 05:44 PM   #10
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
I know it's a bit odd but 255 is the highest value of 8 bits , not the total number of possible values, which is 256. Thats If you take away 4 host values the byte can still take one of 252 others including 0.

I don't know the precise mathematical explanation but its just a wierd shortcut I discovered about 15 years ago. ( I don't claim to have invented this first btw, just that no one told me about it - it was not something being taught in any training courses I ever went on, which seems strange...
 
Old 07-06-2013, 06:08 PM   #11
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Rep: Reputation: 5
I had the same experience with it. I just worked that sh!t to death until I came up with my own way of subnetting in my head! I almost confused my self trying to explain why on don't understand the idea of how that subnetting math works! I just know that it does... I wonder how I'd word that question better to ask some of the whizzes in here. There's gotta' be a reasonable explanation why...

Anyways, nice to hear from ya', buddy! Have a nice one...
 
Old 07-11-2013, 09:36 AM   #12
keepStriving
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thank you for all the advice guys, at the moment I've decided to learn more about network security which is why I've been trying to learn backtrack, hopefully if I can learn it I can actually practice all the subnetting I've learnt.
 
Old 07-12-2013, 04:14 AM   #13
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Rep: Reputation: 5
Did you understand the example I gave on subnetting? I spent a lot of time coming up trying to understand subnetting and coming up with a way that I could do the math in my head on the fly (I'm an intern & my boss loves to give me random subnetting questions). It was my first try at explaining it... how'd I do?
 
Old 07-12-2013, 05:36 PM   #14
keepStriving
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
The best explanation I have found on subnetting is the tutorial series done by danscourses on youtube though he does spend around 10 videos on it explaining from the bare basics. Thank you guys. I'll keep reading and trying.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP Subnetting mrabrar Linux - Networking 3 06-10-2010 10:27 AM
subnetting juanb Linux - Networking 1 06-30-2004 10:23 AM
Problem of Subnetting NIT Linux - Networking 3 11-04-2003 03:46 AM
subnetting Fabian030 General 4 09-11-2003 03:11 AM
subnetting juanb Linux - Networking 3 08-26-2003 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration