Guru3D.com Forums

Go Back   Guru3D.com Forums > General Chat > The Guru's Pub
The Guru's Pub Hang out with Guru3D's staff and other visitors, have a nice civilized chat, nothing hardware related though !



Reply
 
Thread Tools Display Modes
Calculating IPv4 Subnets - Have i got this right?
Old
  (#1)
(.)(.)
Banned
 
Videocard: GTX 970
Processor: i72600k @ 4.7
Mainboard: Asus M4E
Memory: Corsair Vengence 10gb
Soundcard: onboard
PSU: Enermax Rev 1250w
Default Calculating IPv4 Subnets - Have i got this right? - 02-03-2015, 13:00 | posts: 9,098 | Location: NZ

Decimal Binary
IP Address ...| 192.168.10.131 .| 11000000.1010100.00001010.10000011
Subnet Mask | 255.255.255.192 | 11111111.1111111.11111111.11000000

To find the Network Address(Nw)..
  • IP - 11000000.1010100.00001010.10000011
  • Sub-11111111.1111111.11111111.11000000
  • Nw -11000000.1010100.00001010.10000000. (192.168.10.124) 7 bits for hosts?

If so, the first usable Add is 192.168.10.125 and the last is found by inverting the host portion of the address -10000001 (.125) to 11111110(254).

Network Address - 192.168.10.124
First - 192.168.10.125
Last - 192.168.10.254
Broadcast - 192.168.10.255

Have I got that right?
   
Reply With Quote
 
Old
  (#2)
allesclar
Ancient Guru
 
allesclar's Avatar
 
Videocard: Asus 1950XTX
Processor: Intel Quad Q6600
Mainboard: Asus P5N32-E SLI 680i
Memory: Corsair 8GB PC2-6400 XMS2
Soundcard: SB Audigy 2
PSU: Enermax Liberty 620W
Default 02-03-2015, 13:20 | posts: 5,314 | Location: England

No.

You cannot simply just start midway through a subnet. The address you give is a class C with a prefix notation of /26 or mask "bits".

Wild card mask = 63 as 255.255.255.255 - 255.255.255.192 = 63

Remember that the total number is 64 as we count the value "0" of hosts within a subnet.

With this 64 in total, we know for a /26 prefix there are a maximum of 4 sub nets within this range.

Therefore the address ranges start from:

192.168.10.192 - 0.0.0.64, we are applying the subnet mask here so are only interested in the 4th octet.

Which gives you 192.168.10.128 upto - 192.168.10.191 as a range.

Therefore

Network Address - 192.168.10.128
Usable host address - 192.168.10.129 - 192.168.10.190
Broadcast Address - 192.168.10.191

It takes years to be able to do it in your head as i have done. However, there are websites out there that can do it for you.

http://www.subnet-calculator.com/

Subnet chart also here.



Hope that helps?

Last edited by allesclar; 02-03-2015 at 13:32.
   
Reply With Quote
Old
  (#3)
scatman839
Ancient Guru
 
scatman839's Avatar
 
Videocard: 7970m/970 Mini, KD55XD800
Processor: i7 3610QM/i5 6500
Mainboard: HM77/B150M-C
Memory: 12GB D3/16GB D4
Soundcard: Via HD, x-530
PSU: 180w/RM650x
Default 02-03-2015, 13:20 | posts: 13,049 | Location: Scotland

.192 has 64 hosts, so you would do blocks up 64

N 0
F 1
L 62
B 63

n 64
f 65
l 126
b 127

n 128
f 129
l 190
b 191

n 192
f 193
l 254
b 255

your ip is in the third block

as mentioned, you can't go between subnets, you go up until you find the first subnet block that is lower than your ip, (128 in this case) then work from there (add 64 for the next network, -1 for broadcast, -2 for last usable)

personally I avoid writing it out in binary and draw up a subnet chart (forum removing extra spacing ugh)

slash notation /25 /26 /27 /28 /29 /30 /31 /32
no of hosts 128 64 32 16 8 4 2 1
subnetmask 128 192 224 240 248 252 254 255

I realise this doesn't work as great if the subnet is for a smaller number of hosts, say, 8 or 4. In that case, get your IP, divide it by your no of hosts (that you find using the subnet mask value given), discard the remainder, then multiply that back by the no of hosts.

e.g
131/64=2.046875
discard the insignificant stuff
2*64=128
that's your network address



Also, you're probably about to be taught 4-5 subtly different ways of subnetting, pick whatever you find best, I know my method doesn't work for as many people(especially the dividing and remainder stuff). It took me about a year of practise to start getting it done in my head

Your error however was converting 10000000 into decimal wrong, 128 not 124 (not sure how you got there), had you started at 128 you would have been on the right track, but I don't think this is right
Quote:
and the last is found by inverting the host portion of the address
never seen that before and in this case it doesn't work, 192 is 11000000

Last edited by scatman839; 02-03-2015 at 13:40.
   
Reply With Quote
Old
  (#4)
(.)(.)
Banned
 
Videocard: GTX 970
Processor: i72600k @ 4.7
Mainboard: Asus M4E
Memory: Corsair Vengence 10gb
Soundcard: onboard
PSU: Enermax Rev 1250w
Default 02-03-2015, 14:13 | posts: 9,098 | Location: NZ

So forth octet being 192, which is a /26 with 64 addresses, I could just -

192 - 64 = 128 + 63 = 191. The NA is .128 then first and last usable are .129 and 190, broadcast as the .191, with the next network starting at .192?

@scatman839
Yeah i dont know where i pulled 124 from. Im using something like you had and doing this, but got 124 in my head instead of 192.

128--64--32--16--8--4--2--1
-1----1---0---0--0--0--0--0 <-------192)

As for the inverting stuff, its in one of the exercises we were given. Theres so many ways of doing it and without warning, the workbook explaining it all changes what method of converting its using when explaining things. So first i have to work out which methods its used (thats not even apart of the god damn exercise/example) before i can understand how the workbook has come to the answer it has in its example.

Last edited by (.)(.); 02-03-2015 at 14:22.
   
Reply With Quote
 
Old
  (#5)
allesclar
Ancient Guru
 
allesclar's Avatar
 
Videocard: Asus 1950XTX
Processor: Intel Quad Q6600
Mainboard: Asus P5N32-E SLI 680i
Memory: Corsair 8GB PC2-6400 XMS2
Soundcard: SB Audigy 2
PSU: Enermax Liberty 620W
Default 02-03-2015, 14:23 | posts: 5,314 | Location: England

Yup.
   
Reply With Quote
Old
  (#6)
scatman839
Ancient Guru
 
scatman839's Avatar
 
Videocard: 7970m/970 Mini, KD55XD800
Processor: i7 3610QM/i5 6500
Mainboard: HM77/B150M-C
Memory: 12GB D3/16GB D4
Soundcard: Via HD, x-530
PSU: 180w/RM650x
Default 02-03-2015, 14:26 | posts: 13,049 | Location: Scotland

Quote:
Originally Posted by (.)(.) View Post
So forth octet being 192, which is a /26 with 64 addresses, I could just -

192 - 64 = 128 + 63 = 191. The NA is .128 then first and last usable are .129 and 190, broadcast as the .191, with the next network starting at .192?
bingo
Quote:
Originally Posted by (.)(.) View Post
@scatman839
Yeah i dont know where i pulled 124 from. Im using something like you had and doing this, but got 124 in my head instead of 192.

128--64--32--16--8--4--2--1
-1----1---0---0--0--0--0--0 <-------192)

As for the inverting stuff, its in one of the exercises we were given. Theres so many ways of doing it and without warning, the workbook explaining it all changes what method of converting its using when explaining things. So first i have to work out which methods its used (thats not even apart of the god damn exercise/example) before i can understand how the workbook has come to the answer it has in its example.
Our lecturer taught us one way, cisco tried to teach us another way, another lecturer apparently teaches a third way.

Basically any time I come across cisco trying to tell me how to subnet again in ccna I just ignore it and use the numbers it gives

It's up to you if you want to try learning the other method, but it might just confuse you further
   
Reply With Quote
Old
  (#7)
(.)(.)
Banned
 
Videocard: GTX 970
Processor: i72600k @ 4.7
Mainboard: Asus M4E
Memory: Corsair Vengence 10gb
Soundcard: onboard
PSU: Enermax Rev 1250w
Default 02-03-2015, 14:38 | posts: 9,098 | Location: NZ

Yeah thats the issue ive got atm, the lecturer method vs the internal exercises method vs Cisco method.

Im soo tired.

Thanks for that gurus. I'll keep at it.
   
Reply With Quote
Old
  (#8)
Veteran
Ancient Guru
 
Veteran's Avatar
 
Videocard: 2xTitan XM@1590Mhz-CH20
Processor: 4930k@5.0ghz-1.40v-CH20
Mainboard: R4BE@Monoblock-CH20
Memory: 16Gb Mushkin Redline2133
Soundcard: SupremeFX-Sennheiser 350
PSU: Corsair AX 1200i
Default 02-03-2015, 18:31 | posts: 12,051 | Location: United kingdom

I convert the host portion of the ip address to binary.
Depending on how many bits I need to borrow gives me my subnet mask.
So 3 bits will be 224 subnet mask host portion.
You probably already know this...the subnet mask denotes which part of the ip address belongs to the network and which part of the ip address belongs to the host in laymans terms.

I then covert 224 to binary and then the host portion of the ip address to binary as I said above.

I then use anding with these 2 host portions which will then give me network address. Which I understood as an area code for a row of houses like a zip code or post code.

Now that you have the ip address, subnet mask and network address all you need now is the broadcast address.

Depending on how many bits that you borrowed to give you a subnet mask of 224 ie: 3 bits, well you just count these 3 bits from left to right of the andings network address host, any bits after the 3 have been counted from left to right become turned on. Ie:

They become 1's and not 0's therefore you convert these back to decimal and there is your broadcast address. Subnetting is all about practice practice practice. You then use vlsm (variable length subnet mask) and take exactly what you need so you don't waste any bits. This is important later on as many routing protocols will only use vlsm. Working in industry ive yet to actually subnet as most companies we deal with just buy enough ip addresses so 1 ip address does not need to be subnetted. Its been years since ive subnetted and tbh I'm surprised I still remember it as I hardly use I ever.

Of course like others have said there are different ways of doing it. The best way is to draw out your chart as someone said earlier. Once in industry you can just use an ip calculator anyhow if you need too.

Cisco exams need to be done out your head or on the chalk/felt board.

Also packet tracer is ok but with real cisco hardware you have many more commands that packet tracer dors not have.

If your serious about it I would purchase some labs and forget packet tracer in the longterm.

If you think ipv4 is tough which it is for everyone at first. Wait until you try ipv6, that will truely blow your brain.

There is alot to cisco but there are 3 very important fundamentals that you need to master to become a pretty decent network engineer. You need to be very good at subnetting, acl's (access control lists) and vlans. Become good at these and your 75% of the way there but without becoming good at these you may as well forget it.

Last edited by Veteran; 02-03-2015 at 19:11.
   
Reply With Quote
Old
  (#9)
(.)(.)
Banned
 
Videocard: GTX 970
Processor: i72600k @ 4.7
Mainboard: Asus M4E
Memory: Corsair Vengence 10gb
Soundcard: onboard
PSU: Enermax Rev 1250w
Default 02-04-2015, 11:08 | posts: 9,098 | Location: NZ

Thanks Veteran.
Quote:
You need to be very good at subnetting, acl's (access control lists) and vlans. Become good at these and your 75% of the way there but without becoming good at these you may as well forget it.
Almost word for word what our lecturer said to us today!

Those packet tracers are a bit odd at times. It'll ask you to do something, like assign ip addresses to switch 1 for the first part, but then you go to click on it and it says its locked. Then further down in part 3 it'll say something like "Since Switch 1 is pre configured, just assign the remaining ips manually...". Eh, why didnt you say so at the top, i thought i was doing something wrong. Oh well.

This command come in handy at times i reckon:
Router#show cdp neighbors detail
   
Reply With Quote
Old
  (#10)
allesclar
Ancient Guru
 
allesclar's Avatar
 
Videocard: Asus 1950XTX
Processor: Intel Quad Q6600
Mainboard: Asus P5N32-E SLI 680i
Memory: Corsair 8GB PC2-6400 XMS2
Soundcard: SB Audigy 2
PSU: Enermax Liberty 620W
Default 02-04-2015, 11:22 | posts: 5,314 | Location: England

Not just those, you also, for the Cisco exams, need to be **** hot on the commands that are used within the command prompts on Cisco equipment.
   
Reply With Quote
Old
  (#11)
PNeV
Maha Guru
 
PNeV's Avatar
 
Videocard: MSI GTX 1070 Armor OC
Processor: 3570K @ 4.4GHZ
Mainboard: ASRock Extreme4 Z77
Memory: 16GB Kingston HyperX Fury
Soundcard: Onboard & M-Audio AV40
PSU: Antec HCG M 620W
Default 02-04-2015, 12:53 | posts: 2,072 | Location: Northampton, United Kingdom

I remember using Packet Tracer for an assignment at University for a project that involved the setting up and subnetting of an Office Network and it had various requirements such as this Network can access this server, but this Network can't etc.

Long story short, it randomly crashed on me and lost a good chunk of work. No warnings, no errors, nothing. Just closed.

My advice, save often!
   
Reply With Quote
Old
  (#12)
scatman839
Ancient Guru
 
scatman839's Avatar
 
Videocard: 7970m/970 Mini, KD55XD800
Processor: i7 3610QM/i5 6500
Mainboard: HM77/B150M-C
Memory: 12GB D3/16GB D4
Soundcard: Via HD, x-530
PSU: 180w/RM650x
Default 02-04-2015, 15:40 | posts: 13,049 | Location: Scotland

Had that once while doing a practise skills assessment, never happened before so I didn't even think it possible.

No real autosave in the program, but I was working off scenarios I had already made with 3 stages set up.
   
Reply With Quote
Old
  (#13)
Veteran
Ancient Guru
 
Veteran's Avatar
 
Videocard: 2xTitan XM@1590Mhz-CH20
Processor: 4930k@5.0ghz-1.40v-CH20
Mainboard: R4BE@Monoblock-CH20
Memory: 16Gb Mushkin Redline2133
Soundcard: SupremeFX-Sennheiser 350
PSU: Corsair AX 1200i
Default 02-05-2015, 18:49 | posts: 12,051 | Location: United kingdom

Quote:
Originally Posted by (.)(.) View Post
Thanks Veteran.


Almost word for word what our lecturer said to us today!

Those packet tracers are a bit odd at times. It'll ask you to do something, like assign ip addresses to switch 1 for the first part, but then you go to click on it and it says its locked. Then further down in part 3 it'll say something like "Since Switch 1 is pre configured, just assign the remaining ips manually...". Eh, why didnt you say so at the top, i thought i was doing something wrong. Oh well.

This command come in handy at times i reckon:
Router#show cdp neighbors detail
Someone keeps deleting my posts for some reason.
Anyhow CDP Neighbours i actually turn off on real hardware as it can be a slight security risk. I use it to plan out a network or troubleshoot but i always disable after. Alot of engineers disagree and leave it turned on. Its a 2 way argument both with plausible reasons why to leave enabled and why not too leave enabled.
   
Reply With Quote
Old
  (#14)
TekkMarine
Maha Guru
 
TekkMarine's Avatar
 
Videocard: EVGA 980Ti GTX SC
Processor: Intel i7-4790K 4.4Ghz
Mainboard: Gigabyte Z97X G5
Memory: 16GB Ballistics 1866Mhz
Soundcard: On Board
PSU: Corsair HX1000i
Default 02-05-2015, 20:19 | posts: 1,280 | Location: United Kingdom

Quote:
Originally Posted by (.)(.) View Post
Thanks Veteran.
Almost word for word what our lecturer said to us today!
Cyber Security & Forensics?, Network Administration?
   
Reply With Quote
ipv4 Subnetting
Old
  (#15)
ManYou
Newbie
 
Videocard: 2GB
Processor: Intel Core i3
Mainboard:
Memory:
Soundcard:
PSU: NA
Question ipv4 Subnetting - 06-01-2017, 21:38 | posts: 1

You are using Class C ip address 192.168.10/24 address
6 bit for host means you have 2^6 - 2 =64 host ip address in a subnet
your subnet is 255.255.255.192
so your subnet range is 0-63,64-127,128-191,192-255.
every subnet first IP is network ID and last Ip is broadcast ID.

so 192.168.10.0 is subnet id of first subnet
192.168.10.63 is broadcast id of first network

suppose if your subnetmask is 255.255.255.224
Total number of host ip in one subnet 2^5-2=30
subnet range=0-31,32-63,64-95,...224-255
Its very Simple

Regards,
Christian C
Network Admin
   
Reply With Quote
Old
  (#16)
Darkest
Ancient Guru
 
Darkest's Avatar
 
Videocard: HD7950
Processor: i5 3570k @ 4.4GHz
Mainboard: Gigabyte Z77 D3H
Memory: HyperX Beast 16GB 2133
Soundcard: Aune T1 + HD650/DT990 Pro
PSU: XFX 750w Silver
Default 06-03-2017, 02:47 | posts: 10,009

Quote:
Originally Posted by ManYou View Post
You are using Class C ip address 192.168.10/24 address
6 bit for host means you have 2^6 - 2 =64 host ip address in a subnet
your subnet is 255.255.255.192
so your subnet range is 0-63,64-127,128-191,192-255.
every subnet first IP is network ID and last Ip is broadcast ID.

so 192.168.10.0 is subnet id of first subnet
192.168.10.63 is broadcast id of first network

suppose if your subnetmask is 255.255.255.224
Total number of host ip in one subnet 2^5-2=30
subnet range=0-31,32-63,64-95,...224-255
Its very Simple

Regards,
Christian C
Network Admin
Apparently checking dates and user status isn't.

This thread was posted back in 2015 by a member who has since been banned. I'm not sure why you felt the need to sign up to the forum specifically for this.

Last edited by Darkest; 06-03-2017 at 02:49.
   
Reply With Quote
Old
  (#17)
scatman839
Ancient Guru
 
scatman839's Avatar
 
Videocard: 7970m/970 Mini, KD55XD800
Processor: i7 3610QM/i5 6500
Mainboard: HM77/B150M-C
Memory: 12GB D3/16GB D4
Soundcard: Via HD, x-530
PSU: 180w/RM650x
Default 06-03-2017, 16:23 | posts: 13,049 | Location: Scotland

I'm amazed how little I remember of even of subnetting after 2 years of not doing anything networking.
   
Reply With Quote
Old
  (#18)
allesclar
Ancient Guru
 
allesclar's Avatar
 
Videocard: Asus 1950XTX
Processor: Intel Quad Q6600
Mainboard: Asus P5N32-E SLI 680i
Memory: Corsair 8GB PC2-6400 XMS2
Soundcard: SB Audigy 2
PSU: Enermax Liberty 620W
Default 06-04-2017, 22:36 | posts: 5,314 | Location: England

haha jesus was a good few years ago i wrote that too
   
Reply With Quote
Old
  (#19)
Ryu5uzaku
Ancient Guru
 
Ryu5uzaku's Avatar
 
Videocard: 980ti gaming 1490/7700
Processor: 1800x 4.05ghz 1.35 volt
Mainboard: Asus CH VI x370
Memory: 16GB 3ghz ddr4
Soundcard: Asus strix pro
PSU: 850W SF platinum
Default 06-05-2017, 11:17 | posts: 6,504 | Location: Finland

All this reminds me of the Cisco courses I did take. Oh god no... I could calculate these back then. Can't now because I've only been coding for past 6 years after school.
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump



Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 1995-2014, All Rights Reserved. The Guru of 3D, the Hardware Guru, and 3D Guru are trademarks owned by Hilbert Hagedoorn.