Page 1 of 2 1 2 LastLast
Results 1 to 20 of 36

Thread: Subnet masking     submit to reddit submit to twitter

  1. #1
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Subnet masking

    Taking a network security course and one of our assignments is a group assignment wherein we act as a specialist advising a real estate agency on network security and redoing their network. One of the things might entail subnet masking and I was just curious if anyone had any links on learning all that is entailed.

    Here are a few details about the project.
    Spoiler: show

    Current CRI Supplied Design Details:
    •All CRI workstations, server, and networked equipment have a static public IP
    addresses in the range of 164.214.2.0/24.
    •The File Server is a Windows 2000 Server running DNS and WINS
    •WIFI APs have WEP deployed
    •CRI’s Windows 2000 Server services have recently started running much too
    slowly
    •The router is a commercial standard
    •No networking equipment has physical protection
    •Public must have access to Kiosks in lobby
    •Realtor laptops need remote access to CRI data


    Spoiler: show

    Current Design Details Your Team Has Uncovered Through Research:
    •There is no sub-netting of the company’s address space
    •The File Server’s file system is FAT32.
    •A significant WIFI signal bleed-trough is found on floors above and below the
    floor CRI occupies
    •The Windows 2000 Server is found to have a root kit installed, making it a
    member of a distributed Internet Bot Net
    •Network equipment has no physical protection, or power/temperature
    conditioning
    •No UPS system is used in the design
    •The File Server is set up as a Workgroup


    I know basic networking, but ive never set up a network for a company where I had to subnet anything. All my experience has been pretty basic in setting up home networks and getting all the computers online with a persons wireless, easy shit.

    I had a few questions:

    I know Ipv6 and Ipv4 are different in that one is hex and the other binary. Is subnetting very different between the two or no? How prevalent is Ipv6 right now and is it something that's becomming a fast transition or for the most part, is ipv4 still 99% of what is going on right now with networking.

    Any helpful tips/links to understanding and wrapping my head around all the basic networking information would be great. This course didnt have a PRQ, and maybe we're going to cover this and TCP/UDP etc later on in the course, but I dont like to play catch up and also want to learn it to stay a step ahead.

  2. #2
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    Ugh, subnetting... That's pretty much a science for itself, you either understand it or you fail.
    The very basic thing is, you have to understand the conversion between decimal (for v4), hex (for v6) and binary (for both).
    The next step is that you have to understand what the subnet mask does and how it has to look. Once you understand that part, it gets pretty simple, just pushing bits around between the network part and the host part ^^
    And after that come network basics like network address, usable IPs, broadcast address (v4) etc.

    I have to admit, i had to google about subnetting with v6, but it looks like it works almost the same as in v4, just that the IPs/SNMs are way longer. But you'll probably have to consider v6-specific stuff like that there's no broadcast address like in v4 but only a few multicast ones. I'm only familiar with v4 subnets, and i think even though it's already a big topic for the internet most private/company networks will still use v4 for quite a while.

    Don't have any great sources for learning, but if you want i can try to set up an example and explain how it works. Or if you have one and don't understand it, i can try to help ^^ Got a bit "rusty" since i don't have to subnet anything that often

    btw, lol @ that project setting. win2000 servers and WEP WLAN, how ancient. I already pity our customers that are still running server 2003...

  3. #3
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Yeah if you could set up an example that would be great. I've been reading a few links and downloaded two CCNA pdfs off demonoid just to read up on the subject since I find it interesting. I know how to do the converting for the most part, and when all else fails I can just use Win Calc as programmer and convert that way. I know the different classes for IPs, which I guess arnt really used anymore? But I do know that A has 3 open octets, B has 2 and C has 1 for subnetting? Not sure if I got that right.

    I'm trying to get my head around how the mask actually works. I can understand the idea of placing the IP with the subnet using AND. Say for example

    I have an IP address of 192.168.2.1 and a subnet of 255.255.255.2. Would that be written has 192.168.2.1/4? (since the subnet ends in a 2 =2 to the power of 2??) Does this example even make sense or is something wrong just in that? lol

    Also where does this play in to setting up say an office of 10+computers? Do routers/switches need an IP address and subnet associated to them in a work environment like that?

    Right now what I can understand is for example and IP address would be like a street address to an apartment complex, and subnetting is like all the different apartment numbers on that address. Not sure if that's 100% correct so correct me if i'm wrong? and feasibly, how often will you have to subnet anything in a work environment just to get an idea?

    Any help is greatly appreciated.

  4. #4
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    An IP is a unique ID that every network device has inside a network and that is used for communication. So in your example with the complex, each appartment number (the full one, including building/block etc) is an IP.
    Subnets are in most cases used to split one network into several smaller networks. So for company networks, some might put all PCs that belong to the accounting team into one subnet, and the only way for communication between an accounting PC and the rest of the network or the internet goes through the central router/firewall. Speaking in the complex example, you divide it into several sectors that are separated by fences and heavy security, and you can only pass to another sector or the outside world through a central management building where security guys control everyone and if they're allowed to pass.

    Class A/B/C are still used, they correspond to the default subnet mask. The typical class C network is 192.168.X.0/24, the /24 part stands for a subnet mask with 24 "network" bits or 3 bytes, so 255.255.255.0. Class B is /16, class A /8. Typical IP ranges are 172.16.X.0/16 and 10.X.X.0/8, but you can also create a class C net in the 10.X range. But not a class A net for 192.168.X (hope that didn't confuse you too much)

    255.255.255.2 is not a valid SNM! Look at it the binary way: 255 stands for 8 bits that are all 1. The subnet mask has to consist of a single block of ones on the left and a single block of zeros on the right. The ones stand for the bits that belong to the network part, the zeros are the bits that can be used for clients.
    In binary, your invalid SNM would look like this: 11111111.11111111.11111111.00000010
    See what i mean? A valid one would be 255.255.255.128, or in binary 11111111.11111111.11111111.10000000
    So you shifted the network part one bit to the right and halfed the usable IPs. Network address is still 192.168.2.0, the usable IPs are reduced to 192.168.2.1 to 192.168.2.126, and the broadcast address is 192.168.2.127. network and broadcast IP are always the first and the last IPs in the subnet. everything in between can be used for clients.

    Read through it a few times and try to understand it, and then try to solve this example:

    You have a network with IP range 172.16.1.0/24 (so SNM 255.255.255.0). There are more and more computers that get added to the network and the available IPs are running out. So you want to expand the network through subnetting. Change the subnet mask so that the overall usable IP addresses get at least tripled! Give me the resulting subnet mask, the new network address, the usable IPs and the new broadcast address.

    Try it ^^ If it's too hard or you get confused, write down what you have understood and i'll give you hints

  5. #5
    2600klub
    I donated 5 bucks and all I got was this shitty title from Zet

    Join Date
    Jun 2007
    Posts
    2,688
    BG Level
    7
    FFXI Server
    Ragnarok

    Just saying, ... the supplied project details describe quite possibly the dumbest, worst-designed system ever. Win2000 non-domain file server with a public IP, using FAT32, and WEP AP's?

    Actually on-topic, Niya covered the act of subnetting very well, but I'd like to add that the reasons to even do any subnetting include that it reduces broadcast traffic network-wide (since routers won't pass broadcast traffic and you need a router to make subnets talk to each other) and that it in theory increases your network security if you keep the subnets as small as possible.

  6. #6
    Failed Sex Ed
    Join Date
    Aug 2007
    Posts
    2,391
    BG Level
    7

    Just write it in binary a few times and you'll get it

  7. #7
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Awesome information Niya, that clears it up for me a lot more then most of the text/websites/blogs I have read on the subject. So basically I know for my project, since there is an account office, Realtor computers and 2 kiosks up front, i'll probably need to subnet their network regarding those. I didn't know of the security bonus to it and having to access the subnet through the router so that was really helpful. Also thanks for the information on SNM and how the last octet is set up.

    for the example. Since moving the 1 into the last octet halved it, I can only assume moving 0s into the left side would open it up more?? Something like 255.0.0.0? Or does that not work at all? or 255.255.255.224. The 1st one I tripled the number of 0s in the subnet...though i'm not sure if that works. for the 2nd one I figured out that 224 equals 11100000 in binary so there are 3 1's as opposed to the original 0 1s in the last octet. 0_o I'm still pretty confused on the general principle of how it works, but some things are clicking in little by little...I hope.

  8. #8
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    @arka: true, you can use it for that reason too, but i think broadcasts aren't that much of an issue ^^ guess it's more because of that you can control/filter all the traffic in one central spot, the router that connects the subnets.

    @meres: guess i'll have to mention a few more things that i took for granted xD moving the 0s and 1s happens on binary basis, because shifting by only one bit can have a huge influence already. see my example, halfing the IPs with just one bit shift.
    And when you write the SNM in binary, the bit "value" increases from right to left for every byte/octet. so the values for the 8 bits of one octet are 128-64-32-16-8-4-2-1. Sum those up and you get 255.
    255.0.0.0 is a /8 SNM (first 8 bits are 1), you'd use that as the standard SNM for a class A network. Just for reference, with /8 you have 24 bits for the client part, so that would be 2^24 -2 = 16.777.214 available IPs. (the "-2" is for network and broadcast address). That's just SLIGHTLY too much if you only want 3 times as many IPs xD And also, you can't make a class A net out of the 172.16.X.X range.
    Class C (255.255.255.0 or /24) has 8 client bits, so 2^8 -2 = 254 IPs for clients.
    What you did with 255.255.255.224 (or /27) is lower the IP count even further. 5 client bits, so 2^5 -2 = 30 client IPs.

    Try again ^^ once you understand it we can try an actual "splitting" example and i'll explain how you get several networks out of one with SNM changes ^^ What you're supposed to do in the current example is kind of the opposite, merging several "small" IP ranges to one big range.

  9. #9
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Let me try again, so for the example you had before would the subnet be 255.255.252.0? I found this chart here. located the 255.255.255.0 and counted up 3 to 255.255.252.0. So that would go from 256 to 1024 hosts?

    http://techrepublic.com.com/i/tr/dow...bnetting_c.png

    I understand 255.0.0.0 is 8bit. So the closer the last octet gets to 255 the more you are limiting how many hosts there can be?

  10. #10
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    correct ^^ each bit shift inside the last octet that is not 0 either doubles or halves the available IPs, so shifting the third octet from 11111111 to 11111100 adds 2 more bits to the client part and allows 2^2 = 4 times more IPs. That chart is actually quite handy ^^
    So, additional question to the same example: before you changed the SNM, the network was 172.16.1.0, the usable IPs were 172.16.1.1 to 172.16.1.254, broadcast 172.16.1.255. You also already found out that you now have 1024 -2 = 1022 IPs instead of 254.
    What IPs can you use for clients after the SNM change?
    A hint for this: go the binary way. Put the binary SNM and a random IP from the range (also in binary) above each other. Each IP bit that belongs to a 1-bit of the SNM is static and belongs to the network, you can't change it. Each IP bit that belongs to a 0-bit of the SNM belongs to the client and can be changed as you want. So just look at the lowest and highest possible values for the client part and it should be easy ^^

  11. #11
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    So would it be something like 172.16.0.1to 172.16.255.254? where the network was 172.16.0.0 and the broadcast is 172.16.255.255? I know you're supposed to add 1 to the start and take away 1 at the end for the network/broadcast ID right?

    I got to my answer by putting 172.16.1.1 over 255.255.252.0 which resulted in 172.16.0.0. since it seems anything over 255 retains itself?

    Also again thanks for the tutoring lol, helping out a ton in my understanding this.

  12. #12
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    lowest IP: correct ^^
    highest IP: completely wrong remember that you're only supposed to get 1022 IPs?

    11111111.11111111.11111100.00000000
    10101100.00010000.00000001.00000000 (for 172.16.1.0)
    you may only change the bits on the IP that are 0 on the SNM. for 255 in the 3rd octet you'd have to change all bits to 1, but you're only allowed to change the last 2. So try again ^^ just set the "allowed" bits to 1 and change it back to decimal.

  13. #13
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Hmm, so highest IP would be 172.16.3.255?

    Edited my answer after reading something up on it. Got this answer by looking at the 3rd octet and since there were 2 0s there I figured it was 2^2=4. So I added 4 to the lowest ip then subtracted 1.

    Edit 2: Changed the last octet to 255. I had it as 1 before, but realized it would become 255 if I changed all the 0s to 1s.

  14. #14
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    almost right ^^ 172.16.3.255 is the new broadcast, so .254 is the highest usable IP
    Your way of thinking gets better ^^ on the third octet, you can only change the last 2 bits. and when you set both of them to 1, you get 00000011 -> 3 ^^ 4th octet is correct, you can use any combination of 0s and 1s for IPs, so any number between 1 and 255

    Soo... now that we've got that, lets move on to the splitting part of subnetting.

    Let's say the current network is 192.168.16.0 with a /24 mask.

    Riddle #1: split the given IP range into at least 5 new ranges, and give me network IP, SNM and broadcast IP for each of them.
    Riddle #2: you want to separate several groups of computers from each other. one group has 4 computers, one group has 15 computers, and the third group has 45 computers. create subnets inside the given network range that have enough space for all groups, and give me network IP, SNM and broadcast for each of them.

    Hint: it's still bit shifting, but this time you can use the bits you turn from 0 to 1 in the SNM to create different new networks. Just remember, everything that belongs to the 1 part of the SNM is the network, the 0 part is for the client.
    Try it, i'll give you more hints if needed ^^

  15. #15
    Ridill
    Join Date
    Jul 2008
    Posts
    11,255
    BG Level
    9

    Riddle 2: Subnet for 4 computers would be 255.255.255.252.

    11000000.10101000.00010000.00000000
    11111111.11111111.11111111.11111100

    So I can change the last 2 digits, 2^2=4. So 192.168.16.0+4 = IP = 192.168.16.1 Broadcast = 192.168.16.3?

    I'll make sure that's correct before moving on to make sure I know what i'm doing. I have a question though. if you're sectioning off parts to different sets of computers, how do you go about doing this w/o overlapping addresses? When I go on to do the 15 computers, do I start from 1 up from the broadcast address of the last 4? I guess that question applies to riddle #1 as well. I'll probably need more hints haha.

    Edit, nvm the subnet wouldnt be 252, that only gives 4. it would have to be 255.255.255.248.

    So change broadcast to 192.168.16.8 and IP as 192.168.16.1

    So then for 15, it would need a subnet of 255.255.255.240, and 45 would be 255.255.255.192.

    So for my guess, the 15 computers would be :192.168.16.9 to start, and 192.168.16.25 to broadcast?
    40 computers would be : 192.168.16.26 and 192.168.16.66 to broadcast?

    Hopefully you can see what i'm doing there if it's wrong so you can correct.

  16. #16
    alsohawks

    ALL YOU YOUNG HACKEY
    PLAYERS OUT THERE

    Join Date
    Jul 2009
    Posts
    5,960
    BG Level
    8

    God I haven't looked at Subnet masks in like 2 years, I forgot how fucking confusing this is but the lessons have been pretty good!

  17. #17
    Nidhogg
    Join Date
    Feb 2008
    Posts
    3,790
    BG Level
    7
    FFXIV Character
    Tsugaru Mifra
    FFXIV Server
    Hyperion
    FFXI Server
    Ragnarok

    Why the fuck are they running Windows 2000 server. And it has a rootkit? Get them niggas some SBS 2010.

  18. #18
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    Try #1 first, should be easier since you only have restrictions for the number of subnets but don't have to bother with how many IPs each of them has. Just remember, you need enough bits on the "bit shift" part of the SNM to fit 5 networks in

    Your edit on the range for 4 PCs is correct, 252 would be too small.

    Another hint for #2: start with the largest IP blocks you need and split according to that. Then take one of the resulting sub nets and split it further down for the smaller ranges. That way you shouldn't get any overlapping/colliding IPs.

    @xopher: it's just a project example of a screwed up network they have to fix guess the one who made the project up wanted one of the worst possible cases xD

  19. #19
    Bockage
    Guest

    Quote Originally Posted by Niya View Post
    Another hint for #2: start with the largest IP blocks you need and split according to that. Then take one of the resulting sub nets and split it further down for the smaller ranges.
    I think you should hold off doing VLSM questions till he gets subnetting down first

  20. #20
    Salvage Bans
    Join Date
    Mar 2008
    Posts
    853
    BG Level
    5
    FFXIV Character
    Niya Kouya
    FFXIV Server
    Odin

    that's why i said he should try #1 first but thanks, didn't know this had its own name ^^;
    i have to admit, only had subnetting for ~1 week in vocational school, so i'm not very deep into it. just happen to be good at understanding binary stuff xD

Page 1 of 2 1 2 LastLast