Results 1 to 12 of 12

Thread: Subnet Question     submit to reddit submit to twitter

  1. #1
    Sandworm Swallows
    Join Date
    Dec 2007
    Posts
    7,096
    BG Level
    8

    Subnet Question

    Your IP address is 158.80.0.0 and your subnet mask is 255.255.240.0. Is it ok to assign an address of 158.80.16.255 to a host machine?

    My friend and I don't agree with the answer to this question.

    He thinks you can't assign it because 255 is for broadcasting only, but i thought when it comes to subnets that changes.

    I thought the broadcast for that subnet is 158.80.31.255 so it would be ok to assign that IP to a host. Could someone who is good with sub netting shed some light on this? And yes i'm just starting to learn about sub netting myself lol.

  2. #2
    Ridill
    Join Date
    Feb 2008
    Posts
    10,413
    BG Level
    9

    I suck at subneting, but generally I don't think it's wise to use .0 .1 or .255.

    Officially, I have no idea.

  3. #3
    Bagel
    Join Date
    Jul 2005
    Posts
    1,297
    BG Level
    6
    FFXIV Character
    Trent Reznuh
    FFXIV Server
    Balmung
    FFXI Server
    Sylph

    i'm no subnetting expert but i pasted the question to a few friends who are

    what i said:
    im pasting it cause i dont know the technical answer, i just know i'd probably avoid .0 .1 & .255 anyway

    what friends said:
    friend #1: .1 is fine but you shouldn't use .255
    friend #2: 0 and 255 is not addressable

    edit: ok so this went on longer after i replied. friend #3 = does this stuff for a living so i'd follow what he says the most. names changed to protect the guilty

    [04:26pm] <@friend #3> 158.80/20 usable = 158.80.0 to 158.80.15.255
    [04:26pm] <@friend #3> thats a /20
    [04:26pm] <@friend #3> which i s255.255.240.0
    [04:26pm] <@friend #3> which goes by 16s
    [04:26pm] <@friend #3> so 0 16 32 48 64
    [04:26pm] <@friend #3> etc
    [04:26pm] <@friend #1> 172 is a /20 isnt it?
    [04:27pm] <@friend #3> friend #1
    [04:27pm] <@friend #3> the / is from the subnetmask
    [04:27pm] <@friend #1> for rfc 1918
    [04:27pm] <@friend #3> not the assigning number
    [04:27pm] <@friend #1> block
    [04:27pm] <@friend #3> friend #1
    [04:27pm] <@friend #3> no one uses classful silly
    [04:27pm] <@friend #3> unlesss you are stuck in 1980
    [04:27pm] <@friend #3> classless sir
    [04:27pm] <@friend #3> the old thinking of A b c etc
    [04:27pm] <@friend #3> throw tthat shit out the fucking window
    [04:27pm] <@me> so you're saying .255 would be ok friend #3 ?
    [04:27pm] <@friend #3> he pasted 255.255.240.0 subnet mask which is VLSM masking
    [04:27pm] <@friend #3> me
    [04:28pm] <@friend #3> which ip
    [04:28pm] <@friend #3> you can use multiple 255
    [04:28pm] <@friend #3> such as 158.80.0.255
    [04:28pm] <@friend #3> or 158.80.14.255
    [04:28pm] <@me> question was could they assign 158.80.16.255 to a machine
    [04:28pm] <@friend #3> no
    [04:28pm] <@friend #3> you cant
    [04:28pm] <@friend #3> if your subnet is 255.255.240.
    [04:28pm] <@friend #3> you would be in the bext subnet
    [04:28pm] <@friend #3> next
    [04:28pm] <@friend #3> well ok you can but you would need to route between the two networks
    [04:29pm] <@friend #3> 158.80.15.255 is a broadcast if you are using 255.255.240.0
    [04:29pm] <@friend #3> the next bcast is 158.80.23.255

  4. #4
    jponry
    Join Date
    Jul 2006
    Posts
    1,391
    BG Level
    6
    FFXI Server
    Phoenix

    .0 and .255 are unadressable IP addresses. They are reserved for broadcast only. On a Class A, B, or C (which your's is B because it's 158.) subnet, the broadcast address always ends in 255.

  5. #5
    Conejita's Jolly
    Chaparrita's Dulce
    Trigger warning: Fuck your feelings.

    Join Date
    Feb 2006
    Posts
    7,075
    BG Level
    8

    Yup yup, and I'm too lazy to post, but here it explains why.

  6. #6
    Sandworm Swallows
    Join Date
    Dec 2007
    Posts
    7,096
    BG Level
    8

    Thank you for the info, i was thinking it was a trick question but i guess not. So why is the broadcast for each subnet so important if every 255 in the last octet has to be saved for broadcasting if I my ask? From what i'm seeing here the broadcast for the subnet 255.255.16.0 is
    158.80.16.255
    158.80.17~30.255
    158.80.31.255?

    Edit: didn't see your post Meteora, i'll take a look at that when i'm back from class.

  7. #7
    YOU ARE SEARED
    Dungeon Master of the House of Weave

    Join Date
    May 2007
    Posts
    4,453
    BG Level
    7
    WoW Realm
    Kilrogg

    Broadcast is used to say "send this information to everybody". Broadcast addresses are often the only way a new connection can be made between devices when you don't have intelligent routing to store tables of connected objects; your client first broadcasts saying "I'm looking for client xxx.xxx.xxx.xxx" and then theoretically that client should respond. Once it responds the two clients know eachother's physical addresses necessary to establish communications and can begin direct connections.

  8. #8
    YOU ARE SEARED
    Dungeon Master of the House of Weave

    Join Date
    May 2007
    Posts
    4,453
    BG Level
    7
    WoW Realm
    Kilrogg

    Mind you, it's not EVERY 255 you have to save, just the ones at the end of the subnet. So with 255.255.240.0 you CAN'T use 158.80.15.255 because it's the end of the subnet and is reserved for broadcast:

    Code:
            --------NETWORK-------/-----HOST-----
    Mask    11111111 11111111 1111 0000 00000000
    Address 10011110 01010000 0000 1111 11111111
    You've filled every block in the host address. This defines a broadcast.

    But switch to 158.80.16.255:

    Code:
            --------NETWORK-------/-----HOST-----
    Mask    11111111 11111111 1111 0000 00000000
    Address 10011110 01010000 0001 0000 11111111
    The host address block is NOT full. This is an individual host. The next logical broadcast address instead is 158.80.31.255:

    Code:
            --------NETWORK-------/-----HOST-----
    Mask    11111111 11111111 1111 0000 00000000
    Address 10011110 01010000 0001 1111 11111111
    Because again, every block in the HOST portion is filled.

  9. #9
    Sandworm Swallows
    Join Date
    Dec 2007
    Posts
    7,096
    BG Level
    8

    So what you are saying is i could use 16.255 sinse the broadcast for that subnet is 31.255 right? i'm getting mixed singles from different users.

  10. #10
    BG's most likeable Québécois
    Pens win! Pens Win!!! PENS WIN!!!!!

    Join Date
    Sep 2007
    Posts
    37,887
    BG Level
    10

    NVM yes you can

  11. #11
    YOU ARE SEARED
    Dungeon Master of the House of Weave

    Join Date
    May 2007
    Posts
    4,453
    BG Level
    7
    WoW Realm
    Kilrogg

    Quote Originally Posted by Yabby View Post
    So what you are saying is i could use 16.255 sinse the broadcast for that subnet is 31.255 right? i'm getting mixed singles from different users.
    This is correct. Broadcast addresses are only the full series of host-bits set to 1, which while that always means the last octet is 255 doesn't mean that every 255 is a broadcast address.

    Incidentally while we're on the topic, 0 is also an addressable value, again depending on your CIDR value. 158.80.17.0/20 is host-addressable space, for example; look at my above breakdown to see why.

  12. #12
    Salvage Bans
    Join Date
    Aug 2006
    Posts
    932
    BG Level
    5
    FFXIV Character
    Mist Monster
    FFXIV Server
    Leviathan
    FFXI Server
    Fenrir

    I'm a bit confused about the ops numbers.

    If your network was 158.80.0.0 with the subnet of 255.255.240.0 the very last host you could use is 158.80.15.254 with the broadcast of 158.80.15.255. 158.80.16.255 isn't even in your network.

    Now if it was 158.80.0.0 with a subnet of 255.255.224.0 then the last usable host would be 158.80.31.254 and the broadcast would be 158.80.31.255 making 158.80.16.255 a valid host

    EDIT: lol I didn't see that this was brought out in the pasted chat ><