mikeybinec wrote: » I'm not sure I understand your question. On your chart you left out the one column. I don't use charts, I use block sizes, and they all correspond no matter which octet you are working in With that said, here;s a couple of examples; 192.168.1.0 /27 this is a classic Class C address.. The interesting octet is the fourth octet. Now three bits are carved out of the fourth to create some subnets (networks) How many? 2^3 = 8 networks... What;s left? 5 bits 2^5 =32 The first bit has to be for the network ID and the last is for the broadcast address, so you really have 30 hosts available Range is 1.1 -1.30 1.0 is network ID 1.15 is broadcast 1.32 - 1.62 1.32 is network ID 1.63 is broadcast (add 6 more subnets here) etc etc. 172.16.16.0 /20 Classic Class B address and a member of the RFC 1918 crowd The third octet is the interesting octet, that gets carved out to decide the boundary between networks and hosts. Four bits are added to the network portions: 2^4 = 16 neworks.. the rest are hosts. Well, 4 bits from whats left in the 3rd octet and the 8 in the fourth octet equals 12. 2^12 = 4096. subtract 2 for network ID and broadcast and you have 4094 hosts per network I'll do the first two, you can do the remaining 14 hee hee hee First network is 16.1 - 31.254 (16.0 is net ID, 31.255 is broadcast) 2nd network is 32.1 - 47.254 (32.0 is net ID, 47.255 is broadcast) Interesting piece of information in the above. Because there are over 4000 hosts, you will see host addresses such as 20.0, and 21.255.. The 0's and 255's are not always delegated to Network IDs and broadcasts, respectively. Hope this helps
Deathmage wrote: » wouldn't it be 1.31 and not 1.15? Maybe I also got it confused: to me I always thought like you said the 1st one in the Network ID and the last in the broadcast.... so if that's the case wouldn't it be: Range is 1.1 - 1.30 | 1.0 is network ID | 1.31 is broadcast Range is 1.33 - 1.62 | 1.32 is network ID | 1.63 is broadcast Range is 1.65 - 1. 95 | 1.64 is network ID | 1.96 is broadcast Range is 1.98 - 1.126 | 1.97 is network ID | 1.127 is broadcast (add 4 more subnets here)
xnx wrote: » All there is to working out subnets is what octet changes and by what increment, like the /27 example above goes up in 32's on the 4th octet, a /19 would do the same but on the 3rd octet.
Deathmage wrote: » so for shits and giggles.... it would be like this: 172.16.16.0/18 so that's 18 - 16 = 2 so that would equal 2^2 = 8 networks and since their is 6 bits left 2^6 = 64 hosts so then it would be something like this... 172.16.1.0 - 172.16.63.0 | network ID = 172.16.0.0 | broadcast = 172.16.64.0 172.16.66.0 - 172.16.127.0 | network ID = 172.16.65.0 | broadcast = 172.16.128.0 172.16.130.0 - 172.16.191.0 | network ID = 172.16.129.0 | broadcast = 172.16.192.0 add 5 more networks....now as for the subnet mask would it be 255 - 64 = 255.255.255.192? is that correct?
mikeybinec wrote: » 8 8 8 8 11111111 11111111 11111111 11111111 (128 64 32 16 8 4 2 1) Use 256 - subnet mask So lets' take your 172.16.16.0/18.. The interesting octet is the third octet. Carving out 2 bits from puts you on that 128+64-192.. 256-192 does equal 64.. That block size determines your network size in regards to host.. You got pretty much everything correct except for the 255 size..Should be 256... One more thing Broadcast addresses are always odd numbered and network IDs are always even numbered with respect to a network Now there is another issue in the fact that you really cant start a network anywhere you want. They must be multiples of the blocks beginning at 0.. In other words, if you have a block size of 16, then you do 0-15 then 16- 31 32- 47 etc You cant start at 4. ( NET IDs are always even and broadcast are odd!!) We're gonna change your 172.16.16.0 to 172.16.0.0 /18 So, with the above, here's the result: We take the first 2 bits on the left of the 3rd octet.. this is a size of 192 (first bit is 128, second is 64) 256 - 192 = 64-- You now have your network size Recall, the first bit is the net ID (even) and the last is the broadcast 172.16.0.1 -- 172.16.63.254 network ID is, as you know 172.16.0.0 broadcast is 172.16.63.255 Next network? 172.16.64.1 -- 172.16.127.254 Net ID is 172.16.64.0 Broadcast is 172.16.127.255 I promise you, just think block sizes in the interesting octet, and you can subnet in less than a minute
mikeybinec wrote: » I'm at work right now so I can't study your response. As for the /23, i.e. 510 hosts, you're in the Class B or A zone. The fourth octet, if all the bits are ones (11111111) is 256 hosts. So if you enter the 3rd octet zone and snag one of it's bits you are at 510 hosts. One more bit, and double it 1024, then 2048, then 4096 etc etc At this point, you have now entered the VLSM zone. When we talked about creating 8 networks that has 30 hosts for each network, this was an example of classful addressing. Nobody uses classful addressing unless you are tutoring RIP version 1 (but I could be wrong, I'll let one of the Techexams.net Gurus smack me around now ) And vlsm is when you tune your network sizes to accomodate your network..Start from largest block size down to smallest, and dont forget about the proper starting points 0-4 4- 8, 0-16 etc etc..
mikeybinec wrote: » Let's do one for jokes.. Pick an IP address, any IP address.. Let's see, how about 100.200.210.5 /20 I just picked this for jokes.. So we want the Network ID this host belongs to. The broadcast and the host range.. READY!!! START THE CLOCK A /20 means we're entering the 3rd octet.. we use 8 bits of the first octet, 8 of the second, and 4 of the third (8+8+4=20) A /20 is a block size of 16..So how many 16s can we fit in 210 before going over it? (A /28 is also a block size of 16..A /12 is a block size of 16) well 10 x 16 =160 NOT EN0UGH.. How about 13? Yeah that's enough!!! 13 * 16 =208..That's our network Id!!! 100.200.208.0 Network ID 100.200.208.1 first host (Now add 15 to the net id number to get to the end of your network range .Yes, I did say 15, not 16) 100.200 223.254 last host 100.200.208.255 broadcast id Remember, the block size was 16, and we do that in the 3rd octet.. For extra credit, what class is this address in. And, if we were doing classful addressing, how many subnets can you have? And yes, you do need to know vlsm. The reason mainly is because on WAN links, you only need 2 IP addresses, i.e. from the, let;s say ISP to you. That;s a block size of 4.. (because there is still a network ID and a broadcast address) Now after you connect to the outside world, you can then venture into NAT and RFC 1918 (private, non routable IP addresses to expand your network) Your LAN could have lots of addresses.. But you might want to take an address block, split it up and say give human resources 12 addresses, engineering, 30 addresses, and sales 10 addresses.. that's where your vlsm comes into play.. the HR block will be 16 (gives them room for a little expansion) engineering will stay put at the /27.. no room for expansion for them. and sales, we'll give them a block size of 16 also /28 (255.255.255.240)
mikeybinec wrote: » I'll be back later tonight, but one of your questions was "How can a /20 be in the 3rd octet?" I think you have that figured out by now. And one thing: Yeah, building charts and filling in the boxes are gonna be time killers, Man.. Do the block method.. I promise, you can subnet in less than a minute, maybe even in less than 30 seconds A /11 is a block size of 32 /19 is also 32 /27 is 32
rocdamike wrote: » Here's how I do it. Essentially what I do is convert the CIDR prefix to a dotted decimal subnet mask. I then use the interesting octet of this mask to find my block size. Once you know the block size, everything else is a piece of cake. Let's try an example (I will use one of your example questions): What network is 172.16.100.11/19 on?step i) Convert CIDR to dotted decimal: /19 = 255.255.224.0. (I now know that the 3rd octet is the interesting octet as it's the first octet that isn't 255) step ii) Convert 224 to the corresponding block size. 224 = 32 block size step iii) I now know my subnets (start from 0 and add 32 each time to the 3rd octet). 172.16.32.0, 172.16.64.0, 172.16.96.0, 172.16.128.0 step iv) It's plain to see that IP address 172.16.100.11 falls within the 172.16.96.0 subnet. 172.16.96.0 is the subnet address, 172.16.127.255 is the broadcast address and everything in between is my Host IP range i.e. 172.16.96.1 - 172.16.127.254. Mask (interesting octet) 128 192 224 240 248 252 254 255 Corresponding Block Size 128 64 32 16 8 4 2 1